[Gmsh] gmsh segfaulting on simple file

David Colignon David.Colignon at ulg.ac.be
Wed Jun 2 10:29:49 CEST 2010

On 02/06/10 10:17, Crni Gorac wrote:

> On Wed, Jun 2, 2010 at 7:55 AM, David Colignon<David.Colignon at ulg.ac.be>  wrote:

>> Hi,
>> it works perfectly over here (Gmsh 2.4.2, MacOSX), both with the GUI and on
>> the command line.
>>    [ ... ]
> Thanks Eric and David for trying meshing the file on your machines.
> However, it is still segfaulting on my machine, and later I realized
> that same happens with number of tutorial files, for example with
> t2.geo.  Don't know what could be the issue here, I'm just compiling
> the latest stable version of the source code, through simple sequence
> of "cmake /path/to/gmsh/source&&  make -j4".  The only indicator for
> some kind of problem is that I have these "Error   : Singular value
> decomposition requires LAPACK" messages printed out by gmsh before 1D
> meshing started.  I can see this issue is already mentioned on the
> mailing list, and I do have ATLAS and LAPACK properly installed on my
> machine, so I'm not sure why gmsh build script is not picking them up,
> or at least reporting an error if these are needed for gmsh to run...

Yes, CMake should refuse to build the Gmsh executable is Lapack is not detected and tested, but as long as you cannot 
indicate to CMake how to find a working Lapack library and you get the "Error   : Singular valu decomposition requires 
LAPACK" messages, you will have problems.

Have you tried

cmake -DCMAKE_PREFIX_PATH:string="/path/to/lapack/" ?

It also could be a 32/64 bit version problem ...


> In any case, I've built debug version of gmsh too ("cmake
> -DCMAKE_BUILD_TYPE=Debug ..."), and when I run gmsh within gdb, I can
> see it is segfaulting in DocRecord::Successor() method, because the
> first argument ("a") of this method gets value -1 on call from
> DocRecord::CountPointsOnHull() - then, the pointer
> "points[a].adjacent" of course gets some crazy value, and gmsh
> segfaults when trying to de-reference this pointer.  So, still seems
> to me like some kind of bug in the code: for example, I don't
> understand why DocRecord::CountPointsOnHull() is not detecting that
> DocRecord::Successor() actually returned -1 on previous call... Any
> suggestion on how to proceed to debug this?
> Regards.