Re: [gtkmm] Regressions in GTKMM after change to libsigc++-1.9.1X [Was: sigc::connection as member of widget]



On Thursday 11 March 2004 17:54, Andris Pavenis wrote:
> I had in my application sigc::connection as member of my class derived
> from Gtk::Widget (not directly, there were some intermediate classes).
> Value to it has been assigned to
>   
> Glib::signal_timeout().connect(sigc::connection(*this,&some_member_function
>...),100) All worked, while libsigc++-1.2.X were used (of course then
> SigC::Connection were used instead). Upgrade to latest development versions
> of gtkmm (now gtkmm-2.3.5. libsigc++-1.9.15) caused Glib critical error
> message or SIGSEGV in destructor.
>
> I know that it's not really needed to save a connection in such case,
> unless I want to close it earlier before destructor, but anyway I think it
> should not crash.

Found more crashes after I removed sigc::connection from my classes. For 
example I want to show CCD camera image in separate window. The main 
application window is one from which I can control all (eg. set exposure 
etc). For that I create window for showing CCD camera image with new and put
needed widgets for showing image into it (not modal window). So application 
has 2 toplevel windows. Desctructor of main window (control one) destroys 
also window for CCD camera image. It worked without problems before update to 
libsigc++-1.9.1X. Now I'm getting critical error message 
(GLib-CRITICAL **: file gmain.c: line 997 (g_source_destroy): 
assertion `source != NULL' failed) and in some cases also SIGSEGV.

For comparisson I rebuilt gtkmm-2.3.5 once more (I have installed glib-2.3.6, 
atk-1.6.0, pango-1.3.6, gtk+-2.3.6, sigc++-1.9.15, glibmm-2.3.6, gcc-3.3.3, 
etc) and begin testing gtkmm examples. I was able to reproduce this problem 
with gtkmm demos:

--------------------------------------------------------------------------------
demos/pixbuf-demo causes the same critcal error message. Here is backtrace 
from gdb (I put breakpoint on g_log, gtkmm-2.3.5 is installed with 
prefix/usr):

Breakpoint 2, 0x4087fea3 in g_log () from /usr/lib/./libglib-2.0.so.0
(gdb) where
#0  0x4087fea3 in g_log () from /usr/lib/./libglib-2.0.so.0
#1  0x4087591e in g_source_destroy () from /usr/lib/./libglib-2.0.so.0
#2  0x40346183 in (anonymous namespace)::SourceConnectionNode::notify ()
   from /usr/lib/./libglibmm-2.3.so.6
#3  0x403658c5 in sigc::internal::slot_rep::disconnect (this=0x0)
    at functors/slot_base.cc:37
#4  0x40365d09 in sigc::slot_base::disconnect (this=0x4089f266)
    at functors/slot_base.cc:142
#5  0x403657d9 in sigc::connection::disconnect (this=0x4089f266) at 
connection.cc:80
#6  0x0804e404 in (anonymous namespace)::DemoRenderArea::~DemoRenderArea ()
#7  0x4021caf6 in Gtk::Object::destroy_notify_ () 
from /usr/lib/./libgtkmm-2.3.so.6
#8  0x4034aef5 in Glib::ObjectBase::destroy_notify_callback_ ()
   from /usr/lib/./libglibmm-2.3.so.6
#9  0x4086596a in g_datalist_clear () from /usr/lib/./libglib-2.0.so.0
#10 0x40803e05 in g_object_interface_list_properties ()
   from /usr/lib/./libgobject-2.0.so.0
#11 0x40561bfc in gtk_object_destroy () from /usr/lib/./libgtk-x11-2.0.so.0
#12 0x4065a043 in gtk_widget_get_default_direction ()
   from /usr/lib/./libgtk-x11-2.0.so.0
#13 0x40803fc1 in g_object_interface_list_properties ()
   from /usr/lib/./libgobject-2.0.so.0
#14 0x4080425f in g_object_run_dispose () from /usr/lib/./libgobject-2.0.so.0
#15 0x40561a3b in gtk_object_destroy () from /usr/lib/./libgtk-x11-2.0.so.0
#16 0x40650df5 in gtk_widget_destroy () from /usr/lib/./libgtk-x11-2.0.so.0
#17 0x4046dcd4 in gtk_bin_get_type () from /usr/lib/./libgtk-x11-2.0.so.0
#18 0x401eb17e in Gtk::Container_Class::forall_vfunc_callback ()
   from /usr/lib/./libgtkmm-2.3.so.6
#19 0x404b3eee in gtk_container_foreach () from /usr/lib/./libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#20 0x404b2c95 in gtk_container_class_list_child_properties ()
   from /usr/lib/./libgtk-x11-2.0.so.0
#21 0x40662f79 in gtk_window_reshow_with_initial_size ()
   from /usr/lib/./libgtk-x11-2.0.so.0
#22 0x401eacdb in Gtk::Container_Class::destroy_callback ()
   from /usr/lib/./libgtkmm-2.3.so.6
#23 0x40816e61 in g_cclosure_marshal_VOID__VOID ()
   from /usr/lib/./libgobject-2.0.so.0
#24 0x40801817 in g_cclosure_new_swap () from /usr/lib/./libgobject-2.0.so.0
#25 0x40801480 in g_closure_invoke () from /usr/lib/./libgobject-2.0.so.0
#26 0x40816526 in g_signal_emit_by_name () from /usr/lib/./libgobject-2.0.so.0
#27 0x408158c7 in g_signal_emit_valist () from /usr/lib/./libgobject-2.0.so.0
#28 0x40815bc4 in g_signal_emit () from /usr/lib/./libgobject-2.0.so.0
#29 0x40561b49 in gtk_object_destroy () from /usr/lib/./libgtk-x11-2.0.so.0
#30 0x40659df3 in gtk_widget_get_default_direction ()
   from /usr/lib/./libgtk-x11-2.0.so.0
#31 0x406601f9 in gtk_window_remove_embedded_xid ()
   from /usr/lib/./libgtk-x11-2.0.so.0
#32 0x4027fee6 in Gtk::Window_Class::dispose_vfunc_callback ()
   from /usr/lib/./libgtkmm-2.3.so.6
#33 0x40804257 in g_object_run_dispose () from /usr/lib/./libgobject-2.0.so.0
#34 0x40561a3b in gtk_object_destroy () from /usr/lib/./libgtk-x11-2.0.so.0
#35 0x4027fe88 in Gtk::Window::_destroy_c_instance ()
   from /usr/lib/./libgtkmm-2.3.so.6
#36 0x4027fe2d in Gtk::Window::destroy_ () from /usr/lib/./libgtkmm-2.3.so.6
#37 0x40280878 in Gtk::Window::~Window () from /usr/lib/./libgtkmm-2.3.so.6
#38 0x0804ed61 in main ()

--------------------------------------------------------------------------------
Also I got the same error message and SIGSEGV (not always) with 
demos/gtk-demo/demo (double click on entry images in menu, after that close 
newly opened window):

So it seems that change to libsigc++1.9.1X has caused serious regressions in
gtkmm

Andris



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