Bug 66182 - [PATCH] Split playlist crash on save with clean $KDEHOME
Summary: [PATCH] Split playlist crash on save with clean $KDEHOME
Status: RESOLVED FIXED
Alias: None
Product: noatun
Classification: Miscellaneous
Component: split (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR crash
Target Milestone: ---
Assignee: Charles Samuels
URL:
Keywords:
: 68796 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-18 04:34 UTC by kdozer
Modified: 2003-12-05 23:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch vs.KDE_3_1_BRANCH (1.57 KB, patch)
2003-10-18 04:36 UTC, kdozer
Details
Fix for crash if playlist hasn't been saved to a non-default location yet (2.20 KB, patch)
2003-11-22 19:23 UTC, Stefan Gehn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kdozer 2003-10-18 04:34:38 UTC
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 :->
Comment 1 kdozer 2003-10-18 04:36:20 UTC
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.
Comment 2 Stefan Gehn 2003-11-16 16:30:09 UTC
I'd apply this patch if I had a clue if that new behaviour is wanted by others.
Comment 3 kdozer 2003-11-16 21:11:09 UTC
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?

Comment 4 Stefan Gehn 2003-11-16 21:20:19 UTC
> 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.
Comment 5 kdozer 2003-11-17 07:16:59 UTC
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

Comment 6 Stefan Gehn 2003-11-22 19:08:28 UTC
*** Bug 68796 has been marked as a duplicate of this bug. ***
Comment 7 Stefan Gehn 2003-11-22 19:23:33 UTC
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*).
Comment 8 kdozer 2003-12-05 01:50:26 UTC
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

Comment 9 Stefan Gehn 2003-12-05 23:18:18 UTC
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.