GNOME Bugzilla – Bug 606566
Crash when drag-n-dropping chat tabs between windows
Last modified: 2010-01-10 16:33:25 UTC
Open a chat window for "A" and one for "B", now drag "A" to window "B", with the goal of having a tabbed window for both A and B. You'll get a crash most of time or if lucky see all this -or similar- printed: (empathy:507): Gtk-CRITICAL **: gtk_image_set_from_icon_name: assertion `GTK_IS_IMAGE (image)' failed (empathy:507): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed (empathy:507): Gtk-CRITICAL **: gtk_widget_set_tooltip_markup: assertion `GTK_IS_WIDGET (widget)' failed (empathy:507): GLib-GObject-WARNING **: invalid cast from `PangoLayout' to `GtkLabel' (empathy:507): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed (empathy:507): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkImage' (empathy:507): Gtk-CRITICAL **: gtk_image_set_from_icon_name: assertion `GTK_IS_IMAGE (image)' failed (empathy:507): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed (empathy:507): Gtk-CRITICAL **: gtk_widget_set_tooltip_markup: assertion `GTK_IS_WIDGET (widget)' failed (empathy:507): GLib-GObject-WARNING **: invalid cast from `PangoLayout' to `GtkLabel' (empathy:507): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed (empathy:507): Gtk-CRITICAL **: gtk_selection_data_set: assertion `length <= 0' failed (empathy:507): GLib-GObject-WARNING **: invalid unclassed pointer in cast to `GtkImage' (empathy:507): Gtk-CRITICAL **: gtk_image_set_from_icon_name: assertion `GTK_IS_IMAGE (image)' failed (empathy:507): Gtk-CRITICAL **: gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed (empathy:507): Gtk-CRITICAL **: gtk_widget_set_tooltip_markup: assertion `GTK_IS_WIDGET (widget)' failed (empathy:507): GLib-GObject-WARNING **: invalid cast from `PangoLayout' to `GtkLabel' (empathy:507): Gtk-CRITICAL **: gtk_label_set_text: assertion `GTK_IS_LABEL (label)' failed Apparently, the data set with g_object_data_set and which chat_window_update_chat_tab () tries to use gets freed when the tabs are dragged around, I'm attaching a simple proof of this idea: a simple g_object_ref () to the widgets set as data of the chat object prevents the warnings and the crash.
Created attachment 151127 [details] [review] Fix a crash in tab drag and drop Apparently the widgets set as data to the chat object are lost when tabs are dragged, ref'ing them prevents this. Note: this is just a proof of concept, we need to unref such widgets later to keep balance, I think. Bug #606566
*** This bug has been marked as a duplicate of bug 588799 ***
*** This bug has been marked as a duplicate of bug 585089 ***