Hi,<div><br></div><div>I have developed a GTK# (Glade) app on windows that I am now trying to get to work on OS X 10.5. &nbsp;It works well on windows but on OS X it randomly fails with the un-catchable Exception below. &nbsp;I believe that the first bunch of errors are because of the GTK theme that I am using (the one that comes with Mono), I think those errors are because the scroll bars that are present in my app do not show up right. &nbsp;The GLib and Gdk stuff confuses me, especially the GDK_IS_DRAWABLE assertion because I make that the first line in any event handler for an expose method sets the object to app paintable.&nbsp;</div>
<div><br></div><div>Now for a little bit of background on what I am doing so that I can tell you the circumstances of the un-catchable exception. &nbsp;My program places various object onto the screen (a GTKDrawingArea which a cairo context is gotten from so that I can draw into that) &nbsp;and it also has a table of GTK widgets which&nbsp;represent&nbsp;that object, its X location its Y location etc, those widgets get put into and pulled out of a table by the objects themselves, therefore when a new object is created first a message is sent to redraw the GTKDrawingArea then get the Cairo Context then clear the GTKTable of all of its widgets, load in the new widgets then draw the object. &nbsp;when this exception is thrown the table is half emptied... and nothing new is drawn onto the screen, but the old stuff is still there. &nbsp;As you can see the stack trace does not point to a single line of my code except for the Application.Run() command. &nbsp;Now here is the really intriguing part there is no set of steps that causes this error to occur, it occurs totally at random, there isn&#39;t one kind of object that causes it, or any amount of time running the program, its just out of no-where. &nbsp;Any help I could get would be great, also if this is just a problem on OSX tell me please, because my main two targets for this program are Windows and Linux, OSX is more or less an after-thought.</div>
<div><br></div><div>Billy</div><div><br></div><div>The un catchable exception (stack trace at the bottom) shows&nbsp;</div><div><br></div><div><div>Sun Apr &nbsp;6 14:41:43 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div>
<div>Sun Apr &nbsp;6 14:41:43 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div><div>Sun Apr &nbsp;6 14:41:43 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div>
<div>Sun Apr &nbsp;6 14:41:43 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div><div>Sun Apr &nbsp;6 14:41:59 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div>
<div>Sun Apr &nbsp;6 14:41:59 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div><div>Sun Apr &nbsp;6 14:41:59 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div>
<div>Sun Apr &nbsp;6 14:42:01 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div><div>Sun Apr &nbsp;6 14:42:01 billy-schoenbergs-macbook.local mono[3482] &lt;Error&gt;: CGBitmapContextGetBitsPerPixel: invalid context</div>
<div><br></div><div>(Open Dialect:3482): GLib-GObject-WARNING **: invalid cast from `GtkCellView&#39; to `GdkWindow&#39;</div><div><br></div><div>(Open Dialect:3482): Gdk-CRITICAL **: gdk_drawable_get_colormap: assertion `GDK_IS_DRAWABLE (drawable)&#39; failed</div>
<div><br></div><div>(Open Dialect:3482): GLib-GObject-WARNING **: invalid cast from `GtkCellView&#39; to `GdkWindow&#39;</div><div><br></div><div>(Open Dialect:3482): Gdk-CRITICAL **: gdk_drawable_get_colormap: assertion `GDK_IS_DRAWABLE (drawable)&#39; failed</div>
<div><br></div><div>(Open Dialect:3482): GLib-GObject-WARNING **: invalid cast from `GtkCellView&#39; to `GdkWindow&#39;</div><div>Stacktrace:</div><div><br></div><div>&nbsp;&nbsp;at (wrapper managed-to-native) Gtk.Application.gtk_main () &lt;0x00004&gt;</div>
<div>&nbsp;&nbsp;at (wrapper managed-to-native) Gtk.Application.gtk_main () &lt;0xffffffff&gt;</div><div>&nbsp;&nbsp;at Gtk.Application.Run () &lt;0x0000a&gt;</div><div>&nbsp;&nbsp;at Open_Dialect.MainWindow..ctor () [0x00167] in /Users/Billy/Desktop/Works on Mac/Open Dialect GTK/Open Dialect/Open Dialect/Forms and View/MainWindow.cs:78</div>
<div>&nbsp;&nbsp;at Open_Dialect.Program.Main (string[]) [0x00000] in /Users/Billy/Desktop/Works on Mac/Open Dialect GTK/Open Dialect/Open Dialect/Program.cs:12</div><div>&nbsp;&nbsp;at (wrapper runtime-invoke) Open_Dialect.Program.runtime_invoke_void_string[] (object,intptr,intptr,intptr) &lt;0xffffffff&gt;</div>
<div><br></div></div>