[Gmsh] bug in 2.04/5 and works fine in 1.65

Christophe Prud'homme prudhomm at debian.org
Fri Apr 6 16:54:49 CEST 2007


[ Tuesday 27 March 2007 ]
| Christophe Prud'homme wrote:
| > [ Sunday 25 March 2007 ]
| >
| > | Weird, works fine over here (on Mac, Windows and Linux)... Does the
| > | version available on our website also crash?
| >
| > it runs fine with the version on the website
| >
| > here are the flags I use to configure gmsh
| >
| > CC="gcc" CXX="g++" CFLAGS="-m32 -Wall  -O2 "
| > CXXFLAGS="-m32 -Wall  -O2" ./configure --host=i486-linux-gnu \
| > --build=i486-linux-gnu --prefix=/usr --mandir=\${prefix}/share/man \
| > --infodir=\${prefix}/share/info  --disable-metis --disable-tetgen
| >
| >
| > is something wrong with this command line?
|
| I don't see anything wrong... We mostly use gcc 3.4.X (Windows) and
| 4.0.X (Linux and Mac), but we also tested with gcc 4.1.2 on Ubuntu and
| didn't encounter any problems.
|
| Maybe forcing 32 bit mode makes the robust predicates code
| (Numeric/predicates.cpp) go wild?
|
| Can you run the code in gdb and send a backtrace?
Christophe,


I changed the flags and used

 1- -g only 
 2- -g -O2 

with 1- no problem/no crash
with 2- I get a crash

attached you will find  the backtrace and the geo file

Best regards
C.
-- 
Debian Developer - http://people.debian.org/~prudhomm/
Scientific computing packages maintainer
Fingerprint = 3703 50DE 7A9F 024E 0F26  0D07 A18F B40B D4BE 1450
-------------- next part --------------
a=0;
b=1;
c=0;
d=1;
e=0;
f=1;
h=0.05;
Point(1) = {a,c,e,h};
Point(2) = {b,c,e,h};
Point(3) = {b,d,e,h};
Point(4) = {a,d,e,h};
Line(1) = {1,4};
Line(2) = {4,3};
Line(3) = {3,2};
Line(4) = {2,1};
Line Loop(5) = {3,4,1,2};
Plane Surface(6) = {5};

Extrude Surface {6, {0,0,f-e} } {
  Layers { {1/h}, {32}, {1.0} };
};
Physical Line(1) = {1};
Physical Line(2) = {2};
Physical Line(3) = {3};
Physical Line(4) = {4};
Physical Surface(1) = {28};
Physical Surface(2) = {6,15,19,23,27};
Physical Volume(30) = {32};
-------------- next part --------------
[New Thread -1219606304 (LWP 23131)]
Info    : Increasing process stack size (8192 kB < 16 MB)
Info    : '/usr/bin/gmsh -3 Simplex_3_1.geo ' started on Fri Apr  6 16:51:27 2007
Info    : Reading 'Simplex_3_1.geo'
Warning : 'Simplex_3_1.geo', line 20 : Explicit region numbers in layers are deprecated
Info    : Read 'Simplex_3_1.geo'
Info    : Meshing 1D...
Info    : Meshing curve 1
Info    : Meshing curve 2
Info    : Meshing curve 3
Info    : Meshing curve 4
Info    : Meshing curve 8
Info    : Meshing curve 9
Info    : Meshing curve 10
Info    : Meshing curve 11
Info    : Meshing curve 13
Info    : Meshing curve 14
Info    : Meshing curve 18
Info    : Meshing curve 22
Info    : Mesh 1D complete (0 s)
Info    : Mesh
Info    : Meshing 2D...
Info    : Meshing surface 6 (Plane)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1219606304 (LWP 23131)]
quality_triangle (p1=0x8456ee0, p2=0x8457180, p3=0x0) at BDS.cpp:114
114                     (p1->Z - p3->Z) * (p1->Z - p3->Z));
(gdb) bt
#0  quality_triangle (p1=0x8456ee0, p2=0x8457180, p3=0x0) at BDS.cpp:114
#1  0x080d9708 in edgeSwapTestQuality (e=0x845ae50, fact=3) at meshGFace.cpp:200
#2  0x080da602 in RefineMesh (gf=0x844f220, m=@0x8456d80, NIT=10) at meshGFace.cpp:393
#3  0x080dc23b in gmsh2DMeshGenerator (gf=0x844f220, debug=false) at meshGFace.cpp:875
#4  0x080dffc3 in meshGFace::operator() (this=0xbfcd4dfc, gf=0x844f220) at meshGFace.cpp:1524
#5  0x080d6dbf in std::for_each<std::_Rb_tree_const_iterator<GFace*>, meshGFace> (__first={_M_node = 0x844d930}, __last={_M_node = 0x8437b24},
    __f={<No data fields>}) at /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/bits/stl_algo.h:159
#6  0x080d523a in Mesh2D () at Generator.cpp:221
#7  0x080d6c0f in GenerateMesh (ask=3) at Generator.cpp:295
#8  0x08052970 in main (argc=3, argv=0xbfcd4f84) at Main.cpp:138
(gdb) frame 1
#1  0x080d9708 in edgeSwapTestQuality (e=0x845ae50, fact=3) at meshGFace.cpp:200
200       double qa1 = quality_triangle(e->p1, e->p2, op[0]);
(gdb) frame 2
#2  0x080da602 in RefineMesh (gf=0x844f220, m=@0x8456d80, NIT=10) at meshGFace.cpp:393
393                   int result = edgeSwapTestQuality(*it,3);
(gdb) frame 3
#3  0x080dc23b in gmsh2DMeshGenerator (gf=0x844f220, debug=false) at meshGFace.cpp:875
875           RefineMesh (gf,*m,10);
(gdb)