GNOME Bugzilla – Bug 653154
Crash when constructing calendar view
Last modified: 2013-09-13 01:04:53 UTC
Created attachment 190417 [details] Backtrace Evo crashes anytime I try to switch to calendar or start Evo with -c calendar. I tried to run it in Valgrind, but it didn't crash, so I suppose it depends on some specific sequence of events. The crash is preceded by following glib warning: (evolution:25304): GLib-GObject-CRITICAL **: g_object_set_data: assertion `G_IS_OBJECT (object)' failed (evolution:25304): GLib-GObject-WARNING **: invalid (NULL) pointer instance (evolution:25304): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed Reproducible on latest git.
crash => critical!
Top of the backtrace:
+ Trace 227555
After investigation with Dan we realized that this all does e_client_check_capability() call at e_week_view_reshape_event_span(), the one few lines below an assignment to span->text_item. This is because the e_client_check_capability() makes a DBus call to get capabilities, and it also iterates the main context, thus, till they are received, the week-view regenerates span array and then is everything "simply broken" with the local variable 'span'. I cannot think of anything better than reading capabilities just after open, to have them cached and not fetch them on demand. When I tried with pushing thread default main context then it didn't work, maybe I did something incorrectly. Also, the crash itself is caused by > g_object_get (G_OBJECT (span->text_item), "text", &text, NULL); few lines below in this function, because this fails and keeps 'text' variable uninitialized. Thus do not forget to initialize it to NULL too.
Created attachment 190739 [details] [review] evo patch for evolution; This retrieves capabilities just after successful open of an EClient. It requires some changes in evolution-data-server too.
Created commit af86bdd in eds master (3.1.3+) Created commit 46eec90 in evo master (3.1.3+)
*** Bug 653658 has been marked as a duplicate of this bug. ***