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 700091 - media-keys: don't crash when calling GrabAccelerators with an empty list
media-keys: don't crash when calling GrabAccelerators with an empty list
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-10 15:58 UTC by Giovanni Campagna
Modified: 2013-05-14 16:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
media-keys: don't crash when calling GrabAccelerators with an empty list (1.74 KB, patch)
2013-05-10 15:58 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2013-05-10 15:58:05 UTC
If you use an indefinite type like "a*", you must add at least one
element so that GVariant can compute the correct type. Otherwise,
you need to specify the right type from the start.

The empty list is an edge case that can happen if gnome-shell crashes
at startup: gnome-settings-daemon notices that the shell is coming
up, it builds the internal list and calls GrabAccelerator the first
time; this fails because gnome-shell is not ready yet, so g-s-d
installs a timeout to retry; meanwhile g-s goes down again, so
g-s-d clears the list, and the next time the timeout fires g-s-d
crashes.
This fix is not correct, we should actually rebuild the internal
list if we ever get in this state, but as this is only possible
with a shell crashing at startup, let's go with the simple way.
Comment 1 Giovanni Campagna 2013-05-10 15:58:10 UTC
Created attachment 243801 [details] [review]
media-keys: don't crash when calling GrabAccelerators with an empty list
Comment 2 Bastien Nocera 2013-05-13 07:55:51 UTC
Review of attachment 243801 [details] [review]:

Given the simple fix, fine by me.

Please commit to gnome-3-8 and master.
Comment 3 Giovanni Campagna 2013-05-14 16:22:32 UTC
Attachment 243801 [details] pushed as d9cb5f1 - media-keys: don't crash when calling GrabAccelerators with an empty list

Sorry I missed the 3.8.2 deadline yesterday, I forgot of this one.o