GNOME Bugzilla – Bug 343764
Crash during evolution startup after updating to CVS HEAD
Last modified: 2013-09-13 00:53:59 UTC
this is what i get on the console: Gtk-CRITICAL **: gtk_widget_ensure_style: assertion `GTK_IS_WIDGET (widget)' failed aborting... this is the backtrace, i don't know if it will be useful enough:
+ Trace 68619
Note that it might not be a real crash, it might be due to the fact that gnome from CVS is aborting on GTK-CRiticals.
If gtk_widget_ensure_style gets a critical warning due to being passed a bad widget, it looks like evo is at fault for passing the bad widget. Could you get a stack trace with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so.
how can it be? the only thing i changed is GTK+ and now evolution is crashing it is not very logical to think that evolution is at fault here. I will recompile evolution with debugging symbols, anyway.
Well, you didn't state that you only updated gtk+ in your original comment. ;-) However, it appears that gtk_widget_ensure_style() hasn't changed since gtk+-2.1.x or so, so it does seem unlikely to be a problem there. Note that critical warnings only become crashers if G_DEBUG is set appropriately, so perhaps you didn't reinitialize your environment after the last time you updated gnome-session (i.e. logged out and then back in) until recently. It's also possible that you used evolution a little bit differently, or that it's threading and timing just happened to take you down a different path this time. So, it might still be a gtk+ bug, but even if it is we'd need a better stack trace as the first line of gtk_widget_ensure_style() is and has been g_return_if_fail (GTK_IS_WIDGET (widget)) -- something that would only fail if evo passed bad data.
ok, here is the whole backtrace:
+ Trace 68630
if you need the gnome-canvas library with debug info tell me and i'll generate a new backtrace. Thanks very much
Confirming. Same backtrace, updated as of last night:
+ Trace 68676
Thread 1 (Thread -1501514048 (LWP 25189))
Created attachment 66966 [details] [review] A patch The problem is that gtk_widget_ensure_style (button) modifies its ->child where g_label is already pointing. So by simply assigning g_label to button->child just after gtk_widget_ensure_style (button) fixes the problem. Here is the patch.
i can confirm this, i also see this.
Patch looks ok to commit to both STABLE and HEAD.
*** Bug 344229 has been marked as a duplicate of this bug. ***
*** Bug 344277 has been marked as a duplicate of this bug. ***
*** Bug 344268 has been marked as a duplicate of this bug. ***
fixed both in head and stable branch: http://cvs.gnome.org/viewcvs/evolution/widgets/table/e-table-header-utils.c?r1=1.21&r2=1.21.2.1 http://cvs.gnome.org/viewcvs/evolution/widgets/table/e-table-header-utils.c?r1=1.21&r2=1.22 thanks for providing the patch.
It ain't fixed. I'm still getting the crash (same crash point) even after applying the patch, generally some time into running evo. Inspection of g_label shows it's been written with 0xaa, the gtype deadbeef. I guess something is making the button rebuild its internals, deleting g_label.
Created attachment 67021 [details] [review] e-table-header-utils.c.patch Supplementary patch. I thought of reffing g_label, or moving the GTK_BIN(button)->child access outside the block, but then I realised the elegant solution is to make g_label a weak pointer on itself.
until now, i haven't seen the crash again. ed, i'm reopening this bug (and changing severity and priority appropriately) to let others decide on this patch (i'm not in the position to review).
I can confirm the supplemntary patch really fix the crash (I had one report which wasn't fixed by initial patch but which is now fixed when adding the weak pointer fix).
*** Bug 344618 has been marked as a duplicate of this bug. ***
quoting from irc: <harish> andre: there is a weak ref added which is adequate.. <harish> andre: approved. pl. resolve the bug after committing the patch fixed both in head and stable branch: http://cvs.gnome.org/viewcvs/evolution/widgets/table/e-table-header-utils.c?r1=1.22&r2=1.23 http://cvs.gnome.org/viewcvs/evolution/widgets/table/e-table-header-utils.c?r1=1.21.2.1&r2=1.21.2.2 thanks a lot everybody.