[Gtk-sharp-list] GTK# app "hanging"

Manuel Capinha Manuel Capinha <mcapinha@gmail.com>
Tue, 22 Feb 2005 10:46:49 +0000

Hi all.

I wrote a small GTK# app using Glade#, running on Mono in Linux. This
app is very simple: it monitors a MySQL table and whenever there's a
new row it updates one of two images and adds a new line to a

The watcher object is threaded and is responsible for updating the
images. This is done by creating a WebRequest object that points to
the image in a webserver. The Gdk.Image object is updated with:

    image.Pixbuf = new Gdk.Pixbuf(request.GetResponse().GetResponseStream());

Besides updating these image objects the watcher thread also adds a
new line to the TreeView for each new record in the database.

The problem is that while this works most of the time, sometimes the
whole app "hangs". The thread is still running and is printing
messages to the Console but the GUI becomes unresponsive. Dragging
another window over my app causes it to become grey and everything
disappears. There's no error message in the console.

Does anyone have a sugestion to where I may start looking for the
problem ? I tried synchronizing the image updates, to ensure that they
are not happening simultaneously with a lock block, but it had no

I've also got another problem: under Win32 the gui is only updated if
the app window is focused, I'm not sure if these two are related ?

Thanks in advance,