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 346801 - UI freezes while scanning inserted audio CD
UI freezes while scanning inserted audio CD
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Removable Media
HEAD
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-06 20:14 UTC by Peter
Modified: 2018-05-24 11:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
fix RBBrowserSource radio actions (1.37 KB, patch)
2006-07-19 11:47 UTC, James "Doc" Livingston
committed Details | Review

Description Peter 2006-07-06 20:14:54 UTC
Using CVS or 0.9.5 version of Rhythmbox on Ubuntu "Dapper Drake".

Steps to reproduce:
1. Load rhythmbox
2. Play some music (optional)
3. Insert an audio CD

Observed results
4. UI goes blank for a few seconds, music continues if playing
5. UI returns with the CD on the list of sources, with name and tracks filled in from online sources.

Expected results
4. CD appears on the list of sources, initially with blank name
5. A few seconds later, after online lookup, CD name and track names are filled in.

This is reproduceable, even if the same CD is ejected and re-inserted.  See also Bug 328526 – Add metadata cache for audio players
Comment 1 Alex Lancaster 2006-07-07 10:31:04 UTC
I've seen this before too.  Confirming bug.
Comment 2 James "Doc" Livingston 2006-07-11 08:31:45 UTC
For me it seems that nautilus_burn_drive_door_is_open (called from poll_tray_opened) blocks while the the tray is closing.

This should hopefully be fixed by us letting libnautilusburn deal with that stuff, if you have ncb >= 2.15.3. However I haven't checked yet.
Comment 3 William Jon McCann 2006-07-11 13:39:49 UTC
That wouldn't surprise me at all.  Before n-c-b depended completely on HAL we had to open devices exclusively.  If the device was already in use then it would block for up to 10 seconds waiting to acquire a lock.  That wouldn't normally be a problem if HAL didn't also try to manage the drive.

Polling the door will still be problematic because that bit hasn't been moved to HAL yet.
Comment 4 James "Doc" Livingston 2006-07-12 06:56:07 UTC
(In reply to comment #3)
> Polling the door will still be problematic because that bit hasn't been moved
> to HAL yet.

That wouldn't be a problem though, because with newer n-c-b we don't do the drive-door polling.
Comment 5 Brian Cameron 2006-07-12 23:31:42 UTC
nautilus-cd-burner 2.14.3 isn't yet released.  Any ideas when it will be released since you say that will fix this bug?
Comment 6 William Jon McCann 2006-07-12 23:41:29 UTC
We should probably not use n-c-b at all in rb-removable-media-manager if gnome-vfs is built with HAL.

Brian, does Solaris use HAL yet?  If not, then do you see this bug at all?
Comment 7 James "Doc" Livingston 2006-07-13 11:32:45 UTC
Brian: 2.15.3 not 2.14.3 (from Gnome 2.16).


One potential issue with changing out n-c-b use depending on the presence of HAL is that I'm not aware of a way to find out whether gnomevfs was bult with it or not. However using whether RB was built with HAL support may be close enough, because vfs-with/rb-without would result in exactly what we do now, and vfs-without/rb-with wouldn't occur that often.
Comment 8 Brian Cameron 2006-07-13 17:33:54 UTC
Okay, I'll try upgrading to 2.15.3 (or 2.15.4) and see if that helps.  But the problem might be different.  I notice that it seems like it freezes when you run rhythmbox with a CD inserted, but if I run in the debugger it says there is a SEGV with the following callback.  Seems strange for it to crash in GTK functions.

  [1] _smalloc(0x10), at 0xd0f1356a 
  [2] _malloc_unlocked(0x10, 0xd0bb7270, 0x1b3, 0xcf351540, 0xd0bb7270, 0x1b3), at 0xd0f137b4 
  [3] realloc(0x0, 0xc), at 0xd0f13b2d 
=>[4] standard_realloc(mem = (nil), n_bytes = 12U), line 91 in "gmem.c"
  [5] g_realloc(mem = (nil), n_bytes = 12U), line 168 in "gmem.c"
  [6] g_object_watch_closure(object = 0x855fdb8, closure = 0x85875ff), line 2140 in "gobject.c"
  [7] g_closure_new_object(sizeof_closure = 16U, object = 0x855fdb8), line 2164 in "gobject.c"
  [8] gtk_action_init(action = 0x855fdb8), line 348 in "gtkaction.c"
  [9] g_type_create_instance(type = 138373256U), line 1559 in "gtype.c"
  [10] g_object_constructor(type = 138373256U, n_construct_properties = 1U, construct_params = 0x856cfb8), line 1015 in "gobject.c"
  [11] g_object_newv(object_type = 138373256U, n_parameters = 5U, parameters = 0x8558010), line 912 in "gobject.c"
  [12] g_object_new_valist(object_type = 138373256U, first_property_name = 0xd0bb7268 "name", var_args = 0x80470b8), line 996 in "gobject.c"
  [13] g_object_new(object_type = 138373256U, first_property_name = 0xd0bb7268 "name", ... = 0x81a08c8, ...), line 793 in "gobject.c"
  [14] gtk_radio_action_new(name = 0x81a08c8 "BrowserSourceSearchAll", label = 0x81a0bbc "All", tooltip = 0x81a0bc0 "Search all fields", stock_id = (nil), value = 0), line 224 in "gtkradioaction.c"
  [15] gtk_action_group_add_radio_actions_full(action_group = 0x8418c90, entries = 0x81c8414, n_entries = 4U, value = 0, on_change = 0x80ff890 = &`rhythmbox`rb-browser-source.c`search_action_changed(GtkRadioAction *action, GtkRadioAction *current, RBShell *shell), user_data = 0x8318000, destroy = (nil)), line 981 in "gtkactiongroup.c"
  [16] gtk_action_group_add_radio_actions(action_group = 0x8418c90, entries = 0x81c8414, n_entries = 4U, value = 0, on_change = 0x80ff890 = &`rhythmbox`rb-browser-source.c`search_action_changed(GtkRadioAction *action, GtkRadioAction *current, RBShell *shell), user_data = 0x8318000), line 931 in "gtkactiongroup.c"
  [17] rb_browser_source_constructor(type = 139920024U, n_construct_properties = 4U, construct_properties = 0x856e8a8), line 374 in "rb-browser-source.c"
  [18] rb_removable_media_source_constructor(type = 139920024U, n_construct_properties = 4U, construct_properties = 0x856e8a8), line 134 in "rb-removable-media-source.c"
  [19] rb_audiocd_source_constructor(type = 139920024U, n_construct_properties = 4U, construct_properties = 0x856e8a8), line 141 in "rb-audiocd-source.c"
  [20] g_object_newv(object_type = 139920024U, n_parameters = 4U, parameters = 0x8556500), line 912 in "gobject.c"
  [21] g_object_new_valist(object_type = 139920024U, first_property_name = 0x819ef30 "entry-type", var_args = 0x80473bc), line 996 in "gobject.c"
  [22] g_object_new(object_type = 139920024U, first_property_name = 0x819ef30 "entry-type", ... = 0x5, ...), line 793 in "gobject.c"
  [23] rb_audiocd_source_new(shell = 0x8318000, volume = 0x8329560), line 174 in "rb-audiocd-source.c"
  [24] rb_removable_media_manager_mount_volume(mgr = 0x8251e20, volume = 0x8329560), line 629 in "rb-removable-media-manager.c"
  [25] rb_removable_media_manager_scan(manager = 0x8251e20), line 806 in "rb-removable-media-manager.c"
  [26] rb_removable_media_manager_load_media(manager = 0x8251e20), line 554 in "rb-removable-media-manager.c"
  [27] g_idle_dispatch(source = 0x8468200, callback = 0x80d86f0 = &rb_removable_media_manager_load_media(RBRemovableMediaManager *manager), user_data = 0x8251e20), line 3796 in "gmain.c"
  [28] g_main_dispatch(context = 0x8253d08), line 1918 in "gmain.c"
  [29] g_main_context_dispatch(context = 0x8253d08), line 2466 in "gmain.c"
  [30] g_main_context_iterate(context = 0x8253d08, block = 1, dispatch = 1, self = 0x81f13b8), line 2547 in "gmain.c"
  [31] g_main_loop_run(loop = 0x855e848), line 2751 in "gmain.c"
  [32] bonobo_main(0x8047a70, 0x804798c, 0xd0ffb748, 0x825a2c8, 0x81973a8, 0x820cd88), at 0xcefaf3b2 
  [33] main(argc = 1, argv = 0x80479d0), line 425 in "main.c"
Comment 9 James "Doc" Livingston 2006-07-19 11:47:40 UTC
Created attachment 69170 [details] [review]
fix RBBrowserSource radio actions

It looks like we're adding the radio actions to the GtkActionGroup irrespective of whether we've already done that. This patch fixes that, and hopefully that crash.
Comment 10 Brian Cameron 2006-07-19 16:49:13 UTC
Thanks.  I just tried out your patch.  Unfortunately it is still crashing, but in a different place.

One question, why are you moving the g_object_unref to before the _rb_source_register_action_group and gtk_action-group-add_radio_actions call 
when these functions are passed in the shell variable?  Shouldn't the unref stay 
after these calls?

Anyway, I tried out the patch (with g_object_unref both where your patch places it and after the calls as I suggest above).  In either case, I see the same core 
dump now.  I wonder if there is some memory corruption or something going on.  
It seems odd to core dump in realloc functions, and for the problem to move from 
radio_button code to bsearch logic.  Here is the stack trace I am now seeing:

  [1] _smalloc(0x10), at 0xd0f1356a 
  [2] _malloc_unlocked(0x10), at 0xd0f137b4 
  [3] realloc(0x854bdef, 0x10), at 0xd0f13958 
=>[4] standard_realloc(mem = 0x854bdef, n_bytes = 16U), line 91 in "gmem.c"
  [5] g_realloc(mem = 0x854bdef, n_bytes = 16U), line 168 in "gmem.c"
  [6] g_bsearch_array_grow(barray = 0x854bdef, bconfig = 0xd0539a78, index = 0), line 216 in "gbsearcharray.h"
  [7] g_bsearch_array_insert(barray = 0x854bdef, bconfig = 0xd0539a78, key_node = 0x8046f18), line 231 in "gbsearcharray.h"
  [8] g_bsearch_array_replace(barray = 0x854bdef, bconfig = 0xd0539a78, key_node = 0x8046f18), line 260 in "gbsearcharray.h"
  [9] instance_real_class_set(instance = 0x8471e10, class = 0x8436a00), line 1490 in "gtype.c"
  [10] g_type_create_instance(type = 138635032U), line 1550 in "gtype.c"
  [11] g_object_constructor(type = 138635032U, n_construct_properties = 1U, construct_params = 0x856ade0), line 1015 in "gobject.c"
  [12] rb_library_browser_constructor(type = 138635032U, n_construct_properties = 1U, construct_properties = 0x856ade0), line 164 in "rb-library-browser.c"
  [13] g_object_newv(object_type = 138635032U, n_parameters = 1U, parameters = 0x856f670), line 912 in "gobject.c"
  [14] g_object_new_valist(object_type = 138635032U, first_property_name = 0x81a5d1c "db", var_args = 0x8047158), line 996 in "gobject.c"
  [15] g_object_new(object_type = 138635032U, first_property_name = 0x81a5d1c "db", ... = 0x832d000, ...), line 793 in "gobject.c"
  [16] rb_library_browser_new(db = 0x832d000), line 268 in "rb-library-browser.c"
  [17] rb_browser_source_constructor(type = 138514432U, n_construct_properties = 4U, construct_properties = 0x84f6c10), line 381 in "rb-browser-source.c"
  [18] rb_removable_media_source_constructor(type = 138514432U, n_construct_properties = 4U, construct_properties = 0x84f6c10), line 134 in "rb-removable-media-source.c"
  [19] rb_audiocd_source_constructor(type = 138514432U, n_construct_properties = 4U, construct_properties = 0x84f6c10), line 141 in "rb-audiocd-source.c"
  [20] g_object_newv(object_type = 138514432U, n_parameters = 4U, parameters = 0x856fe30), line 912 in "gobject.c"
  [21] g_object_new_valist(object_type = 138514432U, first_property_name = 0x819da50 "entry-type", var_args = 0x80473bc), line 996 in "gobject.c"
  [22] g_object_new(object_type = 138514432U, first_property_name = 0x819da50 "entry-type", ... = 0x5, ...), line 793 in "gobject.c"
  [23] rb_audiocd_source_new(shell = 0x8334020, volume = 0x833fb60), line 174 in "rb-audiocd-source.c"
  [24] rb_removable_media_manager_mount_volume(mgr = 0x82504c0, volume = 0x833fb60), line 629 in "rb-removable-media-manager.c"
  [25] rb_removable_media_manager_scan(manager = 0x82504c0), line 806 in "rb-removable-media-manager.c"
  [26] rb_removable_media_manager_load_media(manager = 0x82504c0), line 554 in "rb-removable-media-manager.c"
  [27] g_idle_dispatch(source = 0x8471670, callback = 0x80d7f20 = &rb_removable_media_manager_load_media(RBRemovableMediaManager *manager), user_data = 0x82504c0), line 3796 in "gmain.c"
  [28] g_main_dispatch(context = 0x82520c0), line 1918 in "gmain.c"
  [29] g_main_context_dispatch(context = 0x82520c0), line 2466 in "gmain.c"
  [30] g_main_context_iterate(context = 0x82520c0, block = 1, dispatch = 1, self = 0x81efc38), line 2547 in "gmain.c"
  [31] g_main_loop_run(loop = 0x85779e8), line 2751 in "gmain.c"
  [32] bonobo_main(0x8047a5c, 0x804798c, 0xd0ffb748, 0xced70a00, 0xd0fc0308, 0x82cb2f0), at 0xcefaf3b2 
  [33] main(argc = 1, argv = 0x80479d0), line 425 in "main.c"
Comment 11 James "Doc" Livingston 2006-07-24 12:06:27 UTC
That does sound like some memory corruption.

I can't reproduce it here, and valgrind doesn't appear to show anything odd. I don't suppose you can try doing that while running RB under valgrind, and see if it produces any errors that are likely to cause the corruption?
Comment 12 Jonathan Matthew 2006-10-29 08:19:07 UTC
Since the patch was obviously correct and didn't break anything, I committed it.  Apparently it doesn't fix the crash, and it certainly doesn't do anything about CD scanning blocking the UI, so I'm leaving it open.
Comment 13 Alberto Garcia 2010-03-26 13:47:38 UTC
(In reply to comment #8)
>   [1] _smalloc(0x10), at 0xd0f1356a 
>   [2] _malloc_unlocked(0x10, 0xd0bb7270, 0x1b3, 0xcf351540, 0xd0bb7270, 0x1b3),
> at 0xd0f137b4 
>   [3] realloc(0x0, 0xc), at 0xd0f13b2d 
> =>[4] standard_realloc(mem = (nil), n_bytes = 12U), line 91 in "gmem.c"
>   [5] g_realloc(mem = (nil), n_bytes = 12U), line 168 in "gmem.c"
>   [6] g_object_watch_closure(object = 0x855fdb8, closure = 0x85875ff), line
> 2140 in "gobject.c"

This might be caused by bug 613822
Comment 14 GNOME Infrastructure Team 2018-05-24 11:38:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/rhythmbox/issues/202.