View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002018 | FreeCAD | Bug | public | 2015-03-21 21:19 | 2017-03-22 15:39 |
Reporter | pfirszt | Assigned To | wmayer | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86_64 | OS | Linux Fedora | OS Version | 21 |
Fixed in Version | 0.17 | ||||
Summary | 0002018: Running Freecad with specific locale causes freeze | ||||
Description | Running 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 Reproduce | Run: LC_ALL=pl_PL FreeCAD or LC_ALL=es_ES FreeCAD Open attached file | ||||
Additional Information | OS: 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 | ||||
Tags | locale | ||||
FreeCAD Information | |||||
|
|
|
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) |
|
I got an idea. I'm compiling the intended bugfix. |
|
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 LANG=pl_PL.utf8 LC_CTYPE="pl_PL.utf8" LC_NUMERIC=en_IE.utf8 LC_TIME=en_IE.utf8 LC_COLLATE="pl_PL.utf8" LC_MONETARY=en_IE.utf8 LC_MESSAGES="pl_PL.utf8" LC_PAPER="pl_PL.utf8" LC_NAME="pl_PL.utf8" LC_ADDRESS="pl_PL.utf8" LC_TELEPHONE="pl_PL.utf8" LC_MEASUREMENT=en_IE.utf8 LC_IDENTIFICATION="pl_PL.utf8" LC_ALL= 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) or LC_ALL=C eog The same method produced an unexpected behaviour with FreeCAD. |
|
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. |
|
BTW: https://github.com/python-git/python/blob/master/Python/pythonrun.c#L272 You should set LC_MESSAGES to get English messages. But leave LC_CTYPE intact to convey your file system encoding to the python interpreter. |
|
Just in case this is related - no matter what I do FreeCAD ignores Polish decimal mark , (comma) in input fields |
|
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. |
|
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. |
|
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 |
|
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. |
|
Dear pfirszt, could you please test if git://github.com/5263/FreeCAD bugfix2018-master improves the behavior? |
|
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. |
|
Sebastian, is this branch ready for merging? |
|
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. |
|
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. |
|
Related forum link: http://forum.freecadweb.org/viewtopic.php?f=8&t=11796 |
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 |