Bug 147587 - Playlist crashes after the last song finished (for a special case only)
Summary: Playlist crashes after the last song finished (for a special case only)
Status: RESOLVED WORKSFORME
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 1.4.8
Platform: Debian stable Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-05 19:29 UTC by Marcel Dischinger
Modified: 2008-07-03 12:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch for this bug (amarok 1.4.8) (522 bytes, patch)
2007-12-26 00:13 UTC, Modestas Vainius
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Dischinger 2007-07-05 19:29:46 UTC
Version:           1.4-svn (using KDE KDE 3.5.5)
Installed from:    Debian stable Packages
Compiler:          gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21) 
OS:                Linux

Amarok crashes for me (always) in the following situation:

I am adding two new songs to the playlist. I am playing the second last song, then Amarok switches to the last song. While the last song plays, I am removing the second last song from the playlist. When the last song finishes playing, Amarok crashes.
This also happens when I add more than two songs, then I start playing the first. While the second song plays, I remove the first one. When the second song finishes, Amarok crashes.
This does not happen if I start Amarok and just play the already existing songs on the playlist (doing the same removal strategy as before).

Here's the gdb output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1244768576 (LWP 18771)]
0xb6927d43 in QString::QString () from /usr/lib/libqt-mt.so.3
(gdb) where
#0  0xb6927d43 in QString::QString () from /usr/lib/libqt-mt.so.3
#1  0xb6705b1e in QListViewItem::text () from /usr/lib/libqt-mt.so.3
#2  0xb6fcd0a5 in KListViewLineEdit::load () from /usr/lib/libkdeui.so.4
#3  0xb6fcd2da in KListView::rename () from /usr/lib/libkdeui.so.4
#4  0xb7d21f51 in Playlist::rename () from /usr/lib/libamarok.so.0
#5  0xb7d1b51d in Playlist::slotSingleClick () from /usr/lib/libamarok.so.0
#6  0xb7d39887 in Playlist::qt_invoke () from /usr/lib/libamarok.so.0
#7  0xb6612d4f in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#8  0xb66137e0 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#9  0xb699dfaa in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#10 0xb663a603 in QTimer::event () from /usr/lib/libqt-mt.so.3
#11 0xb65aac26 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#12 0xb65aca43 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#13 0xb6d73e0e in KApplication::notify () from /usr/lib/libkdecore.so.4
#14 0xb653e421 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#15 0xb659d623 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#16 0xb655276f in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#17 0xb65c5179 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#18 0xb65c4f9a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#19 0xb65ac7bf in QApplication::exec () from /usr/lib/libqt-mt.so.3
#20 0x0804bf59 in main ()

For the record: I am using xine engine without crossfading but with fadeout (2000ms) and fadeout on exit.
Comment 1 Modestas Vainius 2007-12-26 00:13:41 UTC
Created attachment 22680 [details]
patch for this bug (amarok 1.4.8)

The problem can reproduced by clicking on the selected PlaylistItem (therefore
'rename' gets scheduled) and deleting it faster than m_clicktimer fires (a user
must be really quick to do both actions but some of them are :-) ) which was
started at playlist.cpp:2845 as of amarok 1.4.8. Attempt to rename deleted item
causes the crash reported in this bug report. Attached patch fixes the bug by
stopping m_clicktimer when deleting m_itemToRename.
Comment 2 Marcel Dischinger 2008-01-08 13:37:10 UTC
Great, Amarok no longer crashes under such a condition. Thanks.
Comment 3 Modestas Vainius 2008-01-09 00:07:49 UTC
Really, which commit fixed it? (stable) src/playlist.cpp was modified 7 weeks ago and my patch has not been applied yet. Don't ignore the problem if it's reproducible a bit differently. However, the backtrace is the same and it's very likely the root cause is the same. And it's still present in amarok 1.4.8, I verified.
Comment 4 Modestas Vainius 2008-01-09 00:13:45 UTC
Marcel, sorry for kind of taking over your bug, though.
Comment 5 Marcel Dischinger 2008-01-10 19:08:50 UTC
OK, I assumed that your patch went into 1.4.8 and Amarok did not crash for me in some time using the latest 1.4SVN.
I just tested Amarok again but I am not able to reproduce it anymore. But as you can, I am reopening the bug.
Comment 6 David Leutwyler 2008-06-15 19:13:00 UTC
I havnt been able to reproduce it in 1.4.9.1 or. 2.x.Nightly r820526. Fixed.
Comment 7 Seb Ruiz 2008-07-03 12:46:19 UTC
closing then, thanks