Okay, so I don't know whether SVN is stable on Linux right now or if it's my drivers (I'm not 100% sure how stable the drivers are) but I thought I'd check here for some help. 0.9.0 works fine, but I was hoping to use some of the new stuff early. If it turns out to be a problem, it's no biggie, I just want to get this resolved (on my end) before 0.9.1 is released.
I'm running Debian (Lenny) Linux on an ASUS EEE PC, using mono 1.9, though 1.2.6 had similar problems. The ASUS EEE PC has an underclocked 900MHz processor, 800x480 screen and GMA900 graphics card. It might be exposing an edge case, or it could be my setup.
I get two errors. The first is when I run the examples, I get random segfaults that are fairly random. The examples all work, (well, the ones my graphics card supports do), but sometimes when I start up an example, the program crashes. Here's the head of the error report. I'll post more if you think it's useful:
Launching example: Examples.WinForms.W02_Immediate_Mode_Cube Display: 138706688, Screen: 0, RootWindow: 105 Creating GraphicsContext. GraphicsMode: Index: 37, Color: 32 (8888), Depth: 24, Stencil: False, Samples: 0, Accum: 0 ( indexed), Buffers: 2, Stereo: False IWindowInfo: X11.WindowInfo: Display 138706688, Screen 0, Handle 35652074, Parent: (null) Chose visual: id (37), screen (0), depth (24), class (TrueColor) Creating OpenGL context: direct, not shared... Stacktrace: at (wrapper managed-to-native) OpenTK.Platform.X11.Glx.CreateContext (intptr,OpenTK.Platform.X11.XVisualInfo&,intptr,bool) <0x00004>
It appears to originate in the GLControl() constructor
The second error is segfault that appears when I let a program involving a GameWindow() close. Here's some Boo code that reproduces it:
import OpenTK import System import System.Threading window = GameWindow() window.Dispose() window = null print "Finished.\n" GC.Collect(2) print "Collected.\n"
It prints out both "Finished." and "Collected." but then segfaults. It doesn't matter if I don't include the Dispose() call or the GC collection. Depending on variations of the program, I get different error messages, but I think this is the important part of the stack trace:
at (wrapper managed-to-native) OpenTK.Platform.X11.Glx.MakeCurrent (intptr,intptr,intptr) <0x00004> at (wrapper managed-to-native) OpenTK.Platform.X11.Glx.MakeCurrent (intptr,intptr,intptr) <0xffffffff> at OpenTK.Platform.X11.X11GLContext.Dispose (bool) <0x00027> at OpenTK.Platform.X11.X11GLContext.Finalize () <0x0000f>
Looking at the code, it appears that the Glx.MakeCurrent call is being called on currentWindow.Display when the currentWindow.Display is somehow invalid. So it must be that the finalizer is assuming deterministic finalization and not getting it. But further than that, I don't understand the control flow enough to figure out where to look to fix it.