gtkmaxgui throwing signal 11

BlitzMax Forums/Brucey's Modules/gtkmaxgui throwing signal 11

Blueapples(Posted 2008) [#1]
Hey, I am getting an unhandled signal 11 in some of my apps when compiling with the current gtkmaxgui on Ubuntu 8.04. I'm not sure how to debug this further, but the crash happens on a call to WaitEvent(). I'm having a hard time reproducing, but just wanted to throw it out there to see if anyone else has run into this. I will post a screenshot or dump if I can get one.


Brucey(Posted 2008) [#2]
One of the "problems" with BlitzMax is that it "wraps" some of the low level signals so that they are caught and throw an exception instead. Which is fine, until you want to know exactly where the error occurred.

It traps the SIGSEV signal, so tools such as gdb won't be able to show you *where* the segfault happened.
If you comment out, in appstub.linux.c :
	signal( SIGSEGV,sighandler );

build mods, and run again, the app should segfault without the exception you are currently getting.

It's then just a case of running the app via gdb, where you should be able to backtrace on the sigsev, and find out what *exactly* is breaking.

Obviously, I would consider this *advanced*, use, and only something you'd want to try if you knew what you were doing down there to start with ;-)
One thing to note is that gdb can appear to lock up when running GTK code. You can sometimes get around it by ctrl-c'ing -> continue -> ctrl-c -> continue, a few times. Or, kick off the app, and *then* run gdb using the "pid" option.

As I said, it's advanced stuff to fiddle about with, and you may not want to dirty your hands down there :-)


slenkar(Posted 2008) [#3]
Im having the same crash but on the Flip command,
when I use the debugger to see where the crash happened its on the line..

bbglgraphicsflip sync

in glgraphics.bmx


Blueapples(Posted 2008) [#4]
Now I just got it from a call to CreateWindow(). No idea why this is happening... I should probably do the debugging thing but it's too late right now, I'm too tired.

This is the code that's crashing on the first call to CreateWindow.

publish.bmx - main code file


mainWindow.bmx


By the way, GUIde works great under Wine. :)


SebHoll(Posted 2008) [#5]
Hi,

This is the code that's crashing on the first call to CreateWindow.

In your code, you are importing MaxGUI.Drivers (i.e. the official MaxGUI driver set, which is MaxGUI.FLTKMaxGUI for Linux), not BaH.GTKMaxGUI.

Regardless, I tried compiling the example using my Ubuntu 8.04 PC with the latest version of MaxGUI checked out of the MaxGUI SVN Repository and it runs perfectly (don't forget to Build Modules after checking anything out of SVN).


Blueapples(Posted 2008) [#6]

In your code, you are importing MaxGUI.Drivers (i.e. the official MaxGUI driver set, which is MaxGUI.FLTKMaxGUI for Linux), not BaH.GTKMaxGUI.



Ah good point. It seems to be a lower level problem than GTKMaxGUI then in that case.

I don't really want to use the SVN version, but I will I guess.


Blueapples(Posted 2008) [#7]
Well... I don't know what to say. I got it again after checking out the svn MaxGUI source, rebuilding modules, and now trying the GTK module on top of that again. The exact error message is:

Unhandled Exception:appstub.linux signal handler 11


This is dying on the call to WaitEvent(). I have made minor control position changes - nothing that should make a difference in this behavior.