View Issue Details

IDProjectCategoryView StatusLast Update
0002018FreeCADBugpublic2017-03-22 15:39
Reporterpfirszt Assigned Towmayer  
Status closedResolutionfixed 
Platformx86_64OSLinux FedoraOS Version21
Fixed in Version0.17 
Summary0002018: Running Freecad with specific locale causes freeze
DescriptionRunning Freecad with specific locale causes freeze and very high CPU usage.

Console shows series of warnings:
Coin warning in SbRotation::setValue(): Quarternion has zero length => undefined rotation.
Coin warning in SbRotation::setValue(): Quarternion has zero length => undefined rotation.
Coin warning in SbRotation::setValue(): Quarternion has zero length => undefined rotation.
Coin warning in SbRotation::setValue(): Quarternion has zero length => undefined rotation.
Steps To ReproduceRun:




Open attached file
Additional InformationOS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4651 (Git)
Branch: master
Hash: 95ed26715000f90b18be5afe5db21e2e5baf925f
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 3.1.3
FreeCAD Information


related to 0001852 closedshoogen The python interpreter does not recognize the posix locale settings 



2015-03-21 21:19


occ_base_empty.fcstd (Attachment missing)


2015-03-21 22:26

developer   ~0005900

I raised the priority. We might not want to fix this immediately. But we need to assess whether we hold the 0.15 release.

1. I can reproduce the behavior.
2. How/why did you set LC_ALL? Is the the usual way to set the locale in Fedora Linux 21? Most linux distributions seem to set all the different independent setting and leave LC_ALL unset. (I suppose this is how it slipped through testing)


2015-03-21 22:44

developer   ~0005901

I got an idea. I'm compiling the intended bugfix.


2015-03-21 23:02

developer   ~0005902

I tried to get FreeCAD in Polish language (asked about it on the forum) and that's for me the normal way. I have my system locale set as below:

$ locale

so when I want to use English (i.e. for producing understandable error report) I use:

LC_ALL=en_GB eog (eog is Eye of Gnome)


LC_ALL=C eog

The same method produced an unexpected behaviour with FreeCAD.


2015-03-21 23:08

developer   ~0005903

Last edited: 2015-03-21 23:44

There are two aspects: the decimal seperator and the filesystem encoding. I'll try to fix the former before the 0.15 release. This means to ignore LC_ALL. But respecting the file system locale from LC_ALL would be even more difficult.


2015-03-21 23:28

developer   ~0005904

Last edited: 2015-03-21 23:29


You should set LC_MESSAGES to get English messages. But leave LC_CTYPE intact to convey your file system encoding to the python interpreter.


2015-03-22 09:18

developer   ~0005906

Just in case this is related - no matter what I do FreeCAD ignores Polish decimal mark , (comma) in input fields


2015-03-22 10:13

developer   ~0005907

Last edited: 2015-03-22 10:13

with LC_ALL or LANG set?
LC_ALL is now completely ignored for the 0.15 release, (as it was in the 0.14 release). I thought about copying the value from LC_ALL to LANG and LC_CTYPE, but this might have unexpected side affects, so I would not recommend to touch this by a last time fix.


2015-03-22 10:17

developer   ~0005908

Last edited: 2015-03-22 10:18

And once again. If you remove the trailing ".UTF8" from the LC_CTYPE (or overide ist by setting LC_ALL) you change the sys.filesystemencoding in python. You won't be able to access paths with non-ascii characters (from python). This includes FreeCAD modules that use the open function from the python environment.


2015-03-22 10:26

developer   ~0005909

A few tests of Part Design wb, dimensioning a sketch:

with LANG=pl_PL.utf8, LC_ALL=pl_PL and LANG=pl_PL. I.e. 15,8mm is interpreted as 158mm

with LC_ALL=pl_PL.utf8 throws an error after selecting sketch orientation:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
<type 'exceptions.TypeError'>: Either three floats, tuple or Vector expected

with LC_NUMERIC=pl_PL.utf8 works as expected

with LC_NUMERIC=pl_PL also works as expected


2015-03-22 12:04

developer   ~0005910

BTW: The actual hang occurs in the meshing with a deflection 0.0. This happens when the decimal separator screws up the value of the deviation property.


2015-04-07 11:35

developer   ~0005973

Dear pfirszt,
could you please test if
git:// bugfix2018-master
improves the behavior?


2015-04-07 12:25

developer   ~0005974

Hi shoogen,
Yes, proposed changes fix the problem. The crash is gone and Polish decimal separator (comma ,) behaves as expected. 15,5 mm is 15 and-a-half mm, not 155 mm as previously.


2015-04-11 15:39

administrator   ~0005998

Sebastian, is this branch ready for merging?


2015-04-11 19:22

developer   ~0006002

Hello Werner,
It could be merged, but it won't solve the whole problem.
The same fix needs to be applied to MainCmd as well.
There are two things that I'm not sure about:
1. should this setting up of the locales be moved to a function to be called by MainGui and MainCmd
2. I haven't yet understood how loading FreeCAD as module works and if the bug applies there as well.


2015-04-12 09:10

developer   ~0006006

setting LANG for MainCmd still creates problems.
I haven't found a reliable way to test this for FreeCAD as a python module, as it deems that the locale in FreeCAD does not influence set external interpretor.


2015-08-23 08:47

administrator   ~0006298

Related forum link:

Issue History

Date Modified Username Field Change
2015-03-21 21:19 pfirszt New Issue
2015-03-21 21:19 pfirszt File Added: occ_base_empty.fcstd
2015-03-21 22:21 shoogen Priority low => immediate
2015-03-21 22:26 shoogen Note Added: 0005900
2015-03-21 22:44 shoogen Note Added: 0005901
2015-03-21 23:02 pfirszt Note Added: 0005902
2015-03-21 23:08 shoogen Note Added: 0005903
2015-03-21 23:28 shoogen Note Added: 0005904
2015-03-21 23:29 shoogen Note Edited: 0005904
2015-03-21 23:37 shoogen Priority immediate => normal
2015-03-21 23:44 shoogen Note Edited: 0005903
2015-03-21 23:50 shoogen Relationship added related to 0001852
2015-03-22 09:18 pfirszt Note Added: 0005906
2015-03-22 10:13 shoogen Note Added: 0005907
2015-03-22 10:13 shoogen Note Edited: 0005907
2015-03-22 10:17 shoogen Note Added: 0005908
2015-03-22 10:18 shoogen Note Edited: 0005908
2015-03-22 10:26 pfirszt Note Added: 0005909
2015-03-22 12:04 shoogen Note Added: 0005910
2015-04-07 11:35 shoogen Note Added: 0005973
2015-04-07 12:25 pfirszt Note Added: 0005974
2015-04-11 15:39 wmayer Note Added: 0005998
2015-04-11 19:22 shoogen Note Added: 0006002
2015-04-12 09:10 shoogen Note Added: 0006006
2015-08-23 08:47 wmayer Note Added: 0006298
2017-01-16 09:59 Kunda1 Tag Attached: locale
2017-02-10 10:19 wmayer Assigned To => wmayer
2017-02-10 10:19 wmayer Status new => assigned
2017-03-22 15:39 wmayer Status assigned => closed
2017-03-22 15:39 wmayer Resolution open => fixed
2017-03-22 15:39 wmayer Fixed in Version => 0.17