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 685910 - [PATCH] Make sure to ref objects when using them in an idle call
[PATCH] Make sure to ref objects when using them in an idle call
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
2.97
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-10 19:53 UTC by Michael Terry
Modified: 2012-10-21 10:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (3.88 KB, patch)
2012-10-10 19:53 UTC, Michael Terry
none Details | Review

Description Michael Terry 2012-10-10 19:53:16 UTC
This is downstream bug https://bugs.launchpad.net/ubuntu/+source/rhythmbox/+bug/1061158

In sources/rb-media-player-source.c, there are several idle callbacks made, but without ref'ing the object passed to them.  Which seems to have happened in the downstream bug.

Here's a patch for that file to ref/unref such idle calls.
Comment 1 Michael Terry 2012-10-10 19:53:48 UTC
Created attachment 226198 [details] [review]
Proposed patch
Comment 2 Jonathan Matthew 2012-10-21 10:09:10 UTC
Since the idle calls are all done in a sequence, starting in rb_media_player_source_sync and ending in sync_idle_cb_cleanup, so we should just add a ref at the start and release it at the end. Commit f2e5c20 does this.

It would probably be better to cancel the sync operation on shutdown, but that's another matter.