After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 695122 - Fix crash in NotificationBar::cancel() on exit
Fix crash in NotificationBar::cancel() on exit
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-03-04 13:07 UTC by Christophe Fergeau
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix crash in NotificationBar::cancel() on exit (1.71 KB, patch)
2013-03-04 13:07 UTC, Christophe Fergeau
committed Details | Review

Description Christophe Fergeau 2013-03-04 13:07:39 UTC
When exiting Boxes while a notification is shown (I tried
with the oVirt authentication popup), Boxes segfaults in
NotificationBar::cancel().
NotificationBar::cancel() is iterating over the list of active
notifications and calling gtk_widget_destroy() on them.

GdNotification::destroy() is emitting the GdNotification::discarded
signal, which NotificationBar catches to remove the current
notification from the list of active notifications.

After calling gtk_widget_destroy(), NotificationBar::cancel() tries
to remove the current notification from the active notifications,
which is useless as this was just done in the callback for
NotificationBar::dismissed. Even worse, this caused a crash in my
testing as active_notifications only contained 1 item, so it was empty
after destroying the widget, and
active_notifications.remove (active_notifications.data); would attempt
to dereference a NULL pointer, causing a crash.
Comment 1 Christophe Fergeau 2013-03-04 13:07:41 UTC
Created attachment 237975 [details] [review]
Fix crash in NotificationBar::cancel() on exit
Comment 2 Zeeshan Ali 2013-03-04 13:46:44 UTC
Review of attachment 237975 [details] [review]:

ACK
Comment 3 Christophe Fergeau 2013-03-04 17:06:57 UTC
Attachment 237975 [details] pushed as 0534e53 - Fix crash in NotificationBar::cancel() on exit