Bug 178083

Summary: Removing a track from the playlist makes Amarok crash
Product: [Applications] amarok Reporter: Mikko C. <mikko.cal>
Component: PlaylistAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: grave CC: asouza, lfranchi, nhn, stharward
Priority: HI Keywords: release_blocker
Version: 2.0-SVN   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Mikko C. 2008-12-18 19:14:41 UTC
Version:           2.0-SVN (using 4.1.85 (KDE 4.1.85 (KDE 4.2 Beta2)), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.28-rc8

Removing a track from the playlist = crash
Amarok trunk

amarok: BEGIN: void Playlist::Controller::removeRows(QList<int>&)
amarok: BEGIN: void Playlist::Model::removeTracksCommand(const Playlist::RemoveCmdList&)
amarok:     [Playlist::Model] removing "When You're Love Like You Are" from 6
ASSERT failure in QVector<T>::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 323
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = amarok path = <unknown> pid = 7747
sock_file=/home/mikko/.kde/socket-gentoo/kdeinit4__0

Thread 1 (Thread 0x7f4930f92710 (LWP 7703)):
[KCrash Handler]
#5  0x00007f4927d26185 in raise () from /lib/libc.so.6
#6  0x00007f4927d27630 in abort () from /lib/libc.so.6
#7  0x00007f4928c543a5 in qt_message_output (msgType=QtFatalMsg, buf=<value optimized out>) at global/qglobal.cpp:2108
#8  0x00007f4928c544e7 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2309
#9  0x00007f49296927de in QVector<int>::at (this=0x2913a58, i=4) at ../../include/QtCore/../../src/corelib/tools/qvector.h:323
#10 0x00007f4929708d78 in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=0x2913030, source_top_left=@0x7fff38fcce30, source_bottom_right=@0x7fff38fccdf0)
    at itemviews/qsortfilterproxymodel.cpp:1033
#11 0x00007f49297099da in QSortFilterProxyModel::qt_metacall (this=0x296eca0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff38fccbe0)
    at .moc/debug-shared/moc_qsortfilterproxymodel.cpp:119
#12 0x00007f4930359637 in Playlist::NavigatorFilterProxyModel::qt_metacall (this=0x296eca0, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0x7fff38fccbe0)
    at /home/mikko/amarok/build/src/NavigatorFilterProxyModel.moc:70
#13 0x00007f4928d67bac in QMetaObject::activate (sender=0x1cff120, from_signal_index=<value optimized out>, to_signal_index=4, argv=0xffffffffffffffff) at kernel/qobject.cpp:3028
#14 0x00007f4928d9fa07 in QAbstractItemModel::dataChanged (this=0x1e17, _t1=<value optimized out>, _t2=<value optimized out>) at .moc/debug-shared/moc_qabstractitemmodel.cpp:124
#15 0x00007f493034ab44 in Playlist::Model::removeTracksCommand (this=0x1cff120, cmds=@0x3b24220) at /home/mikko/amarok/src/playlist/PlaylistModel.cpp:705
#16 0x00007f4930351e99 in Playlist::RemoveTracksCmd::redo (this=0x3b24210) at /home/mikko/amarok/src/playlist/UndoCommands.cpp:58
#17 0x00007f492979d0d8 in QUndoStack::push (this=0x297eb30, cmd=0x3b24210) at util/qundostack.cpp:545
#18 0x00007f4930343abc in Playlist::Controller::removeRows (this=0x292eca0, rows=@0x7fff38fcd070) at /home/mikko/amarok/src/playlist/PlaylistController.cpp:275
#19 0x00007f493036156c in Playlist::PrettyListView::removeSelection (this=0x2b767c0) at /home/mikko/amarok/src/playlist/view/listview/PrettyListView.cpp:109
#20 0x00007f49303615c9 in Playlist::PrettyListView::keyPressEvent (this=0x2b767c0, event=0x7fff38fcd860) at /home/mikko/amarok/src/playlist/view/listview/PrettyListView.cpp:208
#21 0x00007f4929229900 in QWidget::event (this=0x2b767c0, event=0x7fff38fcd860) at kernel/qwidget.cpp:7204
#22 0x00007f49295e0059 in QAbstractScrollArea::event (this=0x2b767c0, e=0x7fff38fcd860) at widgets/qabstractscrollarea.cpp:905
#23 0x00007f49291d16ad in QApplicationPrivate::notify_helper (this=0x1d09ef0, receiver=0x2b767c0, e=0x7fff38fcd860) at kernel/qapplication.cpp:3809
#24 0x00007f49291d94f4 in QApplication::notify (this=<value optimized out>, receiver=0x2b767c0, e=0x7fff38fcd860) at kernel/qapplication.cpp:3453
#25 0x00007f49309c8d9e in KApplication::notify (this=0x7fff38fce750, receiver=0x2b767c0, event=0x7fff38fcd860)
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/kdeui/kernel/kapplication.cpp:307
#26 0x00007f4928d51380 in QCoreApplication::notifyInternal (this=0x7fff38fce750, receiver=0x2b767c0, event=0x7fff38fcd860) at kernel/qcoreapplication.cpp:593
#27 0x00007f4929263e34 in QKeyMapper::sendKeyEvent (keyWidget=0x2b767c0, grab=<value optimized out>, type=QEvent::KeyPress, code=16777223, modifiers={i = 956095888}, text=@0x7fff38fcdd80, 
    autorepeat=false, count=1, nativeScanCode=119, nativeVirtualKey=65535, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1658
#28 0x00007f49292660de in QKeyMapperPrivate::translateKeyEvent (this=0x1d40500, keyWidget=0x2b767c0, event=0x7fff38fce550, grab=23) at kernel/qkeymapper_x11.cpp:1629
#29 0x00007f49292418a6 in QApplication::x11ProcessEvent (this=0x7fff38fce750, event=0x7fff38fce550) at kernel/qapplication_x11.cpp:3059
#30 0x00007f492926783a in QEventDispatcherX11::processEvents (this=0x1cf7d80, flags={i = 956098160}) at kernel/qeventdispatcher_x11.cpp:134
#31 0x00007f4928d4ff32 in QEventLoop::processEvents (this=<value optimized out>, flags={i = 956098208}) at kernel/qeventloop.cpp:149
#32 0x00007f4928d500bd in QEventLoop::exec (this=0x7fff38fce6e0, flags={i = 956098288}) at kernel/qeventloop.cpp:200
#33 0x00007f4928d525bd in QCoreApplication::exec () at kernel/qcoreapplication.cpp:851
#34 0x00000000004039e5 in main (argc=1, argv=0x7fff38fcf968) at /home/mikko/amarok/src/main.cpp:130
Comment 1 Leo Franchi 2008-12-18 19:20:10 UTC
can't confirm. but it looks like a valid bug...
Comment 2 Mikko C. 2008-12-18 20:23:27 UTC
The situation is even worse than I thought.
It crashes every time a track is even automatically removed from the playlist.
It makes dynamic playlist impossible to use because the playlist only holds 5 "old" -already played- tracks, and as soon as a new track is added, the oldest one is deleted, causing the crash.
You can see this here:


amarok: END__: virtual void ScrobblerAdapter::engineNewTrackPlaying() - Took 0.0093s
amarok: BEGIN: void Playlist::DynamicTrackNavigator::appendUpcoming()
amarok:     [BiasedPlaylist] Requesting  1  tracks.
amarok:     [BiasedPlaylist] Returning  1  tracks.
amarok: BEGIN: void Playlist::DynamicTrackNavigator::receiveTracks(Meta::TrackList)
amarok: BEGIN: void Playlist::Controller::insertOptioned(Meta::TrackList, int)
amarok: BEGIN: void Playlist::Model::insertTracksCommand(const Playlist::InsertCmdList&)
amarok:           [Playlist::Model] inserting "Shelter From The Rain" at 16
amarok: END__: void Playlist::Model::insertTracksCommand(const Playlist::InsertCmdList&) - Took 0.00097s
amarok:         [Playlist::Controller] engine state:  2
amarok: END__: void Playlist::Controller::insertOptioned(Meta::TrackList, int) - Took 0.0015s
amarok: END__: void Playlist::DynamicTrackNavigator::receiveTracks(Meta::TrackList) - Took 0.0018s
amarok: END__: void Playlist::DynamicTrackNavigator::appendUpcoming() - Took 0.0023s
amarok: BEGIN: void Playlist::Controller::removeRows(int, int)
amarok: BEGIN: void Playlist::Controller::removeRows(QList<int>&)
amarok: BEGIN: void Playlist::Model::removeTracksCommand(const Playlist::RemoveCmdList&)
amarok:         [Playlist::Model] removing "Global Tag Radio: "Indie Rock"" from 0
ASSERT failure in QVector<T>::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 323
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = amarok path = <unknown> pid = 10249
sock_file=/home/mikko/.kde/socket-gentoo/kdeinit4__0
Comment 3 Nikolaj Hald Nielsen 2008-12-18 21:22:39 UTC
SVN commit 898714 by nhnielsen:

Add some debug to to help solve crash as I cannot reproduce it. Please update and paste debug leading up to crash.
CCBUG: 178083


 M  +1 -0      PlaylistModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=898714
Comment 4 Mikko C. 2008-12-18 21:31:06 UTC
In case of manual removal:

amarok: BEGIN: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool)
amarok: BEGIN: void Playlist::Controller::removeRows(QList<int>&)
amarok: BEGIN: void Playlist::Model::removeTracksCommand(const Playlist::RemoveCmdList&)
amarok:       [Playlist::Model] removing "Departure" from 5
amarok:       [Playlist::Model] Emitting dataChanged. min= 5 , max= 5 , rowCount= 22 , columnCount= 4
ASSERT failure in QVector<T>::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 323


Automatic removal by dynamic playlist:

amarok: END__: virtual void Amarok::PlayPauseAction::engineStateChanged(Phonon::State, Phonon::State) - Took 0.0003s
amarok: END__: void EngineSubject::stateChangedNotify(Phonon::State, Phonon::State) - Took 0.31s
amarok: BEGIN: void Playlist::DynamicTrackNavigator::appendUpcoming()
amarok:     [BiasedPlaylist] Requesting  1  tracks.
amarok:     [BiasedPlaylist] Returning  1  tracks.
amarok: BEGIN: void Playlist::DynamicTrackNavigator::receiveTracks(Meta::TrackList)
amarok: BEGIN: void Playlist::Controller::insertOptioned(Meta::TrackList, int)
amarok: BEGIN: void Playlist::Model::insertTracksCommand(const Playlist::InsertCmdList&)
amarok:           [Playlist::Model] inserting "Voodoo People" at 16
amarok: END__: void Playlist::Model::insertTracksCommand(const Playlist::InsertCmdList&) - Took 0.0011s
amarok:         [Playlist::Controller] engine state:  2
amarok: END__: void Playlist::Controller::insertOptioned(Meta::TrackList, int) - Took 0.0016s
amarok: END__: void Playlist::DynamicTrackNavigator::receiveTracks(Meta::TrackList) - Took 0.0018s
amarok: END__: void Playlist::DynamicTrackNavigator::appendUpcoming() - Took 0.0024s
amarok: BEGIN: void Playlist::Controller::removeRows(int, int)
amarok: BEGIN: void Playlist::Controller::removeRows(QList<int>&)
amarok: BEGIN: void Playlist::Model::removeTracksCommand(const Playlist::RemoveCmdList&)
amarok:         [Playlist::Model] removing "Saint Cloud" from 0
amarok:         [Playlist::Model] Emitting dataChanged. min= 0 , max= 0 , rowCount= 16 , columnCount= 4
ASSERT failure in QVector<T>::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 323
Comment 5 Nikolaj Hald Nielsen 2008-12-18 21:42:50 UTC
SVN commit 898719 by nhnielsen:

possbile fix... hard to tell as I cannot reproduce crash.
CCBUG: 178083


 M  +2 -1      NavigatorFilterProxyModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=898719
Comment 6 Nikolaj Hald Nielsen 2008-12-18 22:13:27 UTC
SVN commit 898727 by nhnielsen:

Debug++
CCBUG: 178083


 M  +7 -0      PlaylistModel.cpp  
 M  +2 -0      navigators/NavigatorFilterProxyModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=898727
Comment 7 Mikko C. 2008-12-18 22:25:49 UTC
as I told nhnFreespirit: the only case it doesn't crash is when I remove the last track of the playlist.

You can see here that the last track is removed correctly:

amarok: BEGIN: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool)
amarok: BEGIN: void Playlist::Controller::removeRows(QList<int>&)
amarok: BEGIN: void Playlist::Model::removeTracksCommand(const Playlist::RemoveCmdList&)
amarok:       [Playlist::Model] removing "Untitled" from 14
amarok:       [Playlist::Model] Emitting dataChanged. min= 14 , max= 13 , rowCount= 14 , columnCount= 4
amarok:       [Playlist::Model] Emitting removedIds
amarok: BEGIN: void Playlist::NavigatorFilterProxyModel::slotRemovedIds(const QList<long long unsigned int>&)
amarok:          proxy removing id  8400590058378582769
amarok: END__: void Playlist::NavigatorFilterProxyModel::slotRemovedIds(const QList<long long unsigned int>&) - Took 8.6e-05s
amarok:       [Playlist::Model] update the active row
amarok:       [Playlist::Model] Almost there....
amarok:       [Playlist::Model] Done!
amarok: END__: void Playlist::Model::removeTracksCommand(const Playlist::RemoveCmdList&) - Took 0.0012s
amarok: END__: void Playlist::Controller::removeRows(QList<int>&) - Took 0.0016s
amarok: END__: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool) - Took 1s


But anything that isn't the last track causes the crash:

amarok: BEGIN: void Playlist::ViewCommon::trackMenu(QWidget*, const QModelIndex*, const QPoint&, bool)
amarok: BEGIN: void Playlist::Controller::removeRows(QList<int>&)
amarok: BEGIN: void Playlist::Model::removeTracksCommand(const Playlist::RemoveCmdList&)
amarok:       [Playlist::Model] removing "X-Mas Curtain" from 8
amarok:       [Playlist::Model] Emitting dataChanged. min= 8 , max= 8 , rowCount= 14 , columnCount= 4
ASSERT failure in QVector<T>::at: "index out of range", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 323



Thread 1 (Thread 0x7fbf7e7d7710 (LWP 13896)):
[KCrash Handler]
#5  0x00007fbf7556b185 in raise () from /lib/libc.so.6
#6  0x00007fbf7556c630 in abort () from /lib/libc.so.6
#7  0x00007fbf764993a5 in qt_message_output (msgType=QtFatalMsg, buf=<value optimized out>) at global/qglobal.cpp:2108
#8  0x00007fbf764994e7 in qFatal (msg=<value optimized out>) at global/qglobal.cpp:2309
#9  0x00007fbf76ed77de in QVector<int>::at (this=0x2eca588, i=4) at ../../include/QtCore/../../src/corelib/tools/qvector.h:323
#10 0x00007fbf76f4dd78 in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=0x2eca5f0, source_top_left=@0x7fff86810e40, source_bottom_right=@0x7fff86810e00)
    at itemviews/qsortfilterproxymodel.cpp:1033
#11 0x00007fbf76f4e9da in QSortFilterProxyModel::qt_metacall (this=0x2ec8f90, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff86810bc0)
    at .moc/debug-shared/moc_qsortfilterproxymodel.cpp:119
#12 0x00007fbf7db9e949 in Playlist::NavigatorFilterProxyModel::qt_metacall (this=0x2ec8f90, _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0x7fff86810bc0)
    at /home/mikko/amarok/build/src/NavigatorFilterProxyModel.moc:70
#13 0x00007fbf765acbac in QMetaObject::activate (sender=0x26342a0, from_signal_index=<value optimized out>, to_signal_index=4, argv=0xffffffffffffffff) at kernel/qobject.cpp:3028
#14 0x00007fbf765e4a07 in QAbstractItemModel::dataChanged (this=0x3648, _t1=<value optimized out>, _t2=<value optimized out>) at .moc/debug-shared/moc_qabstractitemmodel.cpp:124
#15 0x00007fbf7db8fc35 in Playlist::Model::removeTracksCommand (this=0x26342a0, cmds=@0x3440670) at /home/mikko/amarok/src/playlist/PlaylistModel.cpp:706
#16 0x00007fbf7db97025 in Playlist::RemoveTracksCmd::redo (this=0x3440660) at /home/mikko/amarok/src/playlist/UndoCommands.cpp:58
#17 0x00007fbf76fe20d8 in QUndoStack::push (this=0x2ed1ee0, cmd=0x3440660) at util/qundostack.cpp:545
#18 0x00007fbf7db88abc in Playlist::Controller::removeRows (this=0x2eca810, rows=@0x7fff868110d0) at /home/mikko/amarok/src/playlist/PlaylistController.cpp:275
#19 0x00007fbf7dba6880 in Playlist::PrettyListView::removeSelection (this=0x2fa8010) at /home/mikko/amarok/src/playlist/view/listview/PrettyListView.cpp:109
#20 0x00007fbf7dba6d1d in Playlist::PrettyListView::qt_metacall (this=0x2fa8010, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7fff86811210) at /home/mikko/amarok/build/src/PrettyListView.moc:93
#21 0x00007fbf765acbac in QMetaObject::activate (sender=0x3789460, from_signal_index=<value optimized out>, to_signal_index=6, argv=0xffffffffffffffff) at kernel/qobject.cpp:3028
#22 0x00007fbf76a10537 in QAction::triggered (this=0x3648, _t1=false) at .moc/debug-shared/moc_qaction.cpp:216
#23 0x00007fbf76a10d00 in QAction::activate (this=0x3789460, event=<value optimized out>) at kernel/qaction.cpp:1131
#24 0x00007fbf76ddc19d in QMenuPrivate::activateAction (this=0x3c96400, action=0x3789460, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1008
#25 0x00007fbf7e2c31b4 in KMenu::mouseReleaseEvent (this=0x3c96990, e=0x7fff86811e40) at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/kdeui/widgets/kmenu.cpp:454
#26 0x00007fbf76a6ea41 in QWidget::event (this=0x3c96990, event=0x7fff86811e40) at kernel/qwidget.cpp:7169
#27 0x00007fbf76ddeb2b in QMenu::event (this=0x3c96990, e=0x7fff86811e40) at widgets/qmenu.cpp:2271
#28 0x00007fbf76a166ad in QApplicationPrivate::notify_helper (this=0x22c5110, receiver=0x3c96990, e=0x7fff86811e40) at kernel/qapplication.cpp:3809
#29 0x00007fbf76a1deda in QApplication::notify (this=<value optimized out>, receiver=0x3c96990, e=0x7fff86811e40) at kernel/qapplication.cpp:3534
#30 0x00007fbf7e20dd9e in KApplication::notify (this=0x7fff86814290, receiver=0x3c96990, event=0x7fff86811e40)
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/kdeui/kernel/kapplication.cpp:307
#31 0x00007fbf76596380 in QCoreApplication::notifyInternal (this=0x7fff86814290, receiver=0x3c96990, event=0x7fff86811e40) at kernel/qcoreapplication.cpp:593
#32 0x00007fbf76a1f362 in QApplicationPrivate::sendMouseEvent (receiver=0x3c96990, event=0x7fff86811e40, alienWidget=0x0, nativeWidget=0x3c96990, buttonDown=<value optimized out>, 
    lastMouseReceiver=@0x7fbf773e66d0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#33 0x00007fbf76a88154 in QETWidget::translateMouseEvent (this=0x3c96990, event=<value optimized out>) at kernel/qapplication_x11.cpp:3982
#34 0x00007fbf76a869e4 in QApplication::x11ProcessEvent (this=0x7fff86814290, event=0x7fff86812700) at kernel/qapplication_x11.cpp:3166
#35 0x00007fbf76aac83a in QEventDispatcherX11::processEvents (this=0x22c4430, flags={i = -2038355936}) at kernel/qeventdispatcher_x11.cpp:134
#36 0x00007fbf76594f32 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -2038355888}) at kernel/qeventloop.cpp:149
#37 0x00007fbf765950bd in QEventLoop::exec (this=0x7fff86812890, flags={i = -2038355792}) at kernel/qeventloop.cpp:200
#38 0x00007fbf76dde8e5 in QMenu::exec (this=<value optimized out>, p=@0x7fff868137c0, action=0x0) at widgets/qmenu.cpp:1944
#39 0x00007fbf7db9f575 in Playlist::ViewCommon::trackMenu (parent=0x2fa8010, index=0x7fff86812b90, pos=@0x7fff868137c0, coverActions=true)
    at /home/mikko/amarok/src/playlist/view/PlaylistViewCommon.cpp:111
#40 0x00007fbf7dba6741 in Playlist::PrettyListView::contextMenuEvent (this=0x2fa8010, event=0x7fff868137a0) at /home/mikko/amarok/src/playlist/view/listview/PrettyListView.cpp:143
#41 0x00007fbf76a6ecd5 in QWidget::event (this=0x2fa8010, event=0x7fff868137a0) at kernel/qwidget.cpp:7326
#42 0x00007fbf76ec83dd in QAbstractItemView::viewportEvent (this=0x2fa8010, event=0x7fff868137a0) at itemviews/qabstractitemview.cpp:1435
#43 0x00007fbf76595de7 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x2f42ce0, event=0x7fff868137a0) at kernel/qcoreapplication.cpp:700
#44 0x00007fbf76a1667c in QApplicationPrivate::notify_helper (this=0x22c5110, receiver=0x2f42ce0, e=0x7fff868137a0) at kernel/qapplication.cpp:3805
#45 0x00007fbf76a1db0a in QApplication::notify (this=<value optimized out>, receiver=0x2f42ce0, e=0x7fff868137a0) at kernel/qapplication.cpp:3620
#46 0x00007fbf7e20dd9e in KApplication::notify (this=0x7fff86814290, receiver=0x2f42ce0, event=0x7fff868137a0)
    at /var/tmp/paludis/kde-base-kdelibs-scm/work/kdelibs-scm/kdeui/kernel/kapplication.cpp:307
#47 0x00007fbf76596380 in QCoreApplication::notifyInternal (this=0x7fff86814290, receiver=0x2f42ce0, event=0x7fff868137a0) at kernel/qcoreapplication.cpp:593
#48 0x00007fbf76a885db in QETWidget::translateMouseEvent (this=0x22c6be0, event=<value optimized out>) at kernel/qapplication_x11.cpp:4054
#49 0x00007fbf76a869e4 in QApplication::x11ProcessEvent (this=0x7fff86814290, event=0x7fff86814090) at kernel/qapplication_x11.cpp:3166
#50 0x00007fbf76aac83a in QEventDispatcherX11::processEvents (this=0x22c4430, flags={i = -2038349392}) at kernel/qeventdispatcher_x11.cpp:134
#51 0x00007fbf76594f32 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -2038349344}) at kernel/qeventloop.cpp:149
#52 0x00007fbf765950bd in QEventLoop::exec (this=0x7fff86814220, flags={i = -2038349264}) at kernel/qeventloop.cpp:200
#53 0x00007fbf765975bd in QCoreApplication::exec () at kernel/qcoreapplication.cpp:851
#54 0x00000000004039e5 in main (argc=2, argv=0x7fff868154a8) at /home/mikko/amarok/src/main.cpp:130
Comment 8 Lydia Pintscher 2008-12-19 14:25:29 UTC
Happens here as well since last neon upgrade.
Comment 9 Lydia Pintscher 2008-12-19 14:28:07 UTC
upping priority and severity as this makes dynamic playlists unusable
Comment 10 Mark Kretschmann 2008-12-19 18:27:07 UTC
FWIW, I cannot reproduce the crash. Removing a track from the playlist works as expected here.

I tried this in "normal" mode, no Dynamic, Random, or other fancy features enabled.
Comment 11 Artur Souza (MoRpHeUz) 2008-12-22 21:19:35 UTC
I have the same issue (setup a dynamic playlist -> around the 5th song it crashes). My setup: whole kde from trunk (22/December), including amarok. Qt 4.4.3, distro: slack 12.2.

bt below:

#0  0xb66acc66 in raise () from /lib/libc.so.6
#1  0xb66ae571 in abort () from /lib/libc.so.6
#2  0xb6961e88 in qt_message_output (msgType=QtFatalMsg,
    buf=0xbfd938e0 "ASSERT failure in QVector<T>::at: \"index out of range\", file ../../include/QtCore/../../src/corelib/tools/qvector.h, line 317") at global/qglobal.cpp:2102
#3  0xb6961ee0 in qFatal (msg=0xb6adf3e8 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qglobal.cpp:2303
#4  0xb6961f16 in qt_assert_x (where=0xb76436ba "QVector<T>::at", what=0xb76436a7 "index out of range",
    file=0xb7643670 "../../include/QtCore/../../src/corelib/tools/qvector.h", line=317) at global/qglobal.cpp:1880
#5  0xb6f8dfeb in QVector<int>::at (this=0x87f279c, i=4) at ../../include/QtCore/../../src/corelib/tools/qvector.h:317
#6  0xb7585ffb in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=0x87ffb68, source_top_left=@0xbfd95c6c,
    source_bottom_right=@0xbfd95c4c) at itemviews/qsortfilterproxymodel.cpp:1027
#7  0xb7586ad1 in QSortFilterProxyModel::qt_metacall (this=0x88074a0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbfd95b38)
    at .moc/debug-shared/moc_qsortfilterproxymodel.cpp:119
#8  0xb7a19b3f in Playlist::NavigatorFilterProxyModel::qt_metacall (this=0x88074a0, _c=QMetaObject::InvokeMetaMethod, _id=26,
    _a=0xbfd95b38) at /usr/local/kde4/build/extragears/amarok/src/NavigatorFilterProxyModel.moc:70
#9  0xb6a93cec in QMetaObject::activate (sender=0x8307b50, from_signal_index=4, to_signal_index=4, argv=0xbfd95b38)
    at kernel/qobject.cpp:3022
#10 0xb6a94260 in QMetaObject::activate (sender=0x8307b50, m=0xb6b94718, local_signal_index=0, argv=0xbfd95b38) at kernel/qobject.cpp:3092
#11 0xb6adcceb in QAbstractItemModel::dataChanged (this=0x8307b50, _t1=@0xbfd95c6c, _t2=@0xbfd95c4c)
    at .moc/debug-shared/moc_qabstractitemmodel.cpp:124
#12 0xb7a09102 in Playlist::Model::removeTracksCommand (this=0x8307b50, cmds=@0x8e76d88)
    at /usr/local/kde4/src/extragears/amarok/src/playlist/PlaylistModel.cpp:727
#13 0xb7a10a0a in Playlist::RemoveTracksCmd::redo (this=0x8e76d80)
    at /usr/local/kde4/src/extragears/amarok/src/playlist/UndoCommands.cpp:58
#14 0xb7624c4f in QUndoStack::push (this=0x87e39d0, cmd=0x8e76d80) at util/qundostack.cpp:539
#15 0xb7a01af5 in Playlist::Controller::removeRows (this=0x8807688, rows=@0xbfd95dcc)
    at /usr/local/kde4/src/extragears/amarok/src/playlist/PlaylistController.cpp:281
#16 0xb7a01b92 in Playlist::Controller::removeRows (this=0x8807688, row=1, count=1)
    at /usr/local/kde4/src/extragears/amarok/src/playlist/PlaylistController.cpp:264
#17 0xb7a10fc5 in Playlist::DynamicTrackNavigator::removePlayed (this=0x8cedbb0)
    at /usr/local/kde4/src/extragears/amarok/src/playlist/navigators/DynamicTrackNavigator.cpp:74
#18 0xb7a111cb in Playlist::DynamicTrackNavigator::trackChanged (this=0x8cedbb0)
    at /usr/local/kde4/src/extragears/amarok/src/playlist/navigators/DynamicTrackNavigator.cpp:101
Comment 12 Mark Kretschmann 2008-12-27 10:15:30 UTC
Possibly fixed by the following commit, please test:

SVN commit 901999 by mkossick:

actually remove rows when we say we do. Lying to your view is a bad idea


 M  +11 -13    PlaylistModel.cpp
Comment 13 Maximilian Kossick 2008-12-27 16:41:30 UTC
SVN commit 902124 by mkossick:

fix crash on track removal from the playlist. The index of the last of four columns is 3, not 4 :)
how come this did not crash for everybody????

BUG: 178083


 M  +2 -8      PlaylistModel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=902124