GNOME Bugzilla – Bug 735538
crashes after configuring an account
Last modified: 2014-09-02 19:18:36 UTC
1) configure an account in geary 2) crash 3) try to open it again 4) crash This bt is from the crash after opening it again, it basically crashes on startup now. geary-0.7.1-1.fc21.x86_64 Program received signal SIGSEGV, Segmentation fault. 0x00007ffff207fdec in g_type_check_instance_is_fundamentally_a ( type_instance=type_instance@entry=0xb93730, fundamental_type=fundamental_type@entry=80) at gtype.c:3982 3982 return node && (NODE_FUNDAMENTAL_TYPE(node) == fundamental_type); (gdb) bt
+ Trace 234011
That's weird. My first instinct is that this is a problem with GTK or Vala. Which versions are you using?
vala-0.25.2-1.fc21.x86_64 gtk3-3.13.7-1.fc21.x86_64
Bleeding edge, I see. We already had one GTK bug that resolved itself this cycle; I wonder if this could be another. Is it possible for you to downgrade gtk to 3.12 (or even an earlier version of 3.13) and see if the problem remains? Also, if you can post the function conversation_list_view_get_adjustment() from build/src/client/conversation-list/conversation-list-view.c, I'll compare it to mine to see if valac messed anything up.
> Bleeding edge, I see. Well, someone needs to test Fedora 21 before we release it :) It worth mentioning I got the same crash with geary 0.6.x > Is it possible for you to downgrade gtk to 3.12 (or even an earlier version of 3.13) and see if the problem remains? That would be very complicated,I rather not do that. > Also, if you can post the function conversation_list_view_get_adjustment() from > build/src/client/conversation-list/conversation-list-view.c, I'll compare it to > mine to see if valac messed anything up. static GtkAdjustment* conversation_list_view_get_adjustment (ConversationListView* self) { GtkAdjustment* result = NULL; GtkScrolledWindow* parent = NULL; GtkContainer* _tmp0_ = NULL; GtkScrolledWindow* _tmp1_ = NULL; GtkScrolledWindow* _tmp2_ = NULL; GtkScrolledWindow* _tmp3_ = NULL; GtkAdjustment* _tmp4_ = NULL; GtkAdjustment* _tmp5_ = NULL; #line 135 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" g_return_val_if_fail (IS_CONVERSATION_LIST_VIEW (self), NULL); #line 136 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _tmp0_ = (GtkContainer*) gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)); #line 136 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_scrolled_window_get_type ()) ? ((GtkScrolledWindow*) _tmp0_) : NULL); #line 136 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" parent = _tmp1_; #line 137 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _tmp2_ = parent; #line 137 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" if (_tmp2_ == NULL) { #line 138 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" g_debug ("conversation-list-view.vala:138: Parent was not scrolled window"); #line 139 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" result = NULL; #line 139 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _g_object_unref0 (parent); #line 139 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" return result; #line 844 "conversation-list-view.c" } #line 142 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _tmp3_ = parent; #line 142 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _tmp4_ = gtk_scrolled_window_get_vadjustment (_tmp3_); #line 142 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _tmp5_ = _g_object_ref0 (_tmp4_); #line 142 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" result = _tmp5_; #line 142 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" _g_object_unref0 (parent); #line 142 "/home/elad/sources/geary/src/client/conversation-list/conversation-list-view.vala" return result; #line 858 "conversation-list-view.c" }
The vala-generated code is nearly identical; the only difference is the type of _tmp0_: _tmp0_ = gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_WIDGET, GtkWidget)); list-view.vala" _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, GTK_TYPE_SCROLLED_WINDOW) ? ((GtkScrolledWindow*) _tmp0_) : NULL); vs _tmp0_ = (GtkContainer*) gtk_widget_get_parent (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget)); _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gtk_scrolled_window_get_type ()) ? ((GtkScrolledWindow*) _tmp0_) : NULL); On the one hand, I don't see how this change could cause a problem; on the other, the traceback is pointing to a g_object_ref call, and this is one of two in that function. You mention seeing the same problem in the 0.6 series. Was that also with current versions of GTK and vala, or was that a while ago?
(In reply to comment #5) > You mention seeing the same problem in the 0.6 series. Was that also with > current versions of GTK and vala, or was that a while ago? Yes, same versions. The latest 0.6 build in Fedora was at 2014-08-22, back then the versions were: gtk3-3.13.7-1.fc21 vala-0.25.1-2.fc21 Which is nearly identical.
I just upgraded to vala 0.25.2 (from 0.24.0) and, while I can't reproduce your specific problem, I am getting a bunch of critical warnings and a crash, all related to the Adjustment associated with the conversation list view. I'm guessing it has the same root cause as this problem. Something's changed in vala, and now this Adjustment isn't being set up correctly. I don't know if this is an error in vala or an error in Geary that was hidden by older vala versions. If Fedora allows parallel installation of vala versions, you might try building with 0.24 and see if that fixes things.
Our options are either 0.18 or 0.25, and I don't think I can introduce a new compat package for 0.24 at this stage... It would be better to fix geary I think. (I'm not trying to solve this for myself, I'm trying to solve this for the entire distro)
Oh, obviously. The 0.24 suggestion was just to confirm the diagnosis.
I've found something in the generated C code from 0.25 that bothers me. An except from geary_controller_should_notify_new_messages(): MainWindow* _tmp4_ = NULL; ConversationListView* _tmp5_ = NULL; ConversationListView* _tmp6_ = NULL; GtkAdjustment* _tmp7_ = NULL; GtkAdjustment* _tmp8_ = NULL; GtkAdjustment* _tmp9_ = NULL; gdouble _tmp10_ = 0.0; gdouble _tmp11_ = 0.0; _tmp4_ = self->priv->_main_window; _tmp5_ = main_window_get_conversation_list_view (_tmp4_); _tmp6_ = _tmp5_; _tmp7_ = gtk_scrollable_get_vadjustment (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GTK_TYPE_SCROLLABLE, GtkScrollable)); _tmp8_ = _tmp7_; _tmp9_ = _tmp8_; _tmp10_ = gtk_adjustment_get_value (_tmp9_); _tmp11_ = _tmp10_; _tmp1_ = _tmp11_ != 0.0; _g_object_unref0 (_tmp9_); Two things here bother me. First, _tmp8_ does nothing -- it just passes a value from _tmp7_ to _tmp9_. That's not a problem, but it suggests that valac has gotten itself confused. More worrisome is the g_object_unref of _tmp9_ (== _tmp8_ == _tmp7_ == the problematic Adjustment). This function doesn't increase the ref count anywhere, so I don't think it should be decreasing it. Perhaps this is causing it to be erroneously freed, leading to this problem. Notably, the code generated by 0.24 is similar, but omits both of these lines.
Submitted to vala as bug #735640.
Thanks for getting on top of this Robert. Yes, this appears to be breakage from Vala 0.25.2. See my note in bug #735640. The long and the short of it is, do not build Geary with Vala 0.25.2. The GTK+ bindings appear to be broken.
*** Bug 735651 has been marked as a duplicate of this bug. ***
I've verified this is fixed in Vala master.
Fixed in Vala 0.25.3.
*** Bug 735281 has been marked as a duplicate of this bug. ***