GNOME Bugzilla – Bug 353119
Make rhythmdb enforce URI-uniqueness
Last modified: 2018-05-24 11:47:59 UTC
From: Ilkka Rauta <ilkka.rauta@gmail.com> To: submit@bugs.gnome.org X-Mailer: bug-buddy 2.14.0 Subject: Rhythmbox crashes when removing radio stations Distribution: Ubuntu 6.06 (dapper) Package: rhythmbox Severity: Normal Version: GNOME2.14.3 0.9.3.1 Gnome-Distributor: Ubuntu Synopsis: Rhythmbox crashes when removing radio stations Bugzilla-Product: rhythmbox Bugzilla-Component: general Bugzilla-Version: 0.9.3.1 BugBuddy-GnomeVersion: 2.0 (2.14.1) Description: Description of the crash: I had two items in the internet radio station listing, that are pointing to same playlist address. Removing one works, but when the other item is removed, application crashes. When the program is started again, neither of the items were removed from the list. Steps to reproduce the crash: 1. Insert two items in the radio station listing, that have the same playlist address. 2. Remove one of them. 3. Then, remove the other too. Expected Results: Crash. How often does this happen? This seems to happen consistently no matter what the radio station is, though my testing is quite limited. Additional information: The duplicate entries can be removed, if Rhythmbox is closed and started again after removing the first radio list item. Debugging Information: Backtrace was generated from '/usr/bin/rhythmbox' (no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1226078528 (LWP 12009)] [New Thread -1249403984 (LWP 12012)] [New Thread -1241011280 (LWP 12011)] (no debugging symbols found) 0xffffe410 in __kernel_vsyscall ()
+ Trace 71078
Thread 1 (Thread -1226078528 (LWP 12009))
------- Bug created by bug-buddy at 2006-08-27 17:45 ------- Bugreport had an attachment. This cannot be imported to Bugzilla. Contact bugmaster@gnome.org if you are willing to write a patch for this.
Thanks for the bug report. Unfortunately, that stack trace is not very useful in determining the cause of the crash. Can you get us one with debugging symbols? Please see http://live.gnome.org/GettingTraces for more information on how to do so.
That's not actually necessary. The problem here is that we let the user modify the location of one entry to match that of another, when locations are supposedly unique. Deleting the first entry removes the location->entry mapping. Deleting the second triggers an assertion on that same operation.
I leave the stack trace out, as it seems it is not needed, but the error message from gdb looks like this (just for confirmation): RhythmDB-ERROR **: file rhythmdb-tree.c: line 1246 (rhythmdb_tree_entry_delete): assertion failed: (g_hash_table_lookup (db->priv->entries, entry->location) != NULL) aborting... I also have to add, that I added the duplicates simply by clicking the playlist link in the radio station's web page (http://somafm.com/ with Firefox) when Rhytmbox is not running. The same items are added to the station list every time. This might be a place for another bug report - I am not sure if this is in any way related to this bug - but the radio station does not start playing when Rhythmbox starts, it is just added to the station list.
I can't reproduce that. Repeatedly adding the same stream doesn't create any duplicate entries in the iradio source for me. Which particular playlist link are you using? Bug 343654 is about how we handle radio streams added through locally downloaded playlist files.
The playlist is http://somafm.com/groovesalad.pls (Groove Salad, 128k mp3). The radio channel list items are not added multiple times, if Rhythmbox is running when the when the link is clicked.
Created attachment 82002 [details] [review] patch This should fix the problem, by complaining if the user tried to change the URI to be the same as that of an existing station.
Looks OK to me. I'd also like to have a way to make property changes fail at the rhythmdb level if they violate a constraint like this, but reporting sensible errors would be hard.
I've committed the patch to cvs. Retitling bug to reflect issue from last comment
-- 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/231.