Skip to content

Fix a crash in update_default_calendar_row()

Michael Catanzaro requested to merge mcatanzaro/rbz-1509551 into master

This function is crashing in 3.32 because the manager object is invalid. I think there are two related bugs:

First, it looks like gcal_quick_add_popover_set_property() is failing to disconnect its signals from the old GcalManager before setting the new one. In one backtrace, I see the GcalManager emitting the signal is different than the GcalQuickAddPopover's current manager, which is surely unintended.

But that shouldn't be enough to crash on its own, since the GcalQuickAddPopover should still have a valid manager, even if not the intended one. So I suspect the GcalQuickAddPopover itself is invalid at this point. (The crash occured for me after adding an event, so it was probably just destroyed.) GcalQuickAddPopover is not disconnecting these signals in dispose, which is unsafe. We can avoid the need to do so by using g_signal_connect_object().

Now in master, the GcalManager is now owned indirectly by the GcalContext, but the underlying problems from the 3.32 crash are all still here. This attempts to fix them. The fix is speculative, but it's surely safer than the original code.

Hopefully fixes #392 (closed), #416 (closed), #418 (closed), and #420 (closed)

https://bugzilla.redhat.com/show_bug.cgi?id=1509551

Edited by Michael Catanzaro

Merge request reports