serinox's picture

GLWidget in a Gtk.Notebook cause app to crash.

System info asked for in the getting help FAQ.

operating system : OpenSuse running 64bit.
graphics card/driver version : Quadro FX 1600m Driver version 185.18.36
processor/ ram info : intel centrino duo 2gig ram @ 2.4 ghz

mono --version : Mono JIT compiler version 2.4.2.3
monodevelop version : MonoDevelop Ide 2.1.0.0

opentk version : using opentk from svn (updated this morning).

Anyways like the topic says when I add the glwidget to a Gtk.Notebook (basically a tabbed group for those unfamiliar with it) the application crashes with a SIGSEGV (see attached files for error text) if I just post the glwidget to the form it works fine. Has anybody else come across this or can anybody tell me why it's happening/ how to fix it?

sample code of the application that causes a crash attached.

the glwidget code is from JTaltons post on this page

AttachmentSize
MainWindow.cs1.6 KB
crash.txt5.98 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Have you tried the workaround posted on that thread? Just make sure that the Console.WriteLine() is the very first line of code executed in your program - this allows OpenTK to initialize X with threading support before GTK takes hold of the server.

(Yes, we'll add a proper solution to initialize OpenTK, but I don't think there's any way around the "very first line of code" part. I'm far from an X expert, however).

serinox's picture

Ok I had that line in but it was in the main window class. now that I've moved it before the Application.Init() call in the main class it works fine. I thought it just had to go before any opentk code. Thanks for the help.