segmentation fault when saving an stl as a brep
A segmentation fault is raised when trying to export as BREP (or STEP) a merged STL. The bug is found also when using the GUI.
gtheler@blinky:/FreeCAD_files/gmsh$ cat sphere-surf.geo
Merge "sphere-surf.stl";
Save "sphere-surf.brep";
gtheler@blinky:/FreeCAD_files/gmsh$ gdb --args gmsh sphere-surf.geo
GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gmsh...done.
(gdb) run
Starting program: /home/gtheler/bin/gmsh sphere-surf.geo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdf322700 (LWP 31202)]
[New Thread 0x7fffdeb21700 (LWP 31203)]
[New Thread 0x7fffde320700 (LWP 31204)]
[New Thread 0x7fffddb1f700 (LWP 31205)]
[Thread 0x7fffddb1f700 (LWP 31205) exited]
[Thread 0x7fffdeb21700 (LWP 31203) exited]
[Thread 0x7fffdf322700 (LWP 31202) exited]
[Thread 0x7fffde320700 (LWP 31204) exited]
Program received signal SIGSEGV, Segmentation fault. 0x00007fffeb504d5d in TopTools_IndexedMapOfShape::Clear() () from /usr/lib/x86_64-linux-gnu/libTKBRep.so.8 (gdb) where #0 0x00007fffeb504d5d in TopTools_IndexedMapOfShape::Clear() () from /usr/lib/x86_64-linux-gnu/libTKBRep.so.8 #1 (closed) 0x00007ffff6972e87 in OCC_Internals::buildShapeFromGModel (this=0x0, gm=0x7ab100) at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModelIO_OCC.cpp:40 #2 (closed) 0x00007ffff697a89a in GModel::writeOCCBREP (this=0x7ab100, fn="sphere-surf.brep") at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModelIO_OCC.cpp:1056 #3 (closed) 0x00007ffff673d005 in CreateOutputFile (fileName="sphere-surf.brep", format=35, status=false, redraw=false) at /home/gtheler/codigos/3ros/build/gmsh/Common/CreateFile.cpp:377 #4 (closed) 0x00007ffff673c619 in CreateOutputFile (fileName="sphere-surf.brep", format=10, status=true, redraw=true) at /home/gtheler/codigos/3ros/build/gmsh/Common/CreateFile.cpp:245 #5 (closed) 0x00007ffff6e78647 in gmsh_yyparse () at Gmsh.y:2675 #6 (closed) 0x00007ffff6735565 in ParseFile (fileName="sphere-surf.geo", close=true, warnIfMissing=false) at /home/gtheler/codigos/3ros/build/gmsh/Common/OpenFile.cpp:210 #7 (closed) 0x00007ffff696e778 in GModel::readGEO (name="sphere-surf.geo") at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModelIO_GEO.cpp:43 #8 (closed) 0x00007ffff673728f in MergeFile (fileName="sphere-surf.geo", warnIfMissing=false, setWindowTitle=true, setBoundingBox=true) at /home/gtheler/codigos/3ros/build/gmsh/Common/OpenFile.cpp:496 #9 (closed) 0x00007ffff67383b0 in OpenProject (fileName="sphere-surf.geo", setWindowTitle=true) at /home/gtheler/codigos/3ros/build/gmsh/Common/OpenFile.cpp:691 #10 (closed) 0x00007ffff66b4a0e in GmshFLTK (argc=2, argv=0x7fffffffe008) at /home/gtheler/codigos/3ros/build/gmsh/Common/Gmsh.cpp:349 #11 (closed) 0x00000000004015bd in main (argc=2, argv=0x7fffffffe008) at /home/gtheler/codigos/3ros/build/gmsh/Fltk/Main.cpp:47 (gdb)