[Gtk-sharp-list] Bug in Gtk.ExposeEvent versus Gtk.Realized event

Anders Rune Jensen anders at iola.dk
Wed Dec 12 15:14:01 EST 2007

On Dec 12, 2007 8:36 PM, Cody Russell <bratsche at gnome.org> wrote:
> Hi Anders,

Interesting report Cody, seems something is really fishy here.

> Out of curiosity, what kind of errors were you getting?  Because I got
> something like "Xlib: unexpected async reply (sequence 0x3a296)!"
> recently when changing a Gdk.Cursor.  Just earlier this week, actually.

Yeah, it's exactly those. Sometimes app would just crash without any
trace, but mostly it would be this Xlib: async error.

> The weird thing was that we were doing something like:
> widget.GdkWindow.Cursor = some_boolean_test ? new Gdk.Cursor
> (CursorType.SbHDoubleArrow) : null;
> And when I changed it from ?: to if/else (for the purpose of doing some
> Console.WriteLine() debugging) then it fixed the issue.  Really, really
> strange.  I wondered if Mono generates code significantly different
> for ?: and if/else.

Have you looked at the IL generated? Although I don't think this is
the problem. If the error is as random as the one I had, you'll have
to be careful about what you think the problem is. I had to do between
10-200 redraws before I could reproduce the bug and thus sometimes the
bug looked at though it was gone, even though it wasn't.

Anders Rune Jensen

More information about the Gtk-sharp-list mailing list