Summary: | juk crashes selecting playlist after removing files from Collection List | ||
---|---|---|---|
Product: | [Applications] juk | Reporter: | Mr. Gil <mrgil23> |
Component: | general | Assignee: | Michael Pyne <mpyne> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | andresbajotierra, d.p.hodgins, harrisonmetz, kmputerguy, mpyne, tyrerj, ulrick2 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian testing | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Fix crash in some cases because improper deleter used |
Description
Mr. Gil
2008-09-18 19:15:32 UTC
Version: 3.1.1 (using KDE 4.1.1) Compiler: gcc 4.2.4 OS: Gentoo GNU/Linux This bug happens to me as well. Lets get it marked as confirmed and find a solution. While I have not had time to hack around in the juk sources, I would imagine a media player could do a few things when a file is removed from the master collection: 1) Remove it from the master collection, but still let the playlist play the file. 2) Remove it from the master collection, then whenever a playlist is "loaded" it should see that the song it references is not there and remove the item. 3) Remove it from the master collection, and continue removing that file from each playlist (this may take time if the user has many playlists -- do we want a remove from collection operation to be instant?) Personally, I vote for number 2. Lastly, (not sure if this bug has been reported) but I can get juk to crash if I remove a file from my HD which is referenced in a playlist when I click on the playlist. It appears as if Juk doesn't know what to do when I file it once know existed can not be referenced. I've been using JuK for about 6 months, and this crash started about 3 months ago. I've always removed songs from the Collection List and JuK used to successfully do what it says in the dialog box that pops up when I ask to remove the files: ---------------- Warning - JuK Removing an item from the collection will also remove it from all of your playlists Are you sure you want to continue? Note, however, that if the directory that these files are in is in your "scan on startup" list, they will be readded on startup. ----------------- This may be related to bug 142366 (similar backtrace) *** Bug 142366 has been marked as a duplicate of this bug. *** Created attachment 31357 [details]
Fix crash in some cases because improper deleter used
I think I've fixed a similar bug in KDE 4 trunk, due to not removing all deleted PlaylistItems from some cached lists. Can you try this patch out (I haven't compiled it against 3.5 yet as I no longer run 3.5)? If it works I'll forward it to whatever the KDE packagers list is so that it can be picked up by the distros.
In retrospect the proper fix is to make the PlaylistItem dtor take care of all of this but seeing as how I've not even compiled this I don't want to get that invasive.
*** Bug 106872 has been marked as a duplicate of this bug. *** *** Bug 106760 has been marked as a duplicate of this bug. *** I'm assuming the listed patch works due to lack of response --> closing. SVN commit 933498 by mpyne: Commit potential fix for improperly deleted PlaylistItems to 3.5 branch for user testing. CCBUG:171289 M +2 -2 collectionlist.cpp M +1 -1 playlist.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=933498 Change to collectionlist.cpp @@ -472,7 +472,7 @@ it != m_children.end(); ++it) { - delete *it; + clearItem(*it); } causes build error with GCC-4.3.3 collectionlist.cpp: In destructor 'virtual CollectionListItem::~CollectionListItem()': collectionlist.cpp:475: error: 'clearItem' was not declared in this scope I presume that this always was an error, but it only showed up when I upgraded the compiler. |