Could not load saved file

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
bene42

Re: Could not load saved file

Post by bene42 »

Hi Werner,
wmayer wrote: OK the good point is that this is not a bug in FreeCAD, the bad point it's probably a bug in the OpenCascade library.
sounds reasonable to me.
wmayer wrote: I guess this bug only appears with the 64-bit but not with 32-bit version because AFAIK all the people who have tested the sample project file have the 32-bit version.
Sorry, I mixed up the console...
That was 32-bit :-(
wmayer wrote: To make this sure you should check that your IGES,STEP, BREP files are not corrupted. If possible it would be best to test this with a 32-bit OpenCascade.
I have uploaded all files: (maybe someone can check these)
http://www.spranger.biz/~bene/testa.brep
http://www.spranger.biz/~bene/testa.fcstd
http://www.spranger.biz/~bene/testa.iges
http://www.spranger.biz/~bene/testa.step

Bis denne
Bene
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Could not load saved file

Post by yorik »

I use a 64 bit freecad and I could open the file...
bene42

Re: Could not load saved file

Post by bene42 »

Here is the x86_64 output:

$ ./test_freecad ../CAD/testa.step > error_x86_64_step.txt
Speicherzugriffsfehler
$

http://www.spranger.biz/~bene/error_x86_64_step.txt

Bis denne
Bene
bene42

Re: Could not load saved file

Post by bene42 »

yorikvanhavre wrote:I use a 64 bit freecad and I could open the file...
Sounds good, therefore two questions:
1) Do You use Debian?
2) What Opencascade Version do you use?

Thank you in advance.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Could not load saved file

Post by wmayer »

Hi everybody,

I got the solution! It's the environment variable LC_ALL. Bene, on your system this is set to de_DE.UTF-8. The problem with this is that the OCC parser that should read some double or floats from the file interpret the ',' as decimal point and doesn't interpret the '.' as decimal point.

So, because reading-in the data fails this leads to some more grave problems and thus leads to a crash or the 100% CPU usage. I set LC_ALL on my system and I got exactly the same behaviour as you've described it.

So, for a temporary work around simply unset the environment variable. As a fix we must try to unset it inside FreeCAD when starting it.

Cheers,
Werner
bene42

Re: Could not load saved file

Post by bene42 »

wmayer wrote: I got the solution! It's the environment variable LC_ALL. Bene, on your system this is set to de_DE.UTF-8. The problem with this is that the OCC parser that should read some double or floats from the file interpret the ',' as decimal point and doesn't interpret the '.' as decimal point.
:shock: DOH!

unset LC_ALL and it works. Searching for a brown paperback ;-)

Thx
Bene
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Could not load saved file

Post by wmayer »

I have added the line putenv("LC_ALL=C") into our main() function which overrides the system-wide environment variable. I'll prepare a new tarball shortly so that Adam Powell can upload it to Debian.

Cheers,
Werner
Post Reply