[Gmsh] Segfault during meshing
D Haley
mycae at gmx.com
Mon Apr 14 20:52:44 CEST 2014
Dear GMSH developers,
I have found that GMSH (2.8.4, installed from debian repo) segfaults
during the 2D mesh step with the following file. The file was entirely
created using GMSH's interactive editor.
The problem appears to be (but I am not certain), that somehow object
#89 is missing from the file. When it is referenced, the mesh step
crashes, with the following backtrace (sorry no debugging symbols).
#0 0x0000000000923068 in BDS_Point::del(BDS_Edge*) ()
#1 0x000000000091ec77 in BDS_Mesh::del_edge(BDS_Edge*) ()
#2 0x0000000000920c5d in BDS_Mesh::swap_edge(BDS_Edge*,
BDS_SwapEdgeTest const&) ()
#3 0x0000000000888681 in delaunayizeBDS(GFace*, BDS_Mesh&, int&) ()
#4 0x000000000086d5e7 in meshGenerator(GFace*, int, bool, bool, bool,
std::list<GEdge*, std::allocator<GEdge*> >*) ()
#5 0x0000000000867e68 in meshGFace::operator()(GFace*, bool) ()
#6 0x00000000008615f7 in GenerateMesh(GModel*, int) ()
#7 0x0000000000732d59 in GModel::mesh(int) ()
#8 0x0000000000b241db in mesh_2d_cb(Fl_Widget*, void*) ()
#9 0x00007ffff73755ba in Fl_Widget::do_callback(Fl_Widget*, void*) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#10 0x00007ffff732c1c5 in Fl_Button::handle(int) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#11 0x00007ffff732462d in ?? () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#12 0x00007ffff73260d6 in Fl::handle_(int, Fl_Window*) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#13 0x00007ffff737ac1a in fl_handle(_XEvent const&) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#14 0x00007ffff737be03 in ?? () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#15 0x00007ffff737c2a3 in fl_wait(double) () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#16 0x00007ffff7325acf in Fl::wait(double) () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#17 0x00007ffff7325bed in Fl::run() () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#18 0x00000000005bccaf in GmshFLTK(int, char**) ()
#19 0x00000000005b24f5 in main ()
(gdb)
A different input file (which i can supply upon request), from which
this minimal example was obtained, causes the following backtrace when
similarly performing the 2D step. I assume they are the same root cause,
but simply cause failures at a different location:
(gdb) bt
#0 0x00000000007f844a in reparamMeshVertexOnFace(MVertex*, GFace
const*, SPoint2&, bool) ()
#1 0x00000000008b1cb3 in buildMeshGenerationDataStructures(GFace*,
std::set<MTri3*, compareTri3Ptr, std::allocator<MTri3*> >&,
bidimMeshData&) ()
#2 0x0000000000891d30 in bowyerWatson(GFace*, int, std::map<MVertex*,
MVertex*, std::less<MVertex*>, std::allocator<std::pair<MVertex* const,
MVertex*> > >*, std::map<MVertex*, SPoint2, std::less<MVertex*>,
std::allocator<std::pair<MVertex* const, SPoint2> > >*) ()
#3 0x000000000086e1e8 in meshGenerator(GFace*, int, bool, bool, bool,
std::list<GEdge*, std::allocator<GEdge*> >*) ()
#4 0x0000000000867e68 in meshGFace::operator()(GFace*, bool) ()
#5 0x00000000008615f7 in GenerateMesh(GModel*, int) ()
#6 0x0000000000732d59 in GModel::mesh(int) ()
#7 0x0000000000b241db in mesh_2d_cb(Fl_Widget*, void*) ()
#8 0x00007ffff73755ba in Fl_Widget::do_callback(Fl_Widget*, void*) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#9 0x00007ffff732c1c5 in Fl_Button::handle(int) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#10 0x00007ffff732462d in ?? () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#11 0x00007ffff73260d6 in Fl::handle_(int, Fl_Window*) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#12 0x00007ffff737ac1a in fl_handle(_XEvent const&) ()
from /usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#13 0x00007ffff737be03 in ?? () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#14 0x00007ffff737c2a3 in fl_wait(double) () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#15 0x00007ffff7325acf in Fl::wait(double) () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#16 0x00007ffff7325bed in Fl::run() () from
/usr/lib/x86_64-linux-gnu/libfltk.so.1.3
#17 0x00000000005bccaf in GmshFLTK(int, char**) ()
#18 0x00000000005b24f5 in main ()
Thanks!
-------------- next part --------------
lc = 1 ;
Point (3) = {45.8 , 0 , 0 , lc} ;
Point (7) = {32.75 , 0 , 0 , lc} ;
Point (26) = {28.9233 , 14.2812 , 0 , lc} ;
Point (28) = {24.7358 , 18.4687 , 0 , lc} ;
Point (24) = {24.7358 , 14.2812 , 0 , lc} ;
Point (27) = {24.7358 , 10.0938 , 0 , lc} ;
Point (15) = {24.375 , 0 , 0 , lc} ;
Point (25) = {20.5484 , 14.2812 , 0 , lc} ;
Point (11) = {19.125 , 0 , 0 , lc} ;
Point (31) = {18.4688 , -24.7359 , 0 , lc} ;
Point (33) = {14.2812 , -20.5484 , 0 , lc} ;
Point (29) = {14.2812 , -24.7359 , 0 , lc} ;
Point (32) = {14.2812 , -28.9234 , 0 , lc} ;
Point (30) = {10.0938 , -24.7359 , 0 , lc} ;
Point (5) = {0 , 45.8 , 0 , lc} ;
Point (9) = {0 , 32.75 , 0 , lc} ;
Point (17) = {0 , 24.375 , 0 , lc} ;
Point (13) = {0 , 19.125 , 0 , lc} ;
Point (1) = {0 , 0 , 0 , lc} ;
Point (12) = {0 , -19.125 , 0 , lc} ;
Point (16) = {0 , -24.375 , 0 , lc} ;
Point (8) = {0 , -32.75 , 0 , lc} ;
Point (4) = {0 , -45.8 , 0 , lc} ;
Point (10) = {-19.125 , 0 , 0 , lc} ;
Point (21) = {-20.5484 , -14.2812 , 0 , lc} ;
Point (14) = {-24.375 , 0 , 0 , lc} ;
Point (23) = {-24.7358 , -10.0938 , 0 , lc} ;
Point (19) = {-24.7358 , -14.2812 , 0 , lc} ;
Point (22) = {-24.7358 , -18.4687 , 0 , lc} ;
Point (20) = {-28.9233 , -14.2812 , 0 , lc} ;
Point (18) = {-32.75 , 1 , 0 , lc} ;
Point (6) = {-32.75 , 0 , 0 , lc} ;
Point (2) = {-45.8 , 0 , 0 , lc} ;
Circle (1) = {3, 1, 5} ;
Circle (2) = {5, 1, 2} ;
Circle (3) = {2, 1, 4} ;
Circle (4) = {4, 1, 3} ;
Circle (5) = {7, 1, 9} ;
Circle (6) = {9, 1, 6} ;
Circle (7) = {6, 1, 8} ;
Circle (8) = {8, 1, 7} ;
Circle (9) = {11, 1, 13} ;
Circle (10) = {13, 1, 10} ;
Circle (11) = {10, 1, 12} ;
Circle (12) = {12, 1, 11} ;
Circle (13) = {15, 1, 17} ;
Circle (14) = {17, 1, 14} ;
Circle (15) = {14, 1, 16} ;
Circle (16) = {16, 1, 15} ;
Line (17) = {6, 18} ;
Circle (18) = {21, 19, 23} ;
Circle (19) = {23, 19, 20} ;
Circle (20) = {20, 19, 22} ;
Circle (21) = {22, 19, 21} ;
Circle (22) = {26, 24, 28} ;
Circle (23) = {28, 24, 25} ;
Circle (24) = {25, 24, 27} ;
Circle (25) = {27, 24, 26} ;
Circle (26) = {31, 29, 33} ;
Circle (27) = {33, 29, 30} ;
Circle (28) = {30, 29, 32} ;
Circle (29) = {32, 29, 31} ;
Translate {0, 0, 372.87} {
Duplicata { Line{19, 20, 21, 18}; }
}
Translate {0, 0, 372.87} {
Duplicata { Line{23, 25, 24, 22, 26, 27, 28, 29}; }
}
Line Loop(42) = {31, 32, 33, 30};
Line Loop(43) = {21, 18, 19, 20};
Line(46) = {46, 21};
Line(47) = {34, 23};
Line(48) = {36, 20};
Line(49) = {41, 22};
Line Loop(50) = {47, 19, -48, -30};
Line Loop(52) = {48, 20, -49, -31};
Line Loop(54) = {46, 18, -47, -33};
Line Loop(56) = {46, -21, -49, 32};
Line(58) = {67, 31};
Line(59) = {32, 79};
Line(60) = {74, 30};
Line(61) = {69, 33};
Line(62) = {52, 27};
Line(63) = {54, 26};
Line(64) = {47, 28};
Line(65) = {49, 25};
Line Loop(66) = {41, 58, -29, 59};
Line Loop(68) = {26, -61, -38, 58};
Line Loop(70) = {27, -60, -39, 61};
Line Loop(72) = {40, -59, -28, -60};
Line Loop(74) = {62, 25, -63, -35};
Line Loop(76) = {24, -62, -36, 65};
Line Loop(78) = {64, 23, -65, -34};
Line Loop(80) = {63, 22, -64, -37};
Line Loop(82) = {40, 41, 38, 39};
Line Loop(84) = {36, 35, 37, 34};
Translate {0, 0, -17} {
Duplicata { Line{3, 4, 2, 1}; }
}
Line(90) = {82, 4};
Line(91) = {87, 3};
Line(92) = {90, 5};
Line(93) = {80, 2};
Line Loop(94) = {87, 89, 88, 86};
Plane Surface(95) = {94};
Line Loop(102) = {1, -92, -89, 91};
Ruled Surface(104) = {102};