[Gambas-devel] signal 11 when rendering graphics using gb.image

Benoît Minisini gambas at ...1...
Mon Dec 20 05:16:20 CET 2010

> On 12/19/2010 10:18 PM, Benoît Minisini wrote:
> > No information there. I need a valgrind output when the program crashes.
> > 
> > When the program does an illegal memory access, valgrind does not
> > necessarily stops it as the kernel does. It ignores it, displays the
> > error, and tries to continue. When it really cannot continue, it stops
> > and dumps a "vgcore" file.
> > 
> > You must find a way to reproduce the crash, and then run valgrind to get
> > the information on it.
> I understand; good info. I am beginning to suspect that the crash only
> occurs on subsequent runs within a GAMBAS IDE session, but not on the
> first run. It happens pretty frequently while developing it, but doesn't
> seem to have happened once while using valgrind. I noticed that the
> valgrind command doesn't bring up the GAMBAS IDE, but runs the app
> directly. Is there a way to get valgrind to just bring up the GAMBAS IDE
> so I can continually start and stop the app until it crashes?
> Just guessing here, but based on the amount of time that elapses before
> it crashes it appears that the crash is related to either a DrawingArea
> control or the Image.Draw method. It happened before the DrawAlpha
> method, so that is ruled out. I may try setting a breakpoint right
> before the graphics are rendered and stepping through the code with F8
> to identify the crash point. That would at least narrow it down should
> the crash not occur using valgrind.

The IDE is not really needed (well, it *should* not). The only difference is 
that the IDE run the interpreter in debugging mode.

So, do that instead, to see if you get a crash inside valgrind:

$ cd /yyyy/Sanctimonia
$ valgrind --tool=memcheck --num-callers=50 gbx3 -g

And when you get the interpreter debugger prompt, type "g" + RETURN.

Benoît Minisini

More information about the Devel mailing list