[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 00897] Re: Segmentation fault with mgp 1.09a



On Tue, 21 May 2002 16:47:00 -0300 (ART)
"R.C.Pasianot" <boby@tdmc2.cnea.gov.ar> wrote:
>
>  I've recently got mgp-1.09a, compiled it with no troubles and seems
>  to be working fine except that I'm getting "Segmentation fault"
>  whenever I issue the -G option or its keyboard equivalent within the 
>  presentation.
>  Any ideas/patches/whatever ?.
>  Please answer to my personal email address. 
>  Thanks a lot for your attention.
>  
This problem also occurs on Debian potato but not on Debian woody.
It is an issue since mgp 1.06a.

To track down the error, you could compile mgp with debugging option -g
and call mgp from gdb. When the segfault occurs, you can see with the gdb 
command "backtrace" what functions where called.

When I did this some time ago, the error occured in the call of an Xlib function
(XTextExtents16() or so). As it is unlikely that this function is buggy, the
problem might be at a different source code location that is difficult to find
(beware that mgp is written in C rather than in C++; thus it is very likely
that there are some memory bugs and memory leaks).

If you really need this option and need to find the error, you could try the
following:

 - get some malloc debugger like libefence (shipped with all Linux distributions)
 - compile mgp with debugging option -g and linkage option -lefence
 - start mgp from gdb and see where it crashes

Christoph Dalitz