gtkmaxgui throwing signal 11

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

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.

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 :-)

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

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
Import MaxGUI.Drivers

Include "mainWindow.bmx"

MainWindow_Create()

Repeat
	Select WaitEvent()
		Case EVENT_GADGETACTION						' interacted with gadget
			MainWindow_DoGadgetAction()
		Case EVENT_WINDOWCLOSE						' close gadget
			Exit
	End Select
Forever


mainWindow.bmx
'GUIde 1.4 BlitzMAX export

Global MainWindow:TGadget
Global lstFiles:TGadget
Global lblLabel0:TGadget
Global lblLabel1:TGadget
Global btnPublishSelected:TGadget
Global btnPublishAll:TGadget
Global btnProjectSet:TGadget
Global lstPublish:TGadget

Function MainWindow_Create()
	MainWindow=CreateWindow("Publish",0,00,162,227,Desktop(),WINDOW_TITLEBAR|WINDOW_RESIZABLE)
	lstFiles=CreateListBox(0,40,152,128,MainWindow)
		AddGadgetItem lstFiles,"item0"
		SelectGadgetItem lstFiles,0
	SetGadgetLayout lstFiles,1,1,1,1
	lblLabel0=CreateLabel("Project:",0,8,40,16,MainWindow,0)
	SetGadgetLayout lblLabel0,1,0,1,0
	lblLabel1=CreateLabel("Publish:",8,176,40,16,MainWindow,0)
	SetGadgetLayout lblLabel1,1,0,2,1
	btnPublishSelected=CreateButton("Selected",56,176,56,24,MainWindow,BUTTON_PUSH)
	SetGadgetLayout btnPublishSelected,2,1,2,1
	btnPublishAll=CreateButton("All",120,176,32,24,MainWindow,BUTTON_PUSH)
	SetGadgetLayout btnPublishAll,2,1,2,1
	btnProjectSet=CreateButton("Set...",48,8,96,24,MainWindow,BUTTON_PUSH)
	SetGadgetLayout btnProjectSet,1,0,1,0
	lstPublish=CreateListBox(0,40,152,128,MainWindow)
		AddGadgetItem lstPublish,"item0"
		SelectGadgetItem lstPublish,0
	SetGadgetLayout lstPublish,1,1,1,1
EndFunction
'-mainloop--------------------------------------------------------------



'-gadget actions--------------------------------------------------------

Function MainWindow_DoGadgetAction()
	Select EventSource()
		Case btnPublishSelected	' user pressed button

		Case btnPublishAll	' user pressed button

		Case btnProjectSet	' user pressed button

	End Select
End Function


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

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).


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.

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.