Re: ThreadPool scalability




On Mon, 9 Jun 2008, Germán Diago wrote:

 The problem is that if I don't put that lock in Gtk::Image, I get an
 error like this (that's the reason why I put it):

 GLib-GObject-ERROR **: g_type_plugin_*() invalidly modified type
 `gtkmm__GtkImage'


 I have no clue how to avoid this without a lock. Thanks for your time.

Since I've started guessing about things I don't really understand, I might as well carry on.

That looks like an initialisation error to me. It *may* be that the first time Gtk::Image is used it registers itself with the type system. One might therefore guess that if it was run simultaneously in two threads *before* it had cleanly registered itself in one, then some inter thread confict might occur.

What happens if you put a dummy call to Gtk::Image in main() before you start any threading? I would try just after Gtk::Main, something like

Gtk:: Image img("small.png");

where "small.png" is some manner of (small) image.

Charlie - Metropolis Data Consultants - 07976 028167 - 01223 763758


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