Bug 1126916 - GtkComboBoxText issues after rebase of gtk2
Summary: GtkComboBoxText issues after rebase of gtk2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gtk2
Version: 6.6
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Benjamin Otte
QA Contact: Desktop QE
URL:
Whiteboard:
: 1128673 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-05 15:13 UTC by Jiri Koten
Modified: 2014-10-14 07:41 UTC (History)
6 users (show)

Fixed In Version: gtk2-2.24.23-6.el6
Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:41:16 UTC


Attachments (Terms of Use)
backtrace (14.52 KB, text/plain)
2014-08-05 15:13 UTC, Jiri Koten
no flags Details
Evolution output (2.13 KB, text/plain)
2014-08-05 15:15 UTC, Jiri Koten
no flags Details
backtrace 2 (14.04 KB, text/plain)
2014-08-07 15:47 UTC, Jiri Koten
no flags Details
proposed partial gtk2 patch (582 bytes, patch)
2014-08-26 16:38 UTC, Milan Crha
no flags Details | Diff
GtkComboBoxText: Set entry-text-column property in the constructor (1.62 KB, patch)
2014-08-28 12:21 UTC, Marek Kašík
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1554 normal SHIPPED_LIVE gtk2, gdk-pixbuf2, librsvg2, and libwmf bug fix and enhancement update 2014-10-14 01:27:57 UTC

Description Jiri Koten 2014-08-05 15:13:46 UTC
Created attachment 924240 [details]
backtrace

Description of problem:
Evolution freeze after I went to menu Edit and click Preferences. The preferences dialog didn't show up, instead Evolution just freeze.


Version-Release number of selected component (if applicable):
evolution-2.32.3-33.el6
evolution-data-server-2.32.3-20.el6

How reproducible:
Cannot reproduce, I hope the backtrace provides some useful information.

Comment 1 Jiri Koten 2014-08-05 15:15:12 UTC
Created attachment 924242 [details]
Evolution output

Evolution output logged in .xessesion-errors

Comment 2 Jiri Koten 2014-08-07 15:46:17 UTC
I hit the freeze multiple times in just couple of days. Also not only in Preferences but also in differrent dialogs - creating meeting, click on Send.

There are Critical Gtk and Glib errors in evolution console output, which could be related to rebase in rhel 6.6

Raising priority and marking as a potential regression, haven't seen such freeze in rhel 6.5.

(evolution:4459): GLib-GObject-WARNING **: cannot register existing type `GtkComboBoxText'

(evolution:4459): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion `G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(evolution:4459): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

(evolution:4459): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

(evolution:4459): Gtk-CRITICAL **: IA__gtk_combo_box_set_focus_on_click: assertion `GTK_IS_COMBO_BOX (combo_box)' failed

(evolution:4459): Gtk-CRITICAL **: IA__gtk_cell_layout_get_cells: assertion `GTK_IS_CELL_LAYOUT (cell_layout)' failed

(evolution:4459): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(evolution:4459): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(evolution:4459): Gtk-CRITICAL **: IA__gtk_widget_set_tooltip_text: assertion `GTK_IS_WIDGET (widget)' failed

(evolution:4459): Gtk-CRITICAL **: IA__gtk_widget_show: assertion `GTK_IS_WIDGET (widget)' failed

(evolution:4459): Gtk-CRITICAL **: gtk_box_pack: assertion `GTK_IS_WIDGET (child)' failed

Comment 3 Jiri Koten 2014-08-07 15:47:32 UTC
Created attachment 924946 [details]
backtrace 2

Backtrace of the freeze from Meeting dialog.

Comment 4 Matthew Barnes 2014-08-21 23:10:47 UTC
(evolution:4459): GLib-GObject-WARNING **: cannot register existing type `GtkComboBoxText'

Something wrong with GObject's type registration, which is supposed to be thread-safe.  Reassigning to glib2.

Jiri, what's your glib2 package version?

Comment 5 Matthew Barnes 2014-08-21 23:24:08 UTC
*** Bug 1128673 has been marked as a duplicate of this bug. ***

Comment 6 Jiri Koten 2014-08-22 08:36:22 UTC
This is on rhel 6.6 where was the glib2 and gtk2 rebase.

glib2-2.28.8-1.el6
gtk2-2.24.23-3.el6

Comment 7 Milan Crha 2014-08-26 16:38:53 UTC
Created attachment 931050 [details]
proposed partial gtk2 patch

for gtk2;

I cannot reproduce this particular crash (maybe a rebuild of evolution (and other gtk2 applications) against the rebased gtk2/glib2 makes this work properly), but I get a crash when opening New Appointment dialog. That is caused due to no
"entry-text-column" being set on a GtkComboBoxText, because the GtkComboBoxText constructed through glade is not created neither with gtk_combo_box_text_new() nor with gtk_combo_box_text_new_with_entry(), while these both set the "entry-text-column" property. One option is to fix each single application using it or fix gtk2. I'd say fixing gtk2 is better.

Comment 8 Colin Walters 2014-08-26 18:48:50 UTC
Reassigning to gtk2 per comment #7

Comment 9 Milan Crha 2014-08-27 13:55:13 UTC
(In reply to Jiri Koten from comment #2)
> (evolution:4459): GLib-GObject-WARNING **: cannot register existing type
> `GtkComboBoxText'

I can reliably reproduce this (with stock gtk2 2.24.23-3 and stock evolution 2.32.3-33) when I:
a) run evolution in a Calendar view
b) click the New toolbar button (it opens an appointment editor)
c) close the editor
d) select Edit->Preferences.

Trying the same with locally built evolution against locally built
patched (comment #7) gtk2 2.24.23-5 works properly. Only updating to stock gtk2 2.24.23-5 is not enough. I'll try to rebuild evolution in brew against this unpatched gtk2, whether it'll change anything.

Comment 10 Milan Crha 2014-08-27 17:51:36 UTC
I realized, after quite some investigation, that one GtkComboBoxText type is registered from libedataserverui and another one directly from evolution. These two are not registered in the same way for some reason. With evolution-2.32.3-33 (built against gtk2-devel-2.20.1-4) and evolution-data-server-2.32.3-20 (also built against gtk2-devel-2.20.1-4) and installed gtk2-2.24.23-5 and glib2-2.28.8-1 evolution crashes with steps in the comment #9.

Updating evolution-data-server to 2.32.3-21 [1] (built against gtk2-devel-2.24.23-3) is not enough, it leads to the crash for which I wrote the patch at comment #7. Thus I built a scratch build of gtk2 with the patch applied at [2] and installed it locally. That makes evolution survive steps from comment #9.

I also scratch-built evolution [3] (this time built against gtk2-devel-2.24.23-3) even it was not finally needed.

I'd say that gtk2 should get the patch and anything requiring gtk2-devel and/or glib2-devel (both were rebased) should be rebuilt against the most latest versions of the two. The more the better, to be safe.

Opinions?

[1] https://brewweb.devel.redhat.com/buildinfo?buildID=379932
[2] https://brewweb.devel.redhat.com/taskinfo?taskID=7888019
[3] https://brewweb.devel.redhat.com/taskinfo?taskID=7886286

Comment 11 Marek Kašík 2014-08-28 07:12:06 UTC
(In reply to Milan Crha from comment #10)
> I realized, after quite some investigation, that one GtkComboBoxText type is
> registered from libedataserverui and another one directly from evolution.
> These two are not registered in the same way for some reason.

I've looked on the reason why they are registered in different way since the GtkComboBoxText is present in Gtk+ since 2.23. I've found that evolution-data-server defines GtkComboBoxText itself if the version of Gtk+ is lower than 2.23 (see gtk-compat.h). When Gtk+ tries to register its own GtkComboBoxText (in GtkFileChooserDefault in this case) it fails with the message shown in the comment #2.
I think that rebuilding of evolution-data-server should be enough to fix this problem (it was already done as the evolution-data-server-2.32.3-21.el6).

I'll look at the problem with the "entry-text-column" property which Milan has mentioned yet.


> With evolution-2.32.3-33 (built against gtk2-devel-2.20.1-4) and
> evolution-data-server-2.32.3-20 (also built against gtk2-devel-2.20.1-4) and
> installed gtk2-2.24.23-5 and glib2-2.28.8-1 evolution crashes with steps in
> the comment #9.
>
> Updating evolution-data-server to 2.32.3-21 [1] (built against
> gtk2-devel-2.24.23-3) is not enough, it leads to the crash for which I wrote
> the patch at comment #7. Thus I built a scratch build of gtk2 with the patch
> applied at [2] and installed it locally. That makes evolution survive steps
> from comment #9.

This agrees with my assumption.


> I also scratch-built evolution [3] (this time built against
> gtk2-devel-2.24.23-3) even it was not finally needed.
> 
> I'd say that gtk2 should get the patch and anything requiring gtk2-devel
> and/or glib2-devel (both were rebased) should be rebuilt against the most
> latest versions of the two. The more the better, to be safe.

This shouldn't be needed since the effect of self-defined GtkComboBoxText is localized to evolution-data-server.


> Opinions?
> 
> [1] https://brewweb.devel.redhat.com/buildinfo?buildID=379932
> [2] https://brewweb.devel.redhat.com/taskinfo?taskID=7888019
> [3] https://brewweb.devel.redhat.com/taskinfo?taskID=7886286

Comment 12 Milan Crha 2014-08-28 10:05:17 UTC
Thanks for the correction, Marek. I completely forgot of the existence of the libedataserverui/gtk-compat.h. I'm sorry for a wrong result on my side.

With your findings on mind, I agree that the updated evolution-data-server fixes half of the issue.

I did a search of GtkComboBoxText within evolution-related sources and the only other occurrence is in evolution-ews, as simple set of defines:
   #if GTK_CHECK_VERSION(2,24,0)
   #else
   #define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
   #define GTK_IS_COMBO_BOX_TEXT GTK_IS_COMBO_BOX
   #define gtk_combo_box_text_append_text gtk_combo_box_append_text
   #define gtk_combo_box_text_new gtk_combo_box_new_text
   #define GtkComboBoxText GtkComboBox
   #endif
which I guess is safe, in contrast of the eds' gtk-compat.h.

Comment 13 Marek Kašík 2014-08-28 12:21:05 UTC
Created attachment 931921 [details]
GtkComboBoxText: Set entry-text-column property in the constructor

(In reply to Milan Crha from comment #7)
> Created attachment 931050 [details]
> proposed partial gtk2 patch
> 
> for gtk2;
> 
> I cannot reproduce this particular crash (maybe a rebuild of evolution (and
> other gtk2 applications) against the rebased gtk2/glib2 makes this work
> properly), but I get a crash when opening New Appointment dialog. That is
> caused due to no
> "entry-text-column" being set on a GtkComboBoxText, because the
> GtkComboBoxText constructed through glade is not created neither with
> gtk_combo_box_text_new() nor with gtk_combo_box_text_new_with_entry(), while
> these both set the "entry-text-column" property. One option is to fix each
> single application using it or fix gtk2. I'd say fixing gtk2 is better.

Thank you for the patch Milan, it fixes the crash for me.
I've prepared a similar one based on what we have in gtk3 already (see https://git.gnome.org/browse/gtk+/commit/?id=6aeab7b7ccfcdeb8f871c2744d5fbae24e3bda5f).

Comment 16 errata-xmlrpc 2014-10-14 07:41:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1554.html


Note You need to log in before you can comment on or make changes to this bug.