[Gtk-sharp-list] writing text into TextBuffer causes
NullReferenceExceptions and other bad things
Fri, 20 Aug 2004 23:36:56 -0600
There isnt much we can do without some code. You might want to display
the code where things are crashing. Use WriteLine's to narrow down the
line where this occurs, and show us the code that you do to manipulate
the GTK object.
Then I might be able to help. AND remember, you cannot do this code
(whatever you are doing) from another thread than the main GTK thread.
On Wed, 2004-08-18 at 20:06, Jesse S.A. Bridgewater wrote:
> I have written a chat program using Glade and Gtk# using the version of
> mono in debian unstable.
> When I send messages between clients things work sometimes but mostly I
> get a combination of these messages:
> (<unknown>:11733): Gdk-CRITICAL **: file gdkwindow-x11.c: line 2055
> (gdk_window_set_geometry_hints): assertion `window != NULL' failed
> (<unknown>:11733): Gdk-CRITICAL **: file gdkwindow-x11.c: line 1416
> (gdk_window_resize): assertion `window!= NULL' failed
> Unhandled Exception: System.NullReferenceException: Object reference not
> set to an instance of an object
> in (unmanaged) (wrapper managed-to-native) Gtk.Application:gtk_main ()
> in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main ()
> in <0x00007> Gtk.Application:Run ()
> in <0x000ce> Brunet.BrunetChatMain:Main (string)
> The offending code writes strings into a TextBuffer:
> textbufferDisplay.Insert(textbufferDisplay.EndIter,"<"+recipientBuddy.Alias+"> " );
> Console.WriteLine(a_msg );
> Can anyone tell me what I ma doing wrong?
> Gtk-sharp-list maillist - Gtkfirstname.lastname@example.org