Bug#532232: rhythmbox SIGSEV on MTP device insertion

Mathieu GELI mathieu.geli at gmail.com
Sun Jun 7 17:44:25 UTC 2009

Package: rhythmbox
Version: 0.12.1-1
Severity: normal


rhythmbox crashes whenever I insert my MTP player (samsung YP-U3).
Here is the backtrace produced with gdb :

#0  IA__g_str_hash (v=0x0) at
#1  0xb7191678 in g_hash_table_insert_internal (hash_table=0xa128f20,
key=0x0, value=0xa233530, keep_new_key=0)
    at /build/buildd-glib2.0_2.20.3-1-i386-o59wJY/glib2.0-2.20.3/glib/ghash.c:268
#2  0xb3de0d08 in load_mtp_db_idle_cb (source=0x9be8a90) at rb-mtp-source.c:653
#3  0xb719d941 in g_idle_dispatch (source=0x9e66b88, callback=0,
    at /build/buildd-glib2.0_2.20.3-1-i386-o59wJY/glib2.0-2.20.3/glib/gmain.c:3919
#4  0xb719f848 in IA__g_main_context_dispatch (context=0x9bc2b08)
    at /build/buildd-glib2.0_2.20.3-1-i386-o59wJY/glib2.0-2.20.3/glib/gmain.c:1814
#5  0xb71a2d73 in g_main_context_iterate (context=0x9bc2b08, block=1,
dispatch=1, self=0x9a731a8)
    at /build/buildd-glib2.0_2.20.3-1-i386-o59wJY/glib2.0-2.20.3/glib/gmain.c:2445
#6  0xb71a324a in IA__g_main_loop_run (loop=0x9e1fd28) at
#7  0xb78ee3e9 in IA__gtk_main () at
#8  0x080638e2 in main (argc=163630832, argv=0x5) at main.c:333

If I enable rhythmbox debug output I can see the latest album name is
NULL. That's what causing the crash when calling g_hash_insert().
Here's the simple fix I can produce :

--- rhythmbox-0.12.1/plugins/mtpdevice/rb-mtp-source.c	2009-04-20
09:38:15.000000000 +0200
+++ rhythmbox-0.12.1-new/plugins/mtpdevice/rb-mtp-source.c	2009-06-07
19:35:40.000000000 +0200
@@ -650,7 +650,8 @@

 		for (album = albums; album != NULL; album = album->next) {
 			rb_debug ("album: %s, %d tracks", album->name, album->no_tracks);
-			g_hash_table_insert (priv->album_map, album->name, album);
+			if (album->name != NULL)
+				g_hash_table_insert (priv->album_map, album->name, album);
 			if (album->no_tracks != 0) {
 				device_forgets_albums = FALSE;

but no idea if that's the smartest way to solve it.



More information about the pkg-gnome-maintainers mailing list