Re: *** SPAM *** Re: Multi-threaded GUI

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

 



On Friday 06 October 2006 22:52, Melvin Newman wrote:
> Ok, round 30 or so....
>
> Bellow is the entire code for my callbacks that I cant seem to get working.
> I am trying to have a thread update the main window for the program. After
> much much hacking, trial, and error the code finaly compiles, however the
> program segfaults with no errors when I try to connect the
> Glib::signal_idle() (the highlighted line below).
>
> I really have no idea whats going on... Thanks to all you guys who have
> been helping me so far.

[snip]

It's not possible to say for sure since your code is not complete (there is no 
definition of the window1 class for example).  However it looks as if your 
immediate problem is that your Glib::RefPtr<window1> mainw_window smart 
pointer in the updater() function is uninitialised - it doesn't point to 
anything.  Your code will therefore blow up in the next line of code when you 
try to us it.

By the way, you still insist in using a Glib::RefPtr<> object to reference a 
class presumably derived from Gtk::Window (and therefore derived from 
Gtk::Object), and I pointed out before that you shouldn't do that.  If you 
correct the first error then you will immediately trip yourself up on this 
second one.  (Once you do initialise the main_window smart pointer to a real 
object, it will destroy it once the smart pointer goes out of scope when 
updater() returns.)

By the way, you probably ought to move this to the gtkmm list.

Chris

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux