Bug 189021

Summary: Pressing Delete on an Empty Playlist Crashes Amarok
Product: [Applications] amarok Reporter: Shlomi Fish <shlomif>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Shlomi Fish 2009-04-07 11:04:48 UTC
Version:           trunk (using Devel)
OS:                Linux
Installed from:    Compiled sources

When pressing Delete in Amarok once after all the tracks in the playlist were selected, then the playlist is cleared. Pressing delete again causes Amarok to crash. I get the following error on the console:

{{{{
ASSERT: "!isEmpty()" in file /usr/lib/qt4/include/QtCore/qlist.h, line 252
KCrash: Application 'amarok' crashing...
sock_file=/home/shlomi/.kde4/socket-telaviv1.shlomifish.org/kdeinit4__0
}}}}

And KCrash reports:

{{{{{{{{{{{
Application: Amarok (amarok), signal SIGABRT
[?1034h[Thread debugging using libthread_db enabled]
[Current thread is 1 (Thread 0xb34116f0 (LWP 12162))]

Thread 10 (Thread 0xb0bcab90 (LWP 12163)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb67c6f72 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/i686/libpthread.so.0
#2  0xb18cba11 in ?? () from /usr/lib/libxine.so.1
#3  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 9 (Thread 0xb035eb90 (LWP 12164)):
#0  0xb67c5c36 in __pthread_mutex_unlock_usercnt () from /lib/i686/libpthread.so.0
#1  0xb41eeae6 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0xb41eef3d in ?? () from /usr/lib/libglib-2.0.so.0
#3  0xb41ef3ff in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb69481f7 in QEventDispatcherGlib::processEvents (this=0x8274af0, flags={i = -1338645864}) at kernel/qeventdispatcher_glib.cpp:325
#5  0xb6919903 in QEventLoop::processEvents (this=0xb035e310, flags={i = -1338645800}) at kernel/qeventloop.cpp:149
#6  0xb6919d51 in QEventLoop::exec (this=0xb035e310, flags={i = -1338645736}) at kernel/qeventloop.cpp:200
#7  0xb681c11b in QThread::exec (this=0x8271700) at thread/qthread.cpp:481
#8  0xb191fdd8 in ?? () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#9  0xb681f4df in QThreadPrivate::start (arg=0x8271700) at thread/qthread_unix.cpp:189
#10 0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#11 0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 8 (Thread 0xafb5db90 (LWP 12167)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb66166e7 in __poll (fds=0xafb5d2c8, nfds=1, timeout=333) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb1773bc8 in ?? () from /usr/lib/xine/plugins/1.26/xineplug_ao_out_alsa.so
#3  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 7 (Thread 0xaf35cb90 (LWP 12168)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb67c6c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/libpthread.so.0
#2  0xb18ddbfb in ?? () from /usr/lib/libxine.so.1
#3  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 6 (Thread 0xaeb5bb90 (LWP 12169)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb67c6c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/libpthread.so.0
#2  0xb18ddbfb in ?? () from /usr/lib/libxine.so.1
#3  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 5 (Thread 0xa95f4b90 (LWP 12178)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb66194c1 in select () from /lib/i686/libc.so.6
#2  0xb18f6c42 in xine_usec_sleep () from /usr/lib/libxine.so.1
#3  0xb18da05d in ?? () from /usr/lib/libxine.so.1
#4  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#5  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 4 (Thread 0xa8a0ab90 (LWP 12179)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb67c6c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/libpthread.so.0
#2  0xb18cf638 in ?? () from /usr/lib/libxine.so.1
#3  0xb18d5911 in ?? () from /usr/lib/libxine.so.1
#4  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#5  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 3 (Thread 0xa803cb90 (LWP 12180)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb67c6c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/libpthread.so.0
#2  0xb18cf638 in ?? () from /usr/lib/libxine.so.1
#3  0xb18d6afd in ?? () from /usr/lib/libxine.so.1
#4  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#5  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xa783bb90 (LWP 12181)):
#0  0xffffe424 in __kernel_vsyscall ()
#1  0xb67c6c45 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/libpthread.so.0
#2  0xb18e0da0 in ?? () from /usr/lib/libxine.so.1
#3  0xb67c3315 in start_thread () from /lib/i686/libpthread.so.0
#4  0xb662125e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb34116f0 (LWP 12162)):
[KCrash Handler]
#6  0xffffe424 in __kernel_vsyscall ()
#7  0xb656ec00 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0xb6570668 in abort () at abort.c:88
#9  0xb6816c85 in qt_message_output (msgType=QtFatalMsg, buf=0xa2fc330 "ASSERT: \"!isEmpty()\" in file /usr/lib/qt4/include/QtCore/qlist.h, line 252") at global/qglobal.cpp:2006
#10 0xb6816d7c in qFatal (msg=0x6 <Address 0x6 out of bounds>) at global/qglobal.cpp:2201
#11 0xb6816e75 in qt_assert (assertion=0xb7a71c3c "!isEmpty()", file=0xb7a71c18 "/usr/lib/qt4/include/QtCore/qlist.h", line=252) at global/qglobal.cpp:1777
#12 0xb78359d9 in QList<int>::first (this=0xbfb01dfc) at /usr/lib/qt4/include/QtCore/qlist.h:252
#13 0xb787e1ad in Playlist::PrettyListView::removeSelection (this=0x8873bb0) at /home/shlomi/Download/unpack/multimedia/amarok/trunk/amarok/src/playlist/view/listview/PrettyListView.cpp:133
#14 0xb787e311 in Playlist::PrettyListView::keyPressEvent (this=0x8873bb0, event=0xbfb023ec)
    at /home/shlomi/Download/unpack/multimedia/amarok/trunk/amarok/src/playlist/view/listview/PrettyListView.cpp:293
#15 0xb6e48c2a in QWidget::event (this=0x8873bb0, event=0xbfb023ec) at kernel/qwidget.cpp:7551
#16 0xb7245639 in QFrame::event (this=0x8873bb0, e=0xbfb023ec) at widgets/qframe.cpp:559
#17 0xb72ea67a in QAbstractScrollArea::event (this=0x8873bb0, e=0xbfb023ec) at widgets/qabstractscrollarea.cpp:918
#18 0xb7399b6c in QAbstractItemView::event (this=0x8873bb0, event=0xbfb023ec) at itemviews/qabstractitemview.cpp:1401
#19 0xb73b44b3 in QListView::event (this=0x8873bb0, e=0xbfb023ec) at itemviews/qlistview.cpp:1919
#20 0xb6def99c in QApplicationPrivate::notify_helper (this=0x8241b38, receiver=0x8873bb0, e=0xbfb023ec) at kernel/qapplication.cpp:4084
#21 0xb6df9487 in QApplication::notify (this=0xbfb02e40, receiver=0x8873bb0, e=0xbfb023ec) at kernel/qapplication.cpp:3690
#22 0xb7cad791 in KApplication::notify () from /usr/lib/libkdeui.so.5
#23 0xb691b33e in QCoreApplication::notifyInternal (this=0xbfb02e40, receiver=0x8873bb0, event=0xbfb023ec) at kernel/qcoreapplication.cpp:602
#24 0xb6df08cd in qt_sendSpontaneousEvent (receiver=0x8873bb0, event=0x6) at ../../src/corelib/kernel/qcoreapplication.h:216
#25 0xb6e908c9 in QKeyMapper::sendKeyEvent (keyWidget=0x8873bb0, grab=false, type=QEvent::KeyPress, code=16777223, modifiers={i = -1078975176}, text=@0xbfb02564, autorepeat=false, count=1, 
    nativeScanCode=119, nativeVirtualKey=65535, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1675
#26 0xb6e92c53 in QKeyMapperPrivate::translateKeyEvent (this=0x826f7e0, keyWidget=0x8873bb0, event=0xbfb02b9c, grab=false) at kernel/qkeymapper_x11.cpp:1645
#27 0xb6e69856 in QApplication::x11ProcessEvent (this=0xbfb02e40, event=0xbfb02b9c) at kernel/qapplication_x11.cpp:3436
#28 0xb6e94714 in x11EventSourceDispatch (s=0x82442f8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#29 0xb41ebc0a in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#30 0xb41ef274 in ?? () from /usr/lib/libglib-2.0.so.0
#31 0xb41ef3ff in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#32 0xb69481da in QEventDispatcherGlib::processEvents (this=0x824ddf0, flags={i = -1078973112}) at kernel/qeventdispatcher_glib.cpp:323
#33 0xb6e93e6a in QGuiEventDispatcherGlib::processEvents (this=0x824ddf0, flags={i = -1078973064}) at kernel/qguieventdispatcher_glib.cpp:202
#34 0xb6919903 in QEventLoop::processEvents (this=0xbfb02df0, flags={i = -1078973000}) at kernel/qeventloop.cpp:149
#35 0xb6919d51 in QEventLoop::exec (this=0xbfb02df0, flags={i = -1078972936}) at kernel/qeventloop.cpp:200
#36 0xb691c2b6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:880
#37 0xb6def804 in QApplication::exec () at kernel/qapplication.cpp:3553
#38 0x0804bd15 in main (argc=1, argv=0xbfb03334) at /home/shlomi/Download/unpack/multimedia/amarok/trunk/amarok/src/main.cpp:128
}}}}}}}}}}}

Regards,

    Shlomi Fish
Comment 1 Mark Kretschmann 2009-04-07 11:29:32 UTC
SVN commit 950472 by markey:

Don't crash when pressing Delete on empty playlist.

BUG: 189021

 M  +1 -0      ChangeLog  
 M  +9 -6      src/playlist/view/listview/PrettyListView.cpp  


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