View Issue Details

IDProjectCategoryView StatusLast Update
0000460FreeCADBugpublic2011-11-05 20:47
ReporterdanielfalckAssigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version0.12 
Summary0000460: exporting *stl files from File -> Export
DescriptionTrying to export Part objects as *stl files from the 'File -> Export' menu crashes every time.
exporting Part objects from the python console works.
I am running FreeCAD r5080 from svn on Ubuntu 10.04 AMD64
sliptonic seems to have the same problem on his ubuntu machine.

I caught some info from the terminal and pasted it below.
Additional InformationIllegal storage access...
*** glibc detected *** ./FreeCAD: corrupted double-linked list: 0x00000000032f0970 ***
======= Backtrace: =========
/lib/libc.so.6(+0x775b6)[0x7fac0258c5b6]
/lib/libc.so.6(+0x77a61)[0x7fac0258ca61]
/lib/libc.so.6(+0x7afad)[0x7fac0258ffad]
/lib/libc.so.6(__libc_calloc+0xc4)[0x7fac02593454]
/usr/lib/nvidia-current/libGL.so.1(+0x4f71b)[0x7fac08c9471b]
======= Memory map: ========
00400000-0041a000 r-xp 00000000 08:01 14422148 /home/danfalck/cadcam/freecad/bin/FreeCAD
00619000-0061a000 r--p 00019000 08:01 14422148 /home/danfalck/cadcam/freecad/bin/FreeCAD
0061a000-0061b000 rw-p 0001a000 08:01 14422148 /home/danfalck/cadcam/freecad/bin/FreeCAD
02196000-03688000 rw-p 00000000 00:00 0 [heap]
4067d000-406dc000 rw-p 00000000 00:05 1358 /dev/zero
60000000-603e8000 rw-p 00000000 00:05 1358 /dev/zero
7fabdb706000-7fabdbb83000 r-xp 00000000 08:01 15992312 /home/danfalck/cadcam/freecad/Mod/Mesh/Mesh.so
7fabdbb83000-7fabdbd83000 ---p 0047d000 08:01 15992312 /home/danfalck/cadcam/freecad/Mod/Mesh/Mesh.so
7fabdbd83000-7fabdbd8c000 r--p 0047d000 08:01 15992312 /home/danfalck/cadcam/freecad/Mod/Mesh/Mesh.so
7fabdbd8c000-7fabdbda2000 rw-p 00486000 08:01 15992312 /home/danfalck/cadcam/freecad/Mod/Mesh/Mesh.so
7fabdbda2000-7fabdbda4000 rw-p 00000000 00:00 0
7fabdbda4000-7fabdbf1e000 r-xp 00000000 08:01 15996981 /home/danfalck/cadcam/freecad/Mod/Mesh/MeshGui.so
7fabdbf1e000-7fabdc11e000 ---p 0017a000 08:01 15996981 /home/danfalck/cadcam/freecad/Mod/Mesh/MeshGui.so
7fabdc11e000-7fabdc126000 r--p 0017a000 08:01 15996981 /home/danfalck/cadcam/freecad/Mod/Mesh/MeshGui.so
7fabdc126000-7fabdc12e000 rw-p 00182000 08:01 15996981 /home/danfalck/cadcam/freecad/Mod/Mesh/MeshGui.so
7fabdc12e000-7fabdc3a3000 r-xp 00000000 08:01 28326037 /usr/local/lib/libTKernel.so.0.0.0
7fabdc3a3000-7fabdc5a2000 ---p 00275000 08:01 28326037 /usr/local/lib/libTKernel.so.0.0.0
7fabdc5a2000-7fabdc5ad000 r--p 00274000 08:01 28326037 /usr/local/lib/libTKernel.so.0.0.0
7fabdc5ad000-7fabdc636000 rw-p 0027f000 08:01 28326037 /usr/local/lib/libTKernel.so.0.0.0
7fabdc636000-7fabdc644000 rw-p 00000000 00:00 0
7fabdc644000-7fabdc84f000 r-xp 00000000 08:01 28326040 /usr/local/lib/libTKMath.so.0.0.0
7fabdc84f000-7fabdca4f000 ---p 0020b000 08:01 28326040 /usr/local/lib/libTKMath.so.0.0.0
7fabdca4f000-7fabdca54000 r--p 0020b000 08:01 28326040 /usr/local/lib/libTKMath.so.0.0.0
7fabdca54000-7fabdca5a000 rw-p 00210000 08:01 28326040 /usr/local/lib/libTKMath.so.0.0.0
7fabdca5a000-7fabdca5d000 rw-p 00000000 00:00 0
7fabdca5d000-7fabdcb01000 r-xp 00000000 08:01 28326046 /usr/local/lib/libTKG2d.so.0.0.0
7fabdcb01000-7fabdcd00000 ---p 000a4000 08:01 28326046 /usr/local/lib/libTKG2d.so.0.0.0
7fabdcd00000-7fabdcd03000 r--p 000a3000 08:01 28326046 /usr/local/lib/libTKG2d.so.0.0.0
7fabdcd03000-7fabdcd06000 rw-p 000a6000 08:01 28326046 /usr/local/lib/libTKG2d.so.0.0.0
7fabdcd06000-7fabdcd07000 rw-p 00000000 00:00 0
7fabdcd07000-7fabdce7a000 r-xp 00000000 08:01 28326049 /usr/local/lib/libTKG3d.so.0.0.0
7fabdce7a000-7fabdd07a000 ---p 00173000 08:01 28326049 /usr/local/lib/libTKG3d.so.0.0.0
7fabdd07a000-7fabdd080000 r--p 00173000 08:01 28326049 /usr/local/lib/libTKG3d.so.0.0.0
7fabdd080000-7fabdd085000 rw-p 00179000 08:01 28326049 /usr/local/lib/libTKG3d.so.0.0.0
7fabdd085000-7fabdd087000 rw-p 00000000 00:00 0
7fabdd087000-7fabdd58d000 r-xp 00000000 08:01 28326052 /usr/local/lib/libTKGeomBase.so.0.0.0
7fabdd58d000-7fabdd78c000 ---p 00506000 08:01 28326052 /usr/local/lib/libTKGeomBase.so.0.0.0
7fabdd78c000-7fabdd792000 r--p 00505000 08:01 28326052 /usr/local/lib/libTKGeomBase.so.0.0.0
7fabdd792000-7fabdd7de000 rw-p 0050b000 08:01 28326052 /usr/local/lib/libTKGeomBase.so.0.0.0
7fabdd7de000-7fabdd83c000 rw-p 00000000 00:00 0
7fabdd83c000-7fabdd951000 r-xp 00000000 08:01 28326055 /usr/local/lib/libTKBRep.so.0.0.0
7fabdd951000-7fabddb50000 ---p 00115000 08:01 28326055 /usr/local/lib/libTKBRep.so.0.0.0
7fabddb50000-7fabddb55000 r--p 00114000 08:01 28326055 /usr/local/lib/libTKBRep.so.0.0.0
7fabddb55000-7fabddb5a000 rw-p 00119000 08:01 28326055 /usr/local/lib/libTKBRep.so.0.0.0
7fabddb5a000-7fabddb5b000 rw-p 00000000 00:00 0
7fabddb5b000-7fabde14d000 r-xp 00000000 08:01 28326058 /usr/local/lib/libTKGeomAlgo.so.0.0.0
7fabde14d000-7fabde34d000 ---p 005f2000 08:01 28326058 /usr/local/lib/libTKGeomAlgo.so.0.0.0
7fabde34d000-7fabde356000 r--p 005f2000 08:01 28326058 /usr/local/lib/libTKGeomAlgo.so.0.0.0
7fabde356000-7fabde364000 rw-p 005fb000 08:01 28326058 /usr/local/lib/libTKGeomAlgo.so.0.0.0
7fabde364000-7fabde59e000 rw-p 00000000 00:00 0
7fabde59e000-7fabde841000 r-xp 00000000 08:01 28326061 /usr/local/lib/libTKTopAlgo.so.0.0.0
7fabde841000-7fabdea41000 ---p 002a3000 08:01 28326061 /usr/local/lib/libTKTopAlgo.so.0.0.0
7fabdea41000-7fabdea46000 r--p 002a3000 08:01 28326061 /usr/local/lib/libTKTopAlgo.so.0.0.0
7fabdea46000-7fabdea4f000 rw-p 002a8000 08:01 28326061 /usr/local/lib/libTKTopAlgo.so.0.0.0
7fabdea4f000-7fabdea51000 rw-p 00000000 00:00 0
7fabdea51000-7fabdebda000 r-xp 00000000 08:01 28326070 /usr/local/lib/libTKHLR.so.0.0.0
7fabdebda000-7fabdedda000 ---p 00189000 08:01 28326070 /usr/local/lib/libTKHLR.so.0.0.0
7fabdedda000-7fabdeddd000 r--p 00189000 08:01 28326070 /usr/local/lib/libTKHLR.so.0.0.0
7fabdeddd000-7fabdede4000 rw-p 0018c000 08:01 28326070 /usr/local/lib/libTKHLR.so.0.0.0
7fabdede4000-7fabdede6000 rw-p 00000000 00:00 0
7fabdede6000-7fabdf043000 r-xp 00000000 08:01 28326076 /usr/local/lib/libTKShHealing.so.0.0.0
7fabdf043000-7fabdf243000 ---p 0025d000 08:01 28326076 /usr/local/lib/libTKShHealing.so.0.0.0Abnormal program termination...
Killed
danfalck@amd4core:~/cadcam/freecad/bin$
TagsNo tags attached.

Activities

unauthenticated

2011-10-30 18:56

viewer   ~0001194

I rebuilt my machine with ubuntu 11.10 and opencascade only (No OCE installed). The illegal storage access error happens consistently. -sliptonic

wmayer

2011-10-31 09:39

administrator   ~0001201

I still cannot reproduce this crash. I wonder what FreeCAD version you're using. Is it a self-compiled version or the PPA version?
If it's the latter then it would be interesting to know if and which version you have installed of OCC and OCE. According to your bug report OC(C|E) is installed under /usr/local/lib but it should be /usr/lib in case you're linking the official package.

http://packages.ubuntu.com/lucid/amd64/libopencascade-modeling-6.3.0/filelist

danielfalck

2011-11-01 03:15

reporter   ~0001203

Werner, could you give us a refresher on creating a Part that is ready for export for a *stl file? I wonder if we are doing something wrong.

1. I can create a *stl file from the python console similar to the example at the bottom of the url:
https://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Topological_data_scripting

2. Using exportStl() instead of exportStep()
I can also create a mesh from the example here:
https://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Mesh_Scripting

Then, I can actually export that object from 'File-> Export -> Mesh formats' and then give it a stl extension- with no problem. The stl file opens fine in HeeksCAD.

3. However, if I create a box from Part workbench, select it and then try to export from 'File-> Export -> Mesh formats' the application crashes.

4. I also noticed that the application locks up, if I try to create a mesh by selecting a sphere, created from Part workbench and then 'create mesh from geometry' , using Mesh workbench.

Thanks for looking at this.
Dan

wmayer

2011-11-01 12:59

administrator   ~0001206

The way you try to export the STL is OK. The fact that it's working from python but not from GUI reminds me that we had this issue one or two years ago.

I have to search the forum for this...

wmayer

2011-11-01 14:42

administrator   ~0001211

Last edited: 2011-11-01 16:45

After searching for more than an hour I finally found the other bug. But unfortunately it was something different.

So, to come back to my questions: do you use OCE or OCC? Which version do you have? Have you also installed the official OCC package from the Ubuntu repos?

danielfalck

2011-11-02 03:28

reporter   ~0001212

I am using oce from June 2011 version 0.3.0, which is based on opencascade 6.5.0.
In the past, I had been using opencascade from the Ubuntu repos, but had completely removed it, when I switched over to oce.

sliptonic

2011-11-02 12:58

developer   ~0001215

Last edited: 2011-11-02 13:01

I'm using OCC from the ubuntu repos. v 6.5.0.dfsg-2

Also, just to document it here too: If I revert to revision 5048 or prior, the export works fine.

wmayer

2011-11-03 11:58

administrator   ~0001220

I just wonder if it's related to OCC 6.5.0 version (which includes also OCE). On all my systems I use OCC 6.3 as 32-bit or 64-bit but nowhere OCC 6.5.

danielfalck

2011-11-04 17:00

reporter   ~0001228

Last edited: 2011-11-04 17:04

trying to create a mesh from a Part object (like a simple sphere) crashes on me too

the really strange thing is that I can export from the python console like this:

from FreeCAD import Part
s=Gui.Selection.getSelectionEx()
s[0].Object.Shape.exportStl('test.stl')

with no problem and I do get a valid stl file

wmayer

2011-11-04 18:03

administrator   ~0001230

Internally we use different API functions for doing it in python or with the GUI.

But I guess it must be related to OCC 6.5 because as far as I can see this either happens with OCC 6.5 or OCE which is also based on OCC 6.5

wmayer

2011-11-05 20:47

administrator   ~0001257

I think this is fixed now in rev 5095.

I was able to get this crash too and according to the stack trace I found out there is a class name clash. We had the class "Vertex" for internal purposes but later Jim implemented a class with the same name.

The compiler didn't realize this because at no point the were visible to it at the same time. But at runtime it crashed because libtool exports also the symbols from the internal class to the shared library. I don't know why it doesn't crash with the PPA version I'm using.

On Windows it doesn't happen either because the symbols of the internal class aren't exported.

Issue History

Date Modified Username Field Change
2011-10-30 14:36 danielfalck New Issue
2011-10-30 18:56 unauthenticated Note Added: 0001194
2011-10-31 09:39 wmayer Note Added: 0001201
2011-11-01 03:15 danielfalck Note Added: 0001203
2011-11-01 12:59 wmayer Note Added: 0001206
2011-11-01 14:42 wmayer Note Added: 0001211
2011-11-01 16:45 wmayer Note Edited: 0001211
2011-11-02 03:28 danielfalck Note Added: 0001212
2011-11-02 12:58 sliptonic Note Added: 0001215
2011-11-02 13:01 sliptonic Note Edited: 0001215
2011-11-03 11:58 wmayer Note Added: 0001220
2011-11-04 17:00 danielfalck Note Added: 0001228
2011-11-04 17:04 danielfalck Note Edited: 0001228
2011-11-04 18:03 wmayer Note Added: 0001230
2011-11-05 20:47 wmayer Note Added: 0001257
2011-11-05 20:47 wmayer Status new => closed
2011-11-05 20:47 wmayer Resolution open => fixed
2011-11-05 20:47 wmayer Fixed in Version => 0.12