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 697750 - media-keys plugins warns/crashes when shell restarts
media-keys plugins warns/crashes when shell restarts
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: media-keys
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
3.8.1
Depends on:
Blocks:
 
 
Reported: 2013-04-10 18:12 UTC by Lionel Landwerlin
Modified: 2013-04-14 02:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix warnins/crashes when shell restarts (3.28 KB, patch)
2013-04-10 18:13 UTC, Lionel Landwerlin
needs-work Details | Review
Fix warnins/crashes when shell restarts v2 (5.44 KB, patch)
2013-04-13 00:42 UTC, Lionel Landwerlin
committed Details | Review

Description Lionel Landwerlin 2013-04-10 18:12:09 UTC
Run gnome-settings-daemon on a command line, restart the shell with "Alt-F2 r", observe warnings.
This is the continuation of https://bugzilla.gnome.org/show_bug.cgi?id=697698
Comment 1 Lionel Landwerlin 2013-04-10 18:13:21 UTC
Created attachment 241199 [details] [review]
Fix warnins/crashes when shell restarts
Comment 2 Rui Matos 2013-04-10 19:40:34 UTC
Review of attachment 241199 [details] [review]:

Not your fault but I don't like this use of cancellables in the first place. This code should just create an instance in _start() and always use it since it then only cancels it in _stop() anyway.

As for this particular patch, there's no need for all the g_clear_object()s. It goes against the intent of the original which sets a g_object_add_weak_pointer() on the cancellable.

So, either just keep the last hunk of this patch or remove the whole ensure_cancellable() dance altogether.
Comment 3 Lionel Landwerlin 2013-04-13 00:42:17 UTC
Created attachment 241427 [details] [review]
Fix warnins/crashes when shell restarts v2

Reworked following your inputs.
Comment 4 Rui Matos 2013-04-13 22:52:54 UTC
Review of attachment 241427 [details] [review]:

With that extra cleanup looks fine.

::: plugins/media-keys/gsd-media-keys-manager.c
@@ -377,3 @@
 {
-        GsdMediaKeysManager *manager = data;
-        g_object_unref (manager->priv->osd_cancellable);

This whole method can go away.
Comment 5 Lionel Landwerlin 2013-04-14 02:59:18 UTC
Review of attachment 241427 [details] [review]:

Committed to master and gnome-3-8.