r26094 - in /packages/unstable/rhythmbox/debian: changelog patches/03_mtp_album.patch patches/04_mtp_crash.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Tue Dec 28 09:44:47 UTC 2010


Author: joss
Date: Tue Dec 28 09:44:47 2010
New Revision: 26094

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=26094
Log:
03_mtp_album.patch, 04_mtp_crash.patch: stolen upstream. Fix a pair 
of crashers in MTP player management.

Added:
    packages/unstable/rhythmbox/debian/patches/03_mtp_album.patch
    packages/unstable/rhythmbox/debian/patches/04_mtp_crash.patch
Modified:
    packages/unstable/rhythmbox/debian/changelog
    packages/unstable/rhythmbox/debian/patches/series

Modified: packages/unstable/rhythmbox/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/rhythmbox/debian/changelog?rev=26094&op=diff
==============================================================================
--- packages/unstable/rhythmbox/debian/changelog [utf-8] (original)
+++ packages/unstable/rhythmbox/debian/changelog [utf-8] Tue Dec 28 09:44:47 2010
@@ -2,6 +2,8 @@
 
   * Drop type-handling usage. Closes: #587870.
   * Bump standards version accordingly.
+  * 03_mtp_album.patch, 04_mtp_crash.patch: stolen upstream. Fix a pair 
+    of crashers in MTP player management.
 
  -- Josselin Mouette <joss at debian.org>  Fri, 02 Jul 2010 18:35:07 +0200
 

Added: packages/unstable/rhythmbox/debian/patches/03_mtp_album.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/rhythmbox/debian/patches/03_mtp_album.patch?rev=26094&op=file
==============================================================================
--- packages/unstable/rhythmbox/debian/patches/03_mtp_album.patch (added)
+++ packages/unstable/rhythmbox/debian/patches/03_mtp_album.patch [utf-8] Tue Dec 28 09:44:47 2010
@@ -1,0 +1,22 @@
+From ae2f8b144750bc1f8fb658a21d5a6686d9074b0d Mon Sep 17 00:00:00 2001
+From: Jonathan Matthew <jonathan at d14n.org>
+Date: Mon, 27 Dec 2010 22:07:39 +0000
+Subject: mtp: fix crash after failed album create/update
+
+The libmtp album object is still in the hash table, so destroying it
+is not a great idea.
+---
+diff --git a/plugins/mtpdevice/rb-mtp-thread.c b/plugins/mtpdevice/rb-mtp-thread.c
+index 8d498e4..da3ca4b 100644
+--- a/plugins/mtpdevice/rb-mtp-thread.c
++++ b/plugins/mtpdevice/rb-mtp-thread.c
+@@ -285,7 +285,6 @@ write_album_to_device (RBMtpThread *thread, LIBMTP_album_t *album, gboolean new_
+ {
+ 	if (new_album) {
+ 		if (LIBMTP_Create_New_Album (thread->device, album) != 0) {
+-			LIBMTP_destroy_album_t (album);
+ 			rb_debug ("LIBMTP_Create_New_Album failed..");
+ 			rb_mtp_thread_report_errors (thread, FALSE);
+ 		}
+--
+cgit v0.8.3.1

Added: packages/unstable/rhythmbox/debian/patches/04_mtp_crash.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/rhythmbox/debian/patches/04_mtp_crash.patch?rev=26094&op=file
==============================================================================
--- packages/unstable/rhythmbox/debian/patches/04_mtp_crash.patch (added)
+++ packages/unstable/rhythmbox/debian/patches/04_mtp_crash.patch [utf-8] Tue Dec 28 09:44:47 2010
@@ -1,0 +1,60 @@
+From 9c0b1bb7870f7737ce83f9099cbefcc91c447aba Mon Sep 17 00:00:00 2001
+From: Jonathan Matthew <jonathan at d14n.org>
+Date: Mon, 27 Dec 2010 22:08:27 +0000
+Subject: mtp: don't try to join worker thread when finalized on it (bug #637819)
+
+If the source is removed while the worker thread is active, the finalize
+method can end up being called on the worker thread, from which it can't
+join the thread.  In this case, we just let it exit later.
+---
+diff --git a/plugins/mtpdevice/rb-mtp-thread.c b/plugins/mtpdevice/rb-mtp-thread.c
+index da3ca4b..b547661 100644
+--- a/plugins/mtpdevice/rb-mtp-thread.c
++++ b/plugins/mtpdevice/rb-mtp-thread.c
+@@ -685,11 +685,12 @@ task_thread (RBMtpThread *thread)
+ {
+ 	RBMtpThreadTask *task;
+ 	gboolean quit = FALSE;
++	GAsyncQueue *queue = g_async_queue_ref (thread->queue);
+ 
+ 	rb_debug ("MTP device worker thread starting");
+ 	while (quit == FALSE) {
+ 
+-		task = g_async_queue_pop (thread->queue);
++		task = g_async_queue_pop (queue);
+ 		quit = run_task (thread, task);
+ 		destroy_task (task);
+ 	}
+@@ -697,9 +698,10 @@ task_thread (RBMtpThread *thread)
+ 	rb_debug ("MTP device worker thread exiting");
+ 	
+ 	/* clean up any queued tasks */
+-	while ((task = g_async_queue_try_pop (thread->queue)) != NULL)
++	while ((task = g_async_queue_try_pop (queue)) != NULL)
+ 		destroy_task (task);
+ 
++	g_async_queue_unref (queue);
+ 	return NULL;
+ }
+ 
+@@ -871,11 +873,15 @@ impl_finalize (GObject *object)
+ 	RBMtpThread *thread = RB_MTP_THREAD (object);
+ 	RBMtpThreadTask *task;
+ 
+-	rb_debug ("joining MTP worker thread");
++	rb_debug ("killing MTP worker thread");
+ 	task = create_task (CLOSE_DEVICE);
+ 	queue_task (thread, task);
+-	g_thread_join (thread->thread);
+-	rb_debug ("MTP worker thread exited");
++	if (thread->thread != g_thread_self ()) {
++		g_thread_join (thread->thread);
++		rb_debug ("MTP worker thread exited");
++	} else {
++		rb_debug ("we're on the MTP worker thread..");
++	}
+ 
+ 	g_async_queue_unref (thread->queue);
+ 
+--
+cgit v0.8.3.1

Modified: packages/unstable/rhythmbox/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/packages/unstable/rhythmbox/debian/patches/series?rev=26094&op=diff
==============================================================================
--- packages/unstable/rhythmbox/debian/patches/series [utf-8] (original)
+++ packages/unstable/rhythmbox/debian/patches/series [utf-8] Tue Dec 28 09:44:47 2010
@@ -1,2 +1,5 @@
 01_dlna_vorbis.patch
 02_python_fixes.patch
+03_mtp_album.patch
+04_mtp_crash.patch
+




More information about the pkg-gnome-commits mailing list