Version: (using KDE KDE 3.1.4) Installed from: Debian stable Packages OS: Linux To Reproduce: 1. Delete/Rename $KDEHOME/share/config/noatunrc and $KDEHOME/share/apps/noatun 2. Start Noatun 3. Open Split playlist (always the default playlist?) 4. Click save button 5. CRASH!! (in KSaver::Save) - backtrace available if interested The problem is that there is no default playlistFile specified, so the mplaylistFile.path() is set to NULL. This crashes the saver. The patch also includes 2 minor things: 1. Fixes the logic of importing legacy splitplaylistdata (only if that file exist!) 2. Set the caption to include the filename of the currently used playlist Is SplitPlaylist still going to be the default in KDE3.2? It seems like it's suffering from severe bitrot. The warning at the start of view.cpp does not inspire confidence :->
Created attachment 2804 [details] Patch vs.KDE_3_1_BRANCH This patch is vs. my local modified copy. Not sure if it will apply cleanly to HEAD, but it's only a few lines.
I'd apply this patch if I had a clue if that new behaviour is wanted by others.
Subject: Re: [PATCH] Split playlist crash on save with clean $KDEHOME > I'd apply this patch if I had a clue if that new behaviour is wanted by others. huh? The patch fixes a crash - it doesn't add new behaviour. did you reply to the wrong bug?
> 1. Fixes the logic of importing legacy splitplaylistdata (only if that > file exist!) > 2. Set the caption to include the filename of the currently used playlist That's changed behaviour and not only a fix for a crash. Too bad the Noatun author is currently out of order so he can't comment on this either and I don't feel like changing behaviour of a plugin that I didn't code myself.
Subject: Re: [PATCH] Split playlist crash on save with clean $KDEHOME > > 1. Fixes the logic of importing legacy splitplaylistdata (only if that > > file exist!) > > 2. Set the caption to include the filename of the currently used playlist > That's changed behaviour and not only a fix for a crash. > Too bad the Noatun author is currently out of order so he can't comment on this either and I don't feel like changing behaviour of a plugin that I didn't code myself. oops, sorry - I forgot about part 2. Part 1. just fixes the crash though. Still, I think the crash should be fixed as it affects first time users which doesn't make a great first impression. Hopefully the playlist maintainer can take a look before 3.2
*** Bug 68796 has been marked as a duplicate of this bug. ***
Created attachment 3351 [details] Fix for crash if playlist hasn't been saved to a non-default location yet calls saveAs() in case the playlistfile var is empty, not only if it's invalid (just see changes in save() method). Also got rid of some deprecated methods. If this works fine then I'll commit it. The first patch for this bug changes logic which I don't want to touch because this is not my playlist code (I have my own playlist for changes like this *g*).
Looks good to me. Unfortunately, I don't have a HEAD build right noe so I can't test it. Once I get a chance I will let you know. btw. although this should avoid the crash, the default playlist and legacy playlist handling in view::init is still totally borked IMO. Can you add a FIXME with reference to my patch in case anyone is later interested in fixing it? I understand your reasoning for not wanting to change behavior. thanks
Crash fixed in CVS, this fix will appear in KDE 3.2 For the logic change I'd propose to open a new wishlist bugreport so it can be tracked and this bug can remain closed.