Review Request 111804: Fix a crash on startup

Konrad Zemek konrad.zemek at gmail.com
Wed Jul 31 01:29:36 UTC 2013



> On July 31, 2013, 1:14 a.m., Konrad Zemek wrote:
> > src/playlist/PlaylistSortWidget.cpp, line 73
> > <http://git.reviewboard.kde.org/r/111804/diff/1/?file=175527#file175527line73>
> >
> >     There will still be a crash if the sort level is saved as, say, "adwawd_asc". The solution would be to rework this to first check if such column exists (perhaps just by checking if columnForName returns a non-negative integer).

The crash would occur in the addLevel method, so in lines 74, 76 (what I meant to do was to highlight multiple lines, but obviously I failed).
One more clarification, Amarok of course *won't* save a level "adwawd_asc". It will save only valid tokens, for instance, "Artist_asc". We'll have a crash if for whatever reason something external (like data corruption) would change the token to "Artisr_asc".


- Konrad


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111804/#review36849
-----------------------------------------------------------


On July 30, 2013, 8:16 p.m., Fabian Kosmale wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111804/
> -----------------------------------------------------------
> 
> (Updated July 30, 2013, 8:16 p.m.)
> 
> 
> Review request for Amarok.
> 
> 
> Description
> -------
> 
> Without this patch, Amarok would crash with 
> ASSERT failure in QList<T>::at: "index out of range"
> when amarokrc contained
> [Playlist Sorting]
> SortPath=Shuffle
> 
> 
> Diffs
> -----
> 
>   src/playlist/PlaylistSortWidget.cpp 384e4a0eaa28f82eb27665a1a0d497e018a61161 
> 
> Diff: http://git.reviewboard.kde.org/r/111804/diff/
> 
> 
> Testing
> -------
> 
> Compiled and started Amarok. It doesn't crash anymore.
> 
> 
> Thanks,
> 
> Fabian Kosmale
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20130731/ddc5912d/attachment-0001.html>


More information about the Amarok-devel mailing list