Bug 133632 - Amarok saves invalid XML for playlists on KDE exit
Summary: Amarok saves invalid XML for playlists on KDE exit
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 124294 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-06 07:22 UTC by Marcelo Vanzin
Modified: 2006-09-13 10:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcelo Vanzin 2006-09-06 07:22:34 UTC
Version:           1.4.2 (using KDE KDE 3.5.4)
Installed from:    SuSE RPMs
OS:                Linux

Do the following:

- Choose the "Whole Collection" playlist (don't know the exact English wording, my Amarok is in French and says "Toute la Collection")

- Don't exit Amarok; end the current KDE session instead. (I guess this would be a pretty common usage, keeping amarok always in the background.)

- Start KDE again; when Amarok loads up, it will complain about the XML of the playlist file being invalid.

And, sure enough, if I look at "current.xml", this is what I see:

 <item url="file:///external/common/music/Deep%20Purple/Deep%20Purple%20In%20Rock/09%20Studio%20Chat%20(1).ogg" uniqueid="" >
  <Filename>09 Studio Chat (1).ogg</Filename>
  <Title>Studio Chat (1)</Title>
  <Artist>Deep Purple</Artist>
  <Composer><

(file ends after the "<")

My playlist has about 1400 songs; I don't know if the size makes any difference or not. If I exit amarok by normal means (meaning I use amarok's "exit", instead of however KDE kills it), things seem to work fine.
Comment 1 Mark Kretschmann 2006-09-06 08:28:00 UTC
Upgrade to 1.4.3; playlist saving has been made a lot faster, so that truncating on exit is less likely. 1400 tracks should be handled OK.

However, at the core this is really a KDE issue. KDE should not kill applications without asking the user. When you put 10000 tracks in your playlist, you will probably still run into problems, as it simply takes some time to store this information.
Comment 2 Marcelo Vanzin 2006-09-06 18:52:07 UTC
Hi Mark,

Why isn't the "current.xml" file saved when you change the active playlist? It would most probably get rid of the problem, since it's unlikely that a user will leave its session right after changing the playlist. If saving the file takes too long, you can always use a thread. :-)

Also, I am asking KDE to kill my apps, since I requested it to terminate my session. But I thought it did something more than just killing the app, like some kind of "OK, I'm shutting down, clean up after yourself and let me know when you're done" message.
Comment 3 Mark Kretschmann 2006-09-06 20:19:42 UTC
*** Bug 124294 has been marked as a duplicate of this bug. ***
Comment 4 Alexandre Oliveira 2006-09-08 18:56:51 UTC
*** Bug 133761 has been marked as a duplicate of this bug. ***
Comment 5 richlv 2006-09-13 10:15:37 UTC
marcelo, it says "ok, i am shutting down, you have two seconds. one, two, bang-bang-bang. " ;)
as markey told, playlist saving upon changes could be implemented after undo system refactoring (saving was even implemented at some point, but it messed up undo system).