Re: UI hangs while updating



Hi,

Actually, the application is not multithreaded, at least not intentionally. I've got the RFID code in a separate object, but that object is instantiated in the MainWindow thread. However, when running the application through gdb, I noticed that it did spawn multiple threads. Does gtkmm using multithreading under the hood?

I wasn't able to get much more information out of gdb. With a breakpoint on g_log, the backtrace shows three steps through the gtk libraries and then gives the "corrupt stack?" message.

Thanks,
Jason

On 12/03/2015 12:43 AM, Andrew E. Makeev wrote:
I suppose your application is multithreaded.

RFID reader and GTK main loop should be runned in same thread. Otherwise
you should use Glib::Dispatcher to deliver events (signals) from thread
that read RFID tag to GTK thread (that update graphics).

В Срд, 02/12/2015 в 14:52 -0700, Jason Calhoun пишет:
Hi,

I'm developing an application using gtkmm-3.0, and running into a bug
with the UI I haven't been able to track down.  I've never used GTK or
gtkmm before, and haven't done any real development on linux either.

The application uses a Phidgets RFID reader to read an RFID tag, and
display some information on a simple UI.  The problem is that the UI
seems to freeze at some point while handling events.  Once the UI is
hung, I can close the window, at which point I get the error at the
console "GLib-CRITICAL **: Source ID XXX was not found when attempting
to remove it".  This warning or error occurs only in cases when the UI
has hung.  However, even with the UI apparently hung, the application
continues to run, it can still read tags and output to the console, for
instance.  Also, I've noticed this problem only on the target platform,
which is a Raspberry Pi running the Ubuntu MATE distribution available
on raspberrypi.org.  I haven't been able to duplicate it on my desktop
machine, which is running slightly older versions of the glibmm and
gtkmm libraries.

I use the event handlers defined by the Phidgets library to emit sigc
signals so I can handle those events in the application's main window.
In the signal handlers, there are a few simple calls to update the UI,
such as using the set_text method to update the text in a label, and
display or clear an image.  I use the built in timeout signal to display
a clock, and reset the display after a certain period of time.

I'm not sure if the UI freeze is due to some error in my code, or due to
an error in the gtk/glib libraries somewhere.  I would appreciate any
help anyone can offer.  I can provide code samples and/or more details
as needed.

Can anyone help?


Thanks,
Jason





_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
https://mail.gnome.org/mailman/listinfo/gtkmm-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]