View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001241 | Draft | Bug | public | 2013-09-13 10:47 | 2013-12-20 21:22 |
Reporter | ulrich1a | Assigned To | yorik | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | trunk | ||||
Fixed in Version | 0.14 | ||||
Summary | 0001241: FreeCAD Windows 32 bit crashes at adding Draft Dimension with Fontsize preset in preferences | ||||
Description | Adding a Draft Dimension works and the fontsize can be changes for each dimension. But if the fontsize is preset in the Draft-preferences, FreeCAD crashes allways at adding a Draft dimension. | ||||
Additional Information | Tested with FreeCAD 0.13 stable and FreeCAD Version: 0.14.2497 (Git) on Windows 7 32 bit. It workes for me on Debian 32 bit. | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
Hm unfortunately I cannot debug this as I have no windows install.. Indeed on linux there is no crash. Can you test something for me? In the python console, enter the following lines: import Draft Draft.makeDimension(FreeCAD.Vector(-1,0,0),FreeCAD.Vector(1,0,0),FreeCAD.Vector(0,1,0)) And see if it crashes... This would give me a clue to where the problem lies... Thanks |
|
I did now a test on my seldrom used Windows XP at home with FreeCAD 0.13 stable.There is no crash with the font setting. The font size setting in the preferences has no effect. To see a number on a dimension, you have to change the font size for each dimesion. It is always 0.00 for a new dimension. So it may be related to Windows 7. I will test next week on Windows 7 again. There I have both FreeCAD 0.13 stable and FreeCAD trunk. Are the preferences incompatible between both versions? |
|
The font size used by the dimension is the one from the task bar (switch to "tasks") which normally takes what is in the preferences, once you restart freecad (there is no way to detect a preferences change at the moment). Changing it also changes the preferences if "save current color across sessions" is ticked (I know, should clean that up some day). All this is not too obvious and should be cleaned up, but more important is to determine in which conditions a crash occurs... |
|
I had my font size preset and was able to add dimensions in Draft Workbench with no crash. URL for video showing this: https://www.dropbox.com/s/xwgxvjqolfsr862/20130916b%20Draft%20Dimension.avi OS: Windows XP Platform: 32-bit Version: 0.14.2370 (Git) Branch: master Hash: a836759ebd91404954a778ff8885e152611576e1 Python version: 2.6.2 Qt version: 4.5.2 Coin version: 3.1.0 SoQt version: 1.4.1 OCC version: 6.5.1 |
|
The problem seems to be related to Windows 7. The same binaries worked well under wine but not under Windows 7. I got a crash at adding a Draft Dimension, after I confirmed the Draft Preferences with ok. It seems to be related to the font handling in Windows 7. I installed osifont in Windows and copied it also to another path, where I could see the file in the windows explorer. I made the following setting in the Draft Preferences: standard font: "osifont" Default Shape Font file: "path to copied osifontfile". I dont know, if the above settings are correct. At least FreeCAD dont crashes anymore. The correct font handling under windows 7 may have to be investigated, by someone with more knowledge about windows 7. OS: Windows 7 Platform: 32-bit Version: 0.14.2512 (Git) Branch: master Hash: e157152c962fe1fe5340dbe825f31f1e21f9a09a Python version: 2.6.2 Qt version: 4.5.2 Coin version: 3.1.0 SoQt version: 1.4.1 OCC version: 6.5.1 |
|
I did a little bit further investigation. The crash can be avoided be just putting nothing in the standard font setting. Or the better way change the standard font setting from "Arial" to "arial". Otherwise FreeCAD crashes in Windows 7 with confirmed Draft Preferences after adding a Draft Dimension with Err: Illegal storage access...Err: |
|
Ah good to know. Indeed on linux putting an invalid font name doesn't cause a crash. Unfortunately fonts management is so complex that there is little chance we can check that from freecad. Can you try if it crashes when putting "sans" as a font name? That could be a better default value... |
|
I tested "sans" on Windows 7. It does not crash. So "sans" should be also ok. |
|
Something that comes in my mind: I can not be shure, that "sans" is provided by Windows 7 itself, because I have a lot of other software installed. So it works on my system, but it may not work at others. If you do not mind to install virtual box, than you can download a ready to run virtual-box-image of windows 7 for testing purposes. It allows up to 90 days of testing. Here is the link: http://www.modern.ie/en-us/virtualization-tools#downloads |
|
I tested this on Win7 64-bit but had no crash. I set an arbitrary text as standard font file which then was set to the FontName property. Two questions: @ulrich1a: Does it crash for you when you set a non-existing font to FontName of the Dimension object in the property editor? @Yorik: Qt offers a class which lists the font families: from PyQt4 import QtGui fdb=QtGui.QFontDatabase() fdb.families(QtGui.QFontDatabase.Any) Could this be used together with a combo box? |
|
Oh yes, great! Maybe that way we can check if a font exists before applying it... We could also unify how the ShapeString tool works. Since it is not based on coin but on the freetype lib, it needs specifically a .ttf file as input. With this we could unify it all. Maybe create a specific FontProperty? I'll play a bit with this to see how best it can be used... About the "sans" font, it doesn't exist, but normally all systems know what to do with it, it's like a default. |
|
It may be, that I described the crash conditions not clear. Before starting FreeCAD delete the user.cfg and system.cfg in "c:/users/.../roaming/" just to be shure to have a situation like a fresh install. I am not sitting at the windows machine. So the correct path have to be figured out. Start FreeCAD and add a Draft Dimension in the Draft Workbench. This works for me. Then open the Preferences/Draft. The "Standard Schriftart" should be "Arial" in the tab visual settings. Do nothing else than confirming the preferences with the OK-button. Add another Draft dimension. I was getting a crash in 2 seconds. @wmayer: I will test next week. |
|
I forgot to say, the crash happens only with the version of 0.14.2497 (Git) or later. I got the crash with 0.13 stable, because I copied the actual /Mod/Draft folder from 0.14.2497 into the stable version. In later testing a reinstalled 0.13 stable gave no crash. |
|
When FreeCAD crashes it should create a file called crash.dmp in the directory where the user.cfg is (%APPDATA%\FreeCAD). Can you attach this file, please? |
|
OK, I built FreeCAD 32-bit on Windows 7 and I got the crash too now. With the 64-bit version I did not get a crash. One thing is strange: For the first Dimension object it shows the correct icon (the <=>). After visiting the preferences dialog the new dimension object changes its icon to the default (the green rectangle with black border). And the stack trace is not too useful but it shows it crashes deep inside Coin: 15649d70() glu32.dll!65fb41c5() [Frames below may be incorrect and/or missing, no symbols loaded for glu32.dll] glu32.dll!65fb4205() glu32.dll!65fb307d() coin2.dll!0125d1fa() coin2.dll!0125ae9a() coin2.dll!01264b71() coin2.dll!01297011() coin2.dll!013e4411() coin2.dll!012929ee() coin2.dll!012ace82() coin2.dll!012acebe() coin2.dll!0131a2a5() coin2.dll!0137c065() coin2.dll!01349fee() coin2.dll!012928aa() coin2.dll!012ace82() coin2.dll!012acebe() coin2.dll!0131a2a5() coin2.dll!0137c065() coin2.dll!01349fee() coin2.dll!012928aa() coin2.dll!012ace82() coin2.dll!012acebe() coin2.dll!0131a2a5() coin2.dll!0137c065() coin2.dll!01349fee() coin2.dll!012928aa() coin2.dll!012ace82() coin2.dll!012acebe() coin2.dll!0131a2a5() coin2.dll!0137c065() coin2.dll!01349fee() coin2.dll!012928aa() coin2.dll!012ace82() coin2.dll!012acebe() coin2.dll!0131a2a5() coin2.dll!0137c065() coin2.dll!01349fee() coin2.dll!012928aa() coin2.dll!012e0bee() coin2.dll!01292c78() soqt1.dll!00c81c3a() coin2.dll!01318aef() > FreeCADGui.dll!5f7d493e() coin2.dll!0134a1c9() coin2.dll!0130df20() coin2.dll!01359165() coin2.dll!0135949c() coin2.dll!01292a49() coin2.dll!012ace8f() coin2.dll!013d5c7c() coin2.dll!0126f7d3() soqt1.dll!00c8483b() coin2.dll!013d5c7c() FreeCADGui.dll!5f7e5132() coin2.dll!0137b5a0() soqt1.dll!00c7f747() soqt1.dll!00c7f9b4() coin2.dll!01377b31() coin2.dll!0137b519() coin2.dll!0137bb0f() soqt1.dll!00c74472() soqt1.dll!00c744e1() QtCore4.dll!670e6041() QtCore4.dll!670e388c() QtCore4.dll!670d4ffd() QtCore4.dll!671256e3() QtGui4.dll!65015878() QtGui4.dll!65019a0c() msvcr90.dll!6d78675b() FreeCADGui.dll!5f65838a() kernel32.dll!75b614ad() msvcr90.dll!6d783c1b() QtGui4.dll!652bb92c() QtGui4.dll!652dd315() QtCore4.dll!670d45fd() QtCore4.dll!670f4330() QtCore4.dll!67126a53() QtGui4.dll!65015878() QtGui4.dll!65019a0c() QtGui4.dll!65015878() QtGui4.dll!65019a0c() user32.dll!771f62fa() user32.dll!771f6d91() user32.dll!771f6a8c() uxtheme.dll!6f640b64() uxtheme.dll!6f640b96() user32.dll!771f6210() user32.dll!771f6b34() user32.dll!771f6b00() user32.dll!771f6b00() QtGui4.dll!654147ca() QtGui4.dll!65065cfc() QtGui4.dll!6516cf87() QtGui4.dll!651905f6() QtGui4.dll!65190981() QtGui4.dll!65190f92() QtGui4.dll!651905f6() QtGui4.dll!65190981() QtGui4.dll!65190f92() QtGui4.dll!65191c14() QtGui4.dll!65097450() QtGui4.dll!651972fd() QtWebKit4.dll!01688a8d() QtWebKit4.dll!017fe4f0() QtWebKit4.dll!017feba4() QtWebKit4.dll!017fcba0() QtWebKit4.dll!017fe520() QtWebKit4.dll!017fcba0() QtWebKit4.dll!017fc624() QtWebKit4.dll!017fc5f1() QtWebKit4.dll!017fc5f1() QtWebKit4.dll!01856b1a() QtWebKit4.dll!0180a300() QtGui4.dll!65345f89() QtWebKit4.dll!01832809() QtGui4.dll!65194e57() gdi32.dll!7762549d() kernel32.dll!75b614ad() msvcr90.dll!6d783c1b() QtCore4.dll!670e6151() QtGui4.dll!65346e0b() usp10.dll!770c5c6f() usp10.dll!770c5c6f() usp10.dll!770c58ad() usp10.dll!770c519f() usp10.dll!77095e45() usp10.dll!770a181d() uxtheme.dll!6f642a67() uxtheme.dll!6f648c00() uxtheme.dll!6f647d13() user32.dll!771f6210() user32.dll!771f7dc4() user32.dll!771f7dc4() user32.dll!771f7d93() user32.dll!771f7d93() uxtheme.dll!6f642a9f() uxtheme.dll!6f642ad4() uxtheme.dll!6f649152() uxtheme.dll!6f649165() QtCore4.dll!671256e3() msvcr90.dll!6d783db8() QtCore4.dll!6705fa42() QtCore4.dll!67058416() msvcp90.dll!665b0000() FreeCAD.exe!011f3eff() msvcr90.dll!6d783c1b() QtCore4.dll!670f79b6() QtCore4.dll!670f7d7e() FreeCAD.exe!011f4c7d() kernel32.dll!75b6336a() ntdll.dll!77b09f72() ntdll.dll!77b09f45() |
|
I tested with a nonsense fontname: It does not crash. The crash happens also, when in the first Dimension added, the font is changed to "Arial". |
|
I can confirm this. BTW, the crash happens immediately after writing the last character. This means on "Aria" everything is still fine but when writing the "l" it crashes. |
|
There is definitely a problem with that font on that windows version... The fact that "aria" doesn't crash indicates that coin handles correctly not-found fonts.. Can you try with "Times New Roman"? Just to see if it crashes with all fonts or only Arial |
|
Attached are two Inventor file which makes the application crashing. However, with version 0.13 this file can be loaded without problems. As you can see the reduced file doesn't have any FreeCAD-specific Inventor nodes but it crashes with 0.14 and not with 0.13. How can this be? > Can you try with "Times New Roman"? This crashes for me, too. Stack trace: 0c78f988() glu32.dll!65f541c5() [Frames below may be incorrect and/or missing, no symbols loaded for glu32.dll] glu32.dll!65f54205() glu32.dll!65f5307d() > coin2d.dll!cc_flwft_get_vector_glyph(void * font=0x10e10a40, unsigned int glyphindex=21, float complexity=0.50000000) Line 1084 + 0x12 bytes C coin2d.dll!cc_flw_get_vector_glyph(int font=0, unsigned int glyph=50) Line 908 + 0x1b bytes C coin2d.dll!cc_glyph3d_ref(unsigned int character=50, const cc_font_specification * spec=0x0c6941b8) Line 212 + 0xd bytes C coin2d.dll!SoAsciiTextP::setUpGlyphs(SoState * state=0x0c68a1d0, SoAsciiText * textnode=0x0c50b348) Line 841 + 0x10 bytes C++ coin2d.dll!SoAsciiText::computeBBox(SoAction * action=0x014f98dc, SbBox3f & box={...}, SbVec3f & center={...}) Line 585 C++ coin2d.dll!SoShape::getBBox(SoAction * action=0x014f98dc, SbBox3f & box={...}, SbVec3f & center={...}) Line 1572 + 0x1e bytes C++ <==== Snip ====> |
|
It's definitely strange... Does the Annotation object also crash? t=App.ActiveDocument.addObject("App::Annotation","Text") t.LabelText="Sample Text" t.ViewObject.FontName="Arial" That one doesn't use pivy, results might be different... |
|
> Does the Annotation object also crash? No, because Qt does the rendering into an image and we copy this into an image Inventor node. > That one doesn't use pivy, results might be different... The crash has nothing to do with pivy. |
|
I have the osifont installed. It is a valid font, which has in other applications like Wordpad the name "osifont". In FreeCAD 0.13, changing the fontname in a dimension causes also the number changing its visual appearance. The osifonts numbers are visible in FreeCAD 0.13 dimensions. In FreeCAD 0.14 using osifont causes no crash, but the appearence of the number does not change. The numbers in the draft view are looking always like a serife number. I got also FreeCAD 0.13 crashing, when I had copied the /Mod/Draft from FreeCAD trunk folder into the FreeCAD 0.13 installation. |
|
> The numbers in the draft view are looking always like a serife number. That is because it is using the default internal font, and not your osifont. Probably the name of the font is different from the ttf filename. But since Times New Roman also crashes, I suppose this has nothing to do with the font itself, but with the coin3D handling of it. Anyway, I just changed the default in Draft to use the internal font instead of Arial, that should already prevent users from experiencing a crash first hand... |
|
|
|
|
|
Since this is no more producing crashes, I'll close it. Please reopen if new information is available. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-09-13 10:47 | ulrich1a | New Issue | |
2013-09-13 15:11 | yorik | Note Added: 0003570 | |
2013-09-13 15:11 | yorik | Status | new => assigned |
2013-09-13 15:11 | yorik | Assigned To | => yorik |
2013-09-13 17:28 | ulrich1a | Note Added: 0003572 | |
2013-09-13 17:39 | yorik | Note Added: 0003573 | |
2013-09-17 00:02 | bejant | Note Added: 0003589 | |
2013-09-17 01:35 | yorik | Status | assigned => feedback |
2013-09-17 12:47 | ulrich1a | Note Added: 0003593 | |
2013-09-18 06:26 | ulrich1a | Note Added: 0003594 | |
2013-09-18 11:32 | yorik | Note Added: 0003595 | |
2013-09-18 13:13 | ulrich1a | Note Added: 0003596 | |
2013-09-18 13:34 | ulrich1a | Note Added: 0003597 | |
2013-09-21 12:18 | wmayer | Note Added: 0003606 | |
2013-09-21 13:46 | yorik | Note Added: 0003608 | |
2013-09-21 18:57 | ulrich1a | Note Added: 0003617 | |
2013-09-21 19:02 | ulrich1a | Note Added: 0003618 | |
2013-09-23 06:34 | wmayer | Note Added: 0003629 | |
2013-09-23 07:01 | wmayer | Note Added: 0003631 | |
2013-09-23 08:29 | ulrich1a | Note Added: 0003634 | |
2013-09-23 10:37 | wmayer | Note Added: 0003635 | |
2013-09-23 11:19 | wmayer | File Added: 0001241.iv | |
2013-09-23 11:32 | yorik | Note Added: 0003636 | |
2013-09-23 11:46 | wmayer | File Added: 0001241_minimum.iv | |
2013-09-23 11:53 | wmayer | Note Added: 0003637 | |
2013-09-23 12:29 | yorik | Note Added: 0003638 | |
2013-09-23 12:30 | yorik | Note Edited: 0003638 | |
2013-09-23 13:17 | wmayer | Note Added: 0003639 | |
2013-09-23 14:16 | ulrich1a | Note Added: 0003643 | |
2013-10-11 11:50 | yorik | Note Added: 0003731 | |
2013-11-04 13:33 | yorik | File Deleted: 0001241.iv | |
2013-11-04 13:33 | yorik | File Deleted: 0001241_minimum.iv | |
2013-11-04 13:33 | yorik | File Added: 0001241.iv | |
2013-11-04 13:33 | yorik | File Added: 0001241_minimum.iv | |
2013-11-10 19:21 | yorik | Relationship added | parent of 0001242 |
2013-11-20 19:18 | yorik | Project | FreeCAD => Draft |
2013-12-20 21:22 | yorik | Note Added: 0003957 | |
2013-12-20 21:22 | yorik | Status | feedback => closed |
2013-12-20 21:22 | yorik | Resolution | open => fixed |
2013-12-20 21:22 | yorik | Fixed in Version | => 0.14 |