After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 606566 - Crash when drag-n-dropping chat tabs between windows
Crash when drag-n-dropping chat tabs between windows
Status: RESOLVED DUPLICATE of bug 585089
Product: empathy
Classification: Core
Component: Chat
2.29.x
Other Linux
: Normal normal
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2010-01-10 15:40 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2010-01-10 16:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix a crash in tab drag and drop (1.46 KB, patch)
2010-01-10 15:42 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2010-01-10 15:40:15 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.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2010-01-10 15:42:05 UTC
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
Comment 2 Felix Kaser 2010-01-10 16:32:36 UTC

*** This bug has been marked as a duplicate of bug 588799 ***
Comment 3 Felix Kaser 2010-01-10 16:33:25 UTC

*** This bug has been marked as a duplicate of bug 585089 ***