[Gtk-sharp-list] Strange GTK# errors on Mono 1.9 and OSX
Billy Schoenberg
waschoen at syr.edu
Sun Apr 6 09:24:50 EDT 2008
Hi,
I have developed a GTK# (Glade) app on windows that I am now trying to get
to work on OS X 10.5. It works well on windows but on OS X it randomly
fails with the un-catchable Exception below. 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. 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.
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. My program places various
object onto the screen (a GTKDrawingArea which a cairo context is gotten
from so that I can draw into that) and it also has a table of GTK widgets
which represent 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. 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. As you can see the stack
trace does not point to a single line of my code except for the
Application.Run() command. 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't one kind of object that causes it, or any amount of time
running the program, its just out of no-where. 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.
Billy
The un catchable exception (stack trace at the bottom) shows
Sun Apr 6 14:41:43 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:41:43 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:41:43 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:41:43 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:41:59 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:41:59 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:41:59 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:42:01 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
Sun Apr 6 14:42:01 billy-schoenbergs-macbook.local mono[3482] <Error>:
CGBitmapContextGetBitsPerPixel: invalid context
(Open Dialect:3482): GLib-GObject-WARNING **: invalid cast from
`GtkCellView' to `GdkWindow'
(Open Dialect:3482): Gdk-CRITICAL **: gdk_drawable_get_colormap: assertion
`GDK_IS_DRAWABLE (drawable)' failed
(Open Dialect:3482): GLib-GObject-WARNING **: invalid cast from
`GtkCellView' to `GdkWindow'
(Open Dialect:3482): Gdk-CRITICAL **: gdk_drawable_get_colormap: assertion
`GDK_IS_DRAWABLE (drawable)' failed
(Open Dialect:3482): GLib-GObject-WARNING **: invalid cast from
`GtkCellView' to `GdkWindow'
Stacktrace:
at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004>
at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff>
at Gtk.Application.Run () <0x0000a>
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
at Open_Dialect.Program.Main (string[]) [0x00000] in
/Users/Billy/Desktop/Works on Mac/Open Dialect GTK/Open Dialect/Open
Dialect/Program.cs:12
at (wrapper runtime-invoke)
Open_Dialect.Program.runtime_invoke_void_string[]
(object,intptr,intptr,intptr) <0xffffffff>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20080406/4a98f52a/attachment.html
More information about the Gtk-sharp-list
mailing list