Bug 174786 - dragging an album within playlist makes amarok crash
Summary: dragging an album within playlist makes amarok crash
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.0-beta
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-10 15:22 UTC by Stefan Katscher
Modified: 2009-12-09 11:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Katscher 2008-11-10 15:22:12 UTC
Version:           amarok 2.0 Beta3 (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

If you select an album in the playlist, drag and drop it to the end of the playlist, amarok will crash.

Steps to reproduce:
1. Adding an album to playlist by double clicking on it. Playlist was empty before.
2. Select the whole album in the playlist by clicking on its title
3. Move the mouse over an song in the playlist, then drag the whole album
4. Go down with the mouse to the end of the playlist, drop the album there
5. See amarok crash

Backtrace:
Anwendung: Amarok (amarok), Signal SIGABRT
[Thread debugging using libthread_db enabled]
[New Thread 0xb49386c0 (LWP 6836)]
[New Thread 0xa8525b90 (LWP 6907)]
[New Thread 0xa953fb90 (LWP 6893)]
[New Thread 0xa9f31b90 (LWP 6892)]
[New Thread 0xaa8ffb90 (LWP 6891)]
[New Thread 0xab607b90 (LWP 6890)]
[New Thread 0xad562b90 (LWP 6857)]
[New Thread 0xadd63b90 (LWP 6856)]
[New Thread 0xae564b90 (LWP 6853)]
[New Thread 0xafc75b90 (LWP 6852)]
[New Thread 0xb0e5ab90 (LWP 6844)]
[New Thread 0xb165bb90 (LWP 6843)]
[New Thread 0xb1e9eb90 (LWP 6842)]
[New Thread 0xb2703b90 (LWP 6839)]
[KCrash handler]
#6  0xb805e430 in __kernel_vsyscall ()
#7  0xb6aad880 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb6aaf248 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb7531795 in qt_message_output () from /usr/lib/libQtCore.so.4
#10 0xb7531872 in qFatal () from /usr/lib/libQtCore.so.4
#11 0xb75318cc in qt_assert_x () from /usr/lib/libQtCore.so.4
#12 0xb7da2375 in Playlist::Model::moveTracksCommand (this=0xa308218,
    cmds=@0xb3a4558, reverse=false) at /usr/include/qt4/QtCore/qlist.h:395
#13 0xb7da8d21 in Playlist::MoveTracksCmd::redo (this=0xb3a4550)
    at /build/buildd/amarok-kde4-1.94/src/playlist/UndoCommands.cpp:78
#14 0xb7300cd8 in QUndoStack::push () from /usr/lib/libQtGui.so.4
#15 0xb7d9b1c1 in Playlist::Controller::moveRows (this=0xa461348,
    from=@0xbfe5d114, to=@0xbfe5d110)
    at /build/buildd/amarok-kde4-1.94/src/playlist/PlaylistController.cpp:404
#16 0xb7d9ba7e in Playlist::Controller::moveRows (this=0xa461348,
    from=@0xbfe5d340, to=8)
    at /build/buildd/amarok-kde4-1.94/src/playlist/PlaylistController.cpp:370
#17 0xb7dc0561 in Playlist::PrettyListView::dropEvent (this=0xa55e360,
    event=0xbfe5da3c)
    at /build/buildd/amarok-kde4-1.94/src/playlist/view/listview/PrettyListView.cpp:176
#18 0xb6d722e1 in QWidget::event () from /usr/lib/libQtGui.so.4
#19 0xb70a9f53 in QFrame::event () from /usr/lib/libQtGui.so.4
#20 0xb714075f in QAbstractScrollArea::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#21 0xb71ebc4f in QAbstractItemView::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#22 0xb7142d05 in ?? () from /usr/lib/libQtGui.so.4
#23 0xb762904a in QCoreApplicationPrivate::sendThroughObjectEventFilters ()
   from /usr/lib/libQtCore.so.4
#24 0xb6d1a8ca in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#25 0xb6d22d48 in QApplication::notify () from /usr/lib/libQtGui.so.4
#26 0xb7af9b2d in KApplication::notify (this=0xbfe5fb80, receiver=0xa4a8080,
    event=0xbfe5da3c)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#27 0xb7629e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#28 0xb6d991ed in ?? () from /usr/lib/libQtGui.so.4
#29 0xb6d9de73 in QDragManager::drop () from /usr/lib/libQtGui.so.4
#30 0xb6d9e036 in QDragManager::eventFilter () from /usr/lib/libQtGui.so.4
#31 0xb76290f4 in QCoreApplicationPrivate::sendThroughApplicationEventFilters
    () from /usr/lib/libQtCore.so.4
#32 0xb6d1a863 in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#33 0xb6d23121 in QApplication::notify () from /usr/lib/libQtGui.so.4
#34 0xb7af9b2d in KApplication::notify (this=0xbfe5fb80, receiver=0xb3edf20,
    event=0xbfe5dfe8)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#35 0xb7629e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#36 0xb6d223ae in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/libQtGui.so.4
#37 0xb6d8c696 in ?? () from /usr/lib/libQtGui.so.4
#38 0xb6d8ba25 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#39 0xb6db57ea in ?? () from /usr/lib/libQtGui.so.4
#40 0xb4fc06f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#41 0xb4fc3da3 in ?? () from /usr/lib/libglib-2.0.so.0
#42 0xb4fc3f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#43 0xb7654478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#44 0xb6db4ee5 in ?? () from /usr/lib/libQtGui.so.4
#45 0xb762852a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#46 0xb76286ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#47 0xb6d9bfe0 in QDragManager::drag () from /usr/lib/libQtGui.so.4
#48 0xb6d2dc7a in QDrag::exec () from /usr/lib/libQtGui.so.4
#49 0xb71e8d4f in QAbstractItemView::startDrag () from /usr/lib/libQtGui.so.4
#50 0xb71ff4b8 in QListView::startDrag () from /usr/lib/libQtGui.so.4
#51 0xb71e76f9 in QAbstractItemView::mouseMoveEvent ()
   from /usr/lib/libQtGui.so.4
#52 0xb71ff8b2 in QListView::mouseMoveEvent () from /usr/lib/libQtGui.so.4
#53 0xb6d7280b in QWidget::event () from /usr/lib/libQtGui.so.4
#54 0xb70a9f53 in QFrame::event () from /usr/lib/libQtGui.so.4
#55 0xb714075f in QAbstractScrollArea::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#56 0xb71ebc4f in QAbstractItemView::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#57 0xb7142d05 in ?? () from /usr/lib/libQtGui.so.4
#58 0xb762904a in QCoreApplicationPrivate::sendThroughObjectEventFilters ()
   from /usr/lib/libQtCore.so.4
#59 0xb6d1a8ca in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#60 0xb6d23121 in QApplication::notify () from /usr/lib/libQtGui.so.4
#61 0xb7af9b2d in KApplication::notify (this=0xbfe5fb80, receiver=0xa4a8080,
    event=0xbfe5f2d8)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#62 0xb7629e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#63 0xb6d223ae in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/libQtGui.so.4
#64 0xb6d8c696 in ?? () from /usr/lib/libQtGui.so.4
#65 0xb6d8ba25 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#66 0xb6db57ea in ?? () from /usr/lib/libQtGui.so.4
#67 0xb4fc06f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#68 0xb4fc3da3 in ?? () from /usr/lib/libglib-2.0.so.0
#69 0xb4fc3f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#70 0xb7654478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#71 0xb6db4ee5 in ?? () from /usr/lib/libQtGui.so.4
#72 0xb762852a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#73 0xb76286ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#74 0xb762ada5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#75 0xb6d1a767 in QApplication::exec () from /usr/lib/libQtGui.so.4
#76 0x0804bf70 in main (argc=1, argv=0xbfe60074)
    at /build/buildd/amarok-kde4-1.94/src/main.cpp:128
#0  0xb805e430 in __kernel_vsyscall ()
Comment 1 Mark Kretschmann 2008-11-10 16:53:49 UTC
Confirmed.

Another backtrace:

#7  0x00007f0ce335619d in qFatal () from /usr/lib/libQtCore.so.4
#8  0x00007f0ce27aaf24 in QList<Playlist::Item*>::operator[] (this=0x9c1048, i=11) at /usr/include/qt4/QtCore/qlist.h:401
#9  0x00007f0ce27a6087 in Playlist::Model::moveTracksCommand (this=0x9c1000, cmds=@0x14ea340, reverse=false) at /home/mark/kde/src/amarok/src/playlist/PlaylistModel.cpp:730
#10 0x00007f0ce27ac848 in Playlist::MoveTracksCmd::redo (this=0x14ea330) at /home/mark/kde/src/amarok/src/playlist/UndoCommands.cpp:78
#11 0x00007f0ce10cd023 in QUndoStack::push () from /usr/lib/libQtGui.so.4
#12 0x00007f0ce279fe71 in Playlist::Controller::moveRows (this=0x996280, from=@0x7fffebbbbfe0, to=@0x7fffebbbbfd0) at /home/mark/kde/src/amarok/src/playlist/PlaylistController.cpp:403
#13 0x00007f0ce27a039d in Playlist::Controller::moveRows (this=0x996280, from=@0x7fffebbbc1f0, to=5) at /home/mark/kde/src/amarok/src/playlist/PlaylistController.cpp:369
#14 0x00007f0ce27ba849 in Playlist::PrettyListView::dropEvent (this=0xadd2b0, event=0x7fffebbbcc10) at /home/mark/kde/src/amarok/src/playlist/view/listview/PrettyListView.cpp:176


Debug Output:

amarok: BEGIN: void Playlist::Model::moveTracksCommand(const Playlist::MoveCmdList&, bool)
amarok:         [Playlist::Model] moving 10 to 1
amarok:         [Playlist::Model] moving 9 to 2
amarok:         [Playlist::Model] moving 8 to 3
amarok:         [Playlist::Model] moving 7 to 4
amarok:         [Playlist::Model] moving 0 to 5
amarok:         [Playlist::Model] moving 1 to 6
amarok:         [Playlist::Model] moving 2 to 7
amarok:         [Playlist::Model] moving 3 to 8
amarok:         [Playlist::Model] moving 4 to 9
amarok:         [Playlist::Model] moving 5 to 10
amarok:         [Playlist::Model] moving 6 to 11
ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 401
Comment 2 Nikolaj Hald Nielsen 2008-11-13 09:40:42 UTC
SVN commit 883544 by nhnielsen:

Fix crash when dragging an album to the end of the playlist. This was caused by the move operation working with an index that really did not exist in the playlist ( the one below the last element ) and in some cases thinking that this dummy element needed to be 
moved up.
BUG: 174786


 M  +15 -2     PlaylistController.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=883544
Comment 3 Ritesh Raj Sarraf 2009-01-17 07:56:08 UTC
(In reply to comment #2)
> SVN commit 883544 by nhnielsen:
> 
> Fix crash when dragging an album to the end of the playlist. This was caused by
> the move operation working with an index that really did not exist in the
> playlist ( the one below the last element ) and in some cases thinking that
> this dummy element needed to be 
> moved up.
> BUG: 174786
> 
> 
>  M  +15 -2     PlaylistController.cpp  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=883544
> 

I'm still getting this crash and I'm getting it frequently.

QString::arg: Argument missing: Amarok - No track playing., 0:00
amarok(10166) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
amarok(10166) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
QString::arg: Argument missing: Amarok - No track playing., 0:00
amarok(10166) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
QString::arg: Argument missing: Amarok - No track playing., 0:00
amarok(10166) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
QString::arg: Argument missing: Amarok - No track playing., 0:00
QString::arg: Argument missing: Amarok - No track playing., 0:00
QDir::exists: Empty or null file name
amarok(10166) CurrentTrack::dataUpdated: CurrentTrack::dataUpdated
ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 387
Unable to start Dr. Konqi


Sorry. Not providing a backtrace. Even if I install the debug symbols, amarok for some reason doesn't load them upon crash.

I have a "Proportinal Bias" playlist, where the proportion is set to 100% for one particular Genre. The playlist is able to load related music properly. On play, frequently this crash keeps happening. Actually, it doesn't even have to be in Play mode. Right now, it was stopped with the playlist loaded, and it just crashed again.
Comment 4 Ritesh Raj Sarraf 2009-01-17 07:57:24 UTC
I'm using:
KDE 4.1.96 r910547
Amarok 2.0.1.1
on Debian.
Comment 5 Ritesh Raj Sarraf 2009-01-17 10:05:58 UTC
And the crash will only happen when using the custom playlist.
With the default "Random Playlist" playlist, the crash is not seen.