Bug 113042 - Crashes on next startup after sorting playlist with > 1500 entries
Summary: Crashes on next startup after sorting playlist with > 1500 entries
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.3-SVN
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-22 08:35 UTC by Mark Kretschmann
Modified: 2006-06-11 12:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (13.74 KB, text/plain)
2005-09-22 08:36 UTC, Mark Kretschmann
Details
fix (1.06 KB, patch)
2005-10-04 15:35 UTC, Mark Kretschmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Kretschmann 2005-09-22 08:35:09 UTC
Version:           1.3-SVN (using KDE 3.3.0, SuSE)
Compiler:          gcc version 3.2.2
OS:                Linux (i586) release 2.4.19-4GB

Start amaroK, compose a playlist with more than 1500 entries. Click on a playlist column to sort the playlist, e.g. "Filename", this one works reliably.

Exit amaroK, then start it again -> crash. Only way to get it working is rm current.xml.
Comment 1 Mark Kretschmann 2005-09-22 08:36:57 UTC
Created attachment 12653 [details]
Backtrace
Comment 2 Mark Kretschmann 2005-09-22 13:30:57 UTC
SVN commit 462932 by markey:

FIX: amaroK could crash on startup, if on last exit sorting was enabled in the playlist.

The problem was that KListView::restoreLayout() also restores the sort order. Then, with sorting enabled, we restored current.xml. Qt obviously did not find this funny.

BUG: 113042



 M  +2 -0      ChangeLog  
 M  +4 -1      src/playlist.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #462931:462932
@@ -15,6 +15,8 @@
       by dragging it. Patch by Eyal Lotem <eyal.lotem@gmail.com>. (BR 103990)
 
   BUGFIXES:
+    * amaroK could crash on startup, if on last exit sorting was enabled in
+      the playlist. (BR 113042)
     * Adding entries to a playlist and saving it could duplicate some tracks,
       if the playlist hadn't been expanded before. (BR 111579)
 
--- trunk/extragear/multimedia/amarok/src/playlist.cpp #462931:462932
@@ -214,7 +214,6 @@
     setDropVisualizer( false );   //we handle the drawing for ourselves
     setDropVisualizerWidth( 3 );
     setItemsRenameable( true );
-    KListView::setSorting( NO_SORT ); //use base so we don't saveUndoState() too
     setAcceptDrops( true );
     setSelectionMode( QListView::Extended );
     setAllColumnsShowFocus( true );
@@ -304,6 +303,10 @@
     engineStateChanged( EngineController::engine()->state() ); //initialise state of UI
     paletteChange( palette() ); //sets up glowColors
     restoreLayout( KGlobal::config(), "PlaylistColumnsLayout" );
+
+    // Sorting must be disabled when current.xml is being loaded. See BUG 113042
+    KListView::setSorting( NO_SORT ); //use base so we don't saveUndoState() too
+
     columnOrderChanged();
     //cause the column fractions to be updated, but in a safe way, ie no specific column
     columnResizeEvent( header()->count(), 0, 0 );
Comment 3 Mark Kretschmann 2005-10-04 15:35:38 UTC
Created attachment 12841 [details]
fix