[Gmsh] segmentation violation in gmesh

Christophe Geuzaine geuzaine at acm.caltech.edu
Thu May 22 21:24:04 CEST 2003


Robert Permann wrote:
> Hello,
> I received following message:
> 
> Fatal Error : Segmentation violation (invalid memory reference)
> Plane Surface 16963 (4 points)
>             : ------------------------------------------------------
>             : You have discovered a bug in Gmsh! You may report it
>             : by e-mail (together with any helpful data permitting to
>             : reproduce it) to gmsh at geuz.org 
> 
> It appears after I load a .geo file with 5820 Points and the surface
> over these points (attachment). When I push the Volume-Button to create
> a Volume in the Gmesh-GUI, this message appears.
> I have tried it under Linux and WinXP, everywhere the same.
> Under WinXP I have increased "heap_chunk_in_mb" but that doesn't work.
> 

Robert - As a temporary fix, just increase the value of 'BUFFSIZE' in
'Geo/Geo.cpp' (I tested with '#define BUFFSIZE 128000'). I will code a
more general fix as soon as I have some spare time.

Also, in order to speed up the parsing of the file, you should flatten
the geometry, e.g. with 'gmsh grey1_h.mat.geo -0 > new.geo', and
continue your modifications in 'new.geo'. Every time you define a new
variable in 'grey1_h.mat.geo' ('p1_10 = newp;', etc.) the code has to
perform a search in a list of existing variables to see if the variable
has been previously defined. With several thousands of variables, this
becomes really slow...

Christophe

PS: your case is really on the edge on what the geometry module is
designed for--you are actually representing a (pretty large) mesh using
CAD primitives... For such a case, you should really use some kind of
mesh as an input (STL, etc.) instead of thousands of geometrical
surfaces. Gmsh does not fully support this yet, but, if you want to
contribute, some initial work has already been done by Jean-Francois.

BTW, Jean-Francois: how usable is your "Triangulation Surface" code? I
tried it on a couple of examples, but, besides displaying the surface,
all meshing operations fail.

-- 
Christophe Geuzaine

Tel: (626) 395-4552    http://www.geuz.org
Fax: (626) 578-0124    mailto:geuzaine at acm.caltech.edu