segfault with a particular step file
I get a segfault in Mesh/qualityMeasures.cpp:165
when trying to mesh this STEP file:
gtheler@tom:~/run/gmsh/segfault$ gdb --args gmsh -2 thing.step
GNU gdb (Debian 8.2.1-2) 8.2.1
Copyright (C) 2018 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...run
done.
(gdb) run
Starting program: /home/gtheler/bin/gmsh -2 thing.step
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Info : Running '/home/gtheler/bin/gmsh -2 thing.step' [Gmsh 4.3.0-git-7763f9079, 1 node, max. 1 thread]
Info : Started on Thu Apr 11 06:31:32 2019
Info : Reading 'thing.step'...
Info : - Label 'Shapes/PMMA v1' (3D)
Info : - Color (0.796078, 0.796078, 0.796078) (3D & Surf)
Info : Done reading 'thing.step'
Info : Meshing 1D...
Info : Meshing curve 1 (BSpline)
Info : Meshing curve 3 (BSpline)
Info : Meshing curve 4 (BSpline)
Info : Meshing curve 5 (BSpline)
Info : Done meshing 1D (0.089459 s)
Info : Meshing 2D...
Info : Meshing surface 1 (BSpline surface, MeshAdapt)
Program received signal SIGSEGV, Segmentation fault.
0x0000555555c9c3a0 in qmTriangle::gamma (xa=@0x555556a1b170: 56.5, ya=@0x555556a1b178: 0,
za=@0x555556a1b180: 1.5612511283791701e-17, xb=@0x555556a581a0: 53.566619786838757,
yb=@0x555556a581a8: 1.5676540220274933, zb=@0x555556a581b0: 8.8984503648159077, xc=<error reading variable>,
yc=<error reading variable>, zc=<error reading variable>)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/qualityMeasures.cpp:165
165 double a[3] = {xc - xb, yc - yb, zc - zb};
(gdb) where
#0 0x0000555555c9c3a0 in qmTriangle::gamma (xa=@0x555556a1b170: 56.5, ya=@0x555556a1b178: 0,
za=@0x555556a1b180: 1.5612511283791701e-17, xb=@0x555556a581a0: 53.566619786838757,
yb=@0x555556a581a8: 1.5676540220274933, zb=@0x555556a581b0: 8.8984503648159077, xc=<error reading variable>,
yc=<error reading variable>, zc=<error reading variable>)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/qualityMeasures.cpp:165
#1 0x0000555555c9c9b8 in qmTriangle::gamma (p1=<optimized out>, p2=<optimized out>, p3=<optimized out>)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/qualityMeasures.cpp:136
#2 0x0000555555bdf57f in edgeSwapTest (gf=0x555556a51d90, e=0x555556a551f0)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFaceBDS.cpp:155
#3 swapEdgePass (gf=gf@entry=0x55555692f400, m=..., nb_swap=@0x7fffffffb860: 1, t=@0x7fffffffb7c0: 9.3000000000009742e-05,
FINALIZE=FINALIZE@entry=0, orientation=orientation@entry=1)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFaceBDS.cpp:203
#4 0x0000555555be177f in refineMeshBDS (gf=gf@entry=0x55555692f400, m=..., NIT=-10,
computeNodalSizeField=computeNodalSizeField@entry=false, recoverMapInv=recoverMapInv@entry=0x0,
recoverMap=recoverMap@entry=0x7fffffffbab0, true_boundary=0x7fffffffba10)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFaceBDS.cpp:861
#5 0x0000555555bceea5 in meshGeneratorPeriodic (gf=0x55555692f400, RECUR_ITER=0,
repairSelfIntersecting1dMesh=<optimized out>, debug=false)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFace.cpp:2649
#6 0x0000555555bd14be in meshGFace::operator() (this=this@entry=0x7fffffffdd36, gf=gf@entry=0x55555692f400,
print=print@entry=true) at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFace.cpp:2930
#7 0x0000555555a1f7c1 in GFace::mesh (this=0x55555692f400, verbose=<optimized out>)
at /home/gtheler/codigos/3ros/build/gmsh/Geo/GFace.cpp:1551
#8 0x0000555555bb6a60 in Mesh2D (m=0x555556888c20) at /usr/include/c++/8/bits/stl_vector.h:930
#9 GenerateMesh (m=m@entry=0x555556888c20, ask=2) at /home/gtheler/codigos/3ros/build/gmsh/Mesh/Generator.cpp:1084
#10 0x0000555555a518e9 in GModel::mesh (this=this@entry=0x555556888c20, dimension=<optimized out>)
at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModel.cpp:889
#11 0x00005555558bd93a in GmshBatch () at /home/gtheler/codigos/3ros/build/gmsh/Common/GmshGlobal.cpp:331
#12 0x00005555558be4ff in GmshMainFLTK (argc=3, argv=0x7fffffffe118)
at /home/gtheler/codigos/3ros/build/gmsh/Common/GmshGlobal.cpp:489
#13 0x00007fffeec0c09b in __libc_start_main (main=0x5555558b1140 <main(int, char**)>, argc=3, argv=0x7fffffffe118,
--Type <RET> for more, q to quit, c to continue without paging--
init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe108)
at ../csu/libc-start.c:308
#14 0x00005555558bcb4a in _start () at /usr/include/c++/8/bits/char_traits.h:287
(gdb)