! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
[Patch] Demand attention blinking crashes the panel
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Window Buttons

Comments

Description Olivier Fourdan editbugs 2019-07-10 09:18:15 CEST
Created attachment 8746 
Backtrace

While investigating bug 15580, I noticed that the xfc4-panel would crash when closing the dialog with the “demand attention” flag.

Reason for this is that in the blinking timeout occurs after the window is closed (and hence the corresponding window button is freed), then the panel tries to update a freed widget, which cannot end well.

Backtrace attached.
Comment 1 Olivier Fourdan editbugs 2019-07-10 09:39:28 CEST
Created attachment 8747 
[PATCH] arrow-button: Remove timeout on dispose

The blinking source timeout has a GDestroyNotify function associated
that will update the button when the timeout is removed.

But the timeout is removed on the button finalize, i.e. once the object
is freed, which will lead to a crash trying to access memory already
freed.

I think the original author meant to use `dispose` instead of `finalize`
for removing the blinking timeout.
Comment 2 Olivier Fourdan editbugs 2019-07-10 21:30:53 CEST
Created attachment 8751 
Updated patch
Comment 3 Olivier Fourdan editbugs 2019-07-10 21:50:00 CEST
Created attachment 8753 
Updated patch
Comment 4 Git Bot editbugs 2019-07-15 00:22:01 CEST
Olivier Fourdan referenced this bugreport in commit 0bf9842cfa78a7e89ab1022f39ce60049ab0203f

arrow-button: Remove timeout on dispose (Bug #15696)

https://git.xfce.org/xfce/xfce4-panel/commit?id=0bf9842cfa78a7e89ab1022f39ce60049ab0203f
Comment 5 Simon Steinbeiss editbugs 2019-07-15 00:23:54 CEST
Thanks for the patch! I hadn't even noticed that scenario yet, but most likely that crash would have happened with Gtk+2 as well.
(and also for the attention to detail with the commit message - much appreciated!)

Bug #15696

Reported by:
Olivier Fourdan
Reported on: 2019-07-10
Last modified on: 2019-07-15

People

Assignee:
Xfce Bug Triage
CC List:
1 user

Version

Version:
4.13.5

Attachments

Backtrace (6.74 KB, text/plain)
2019-07-10 09:18 CEST , Olivier Fourdan
no flags
[PATCH] arrow-button: Remove timeout on dispose (2.73 KB, patch)
2019-07-10 09:39 CEST , Olivier Fourdan
no flags
Updated patch (2.72 KB, patch)
2019-07-10 21:30 CEST , Olivier Fourdan
no flags
Updated patch (2.72 KB, patch)
2019-07-10 21:50 CEST , Olivier Fourdan
no flags

Additional information