Bug 192371

Summary: JuK crash in CoverManager (assert, CoverManager::data, CoverManager::idForTrack, CoverInfo::coverId)
Product: [Applications] juk Reporter: Georg Grabler <ggrabler>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: crash CC: albzey, andresbajotierra, fezsentido, guido-kdebugs, keggy85, mpyne, tjm1983
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Georg Grabler 2009-05-11 22:15:45 UTC
Version:            (using Devel)
Compiler:          gcc (GCC) 4.4.0 
OS:                Linux
Installed from:    Compiled sources

I noticed a crash in the CoverManager, or rather when I open JuK and close it very fast again (i do so often when testing my code).

A note for me to keep track on this, I've to take a look at those parts anyway when porting the k3 crap to nice qt4 objects :D.

Michael - maybe there was a patch in kde3 for this (but I remember crashes like this in kde3 as well .. but I was an early adopter).

0	raise	/lib/libc.so.6	0	
1	abort	/lib/libc.so.6	0	
2	qt_message_output	/usr/lib/libQtCore.so.4	0	
3	qFatal	/usr/lib/libQtCore.so.4	0	
4	CoverManager::data	covermanager.cpp	176	
5	CoverManager::idForTrack	covermanager.cpp	627	
6	CoverInfo::coverId	coverinfo.cpp	205	
7	PlaylistItem::compare	playlistitem.cpp	379	
8	PlaylistItem::compare	playlistitem.cpp	331	
9	??	/usr/lib/libQt3Support.so.4	0	
10	Q3ListViewItem::sortChildItems	/usr/lib/libQt3Support.so.4	0	
11	Q3ListView::firstChild	/usr/lib/libQt3Support.so.4	0	
12	Q3ListViewItemIterator::Q3ListViewItemIterator	/usr/lib/libQt3Support.so.4	0	
13	Playlist::items	playlist.cpp	1806	
14	Playlist::items	playlist.cpp	625	
15	~CollectionList	collectionlist.cpp	279	
16	QObjectPrivate::deleteChildren	/usr/lib/libQtCore.so.4	0	
17	QWidget::~QWidget	/usr/lib/libQtGui.so.4	0	
18	QStackedWidget::~QStackedWidget	/usr/lib/libQtGui.so.4	0	
19	QObjectPrivate::deleteChildren	/usr/lib/libQtCore.so.4	0	
20	QWidget::~QWidget	/usr/lib/libQtGui.so.4	0	
...	<More>
Comment 1 Georg Grabler 2009-05-11 22:16:55 UTC
Oh, additionally, using a JuK snapshot of 09th of may 2009, so just 3 days fresh. Most likely not fixed yet.
Comment 2 Georg Grabler 2009-05-12 01:40:39 UTC
Complete trace by KDE Crash Handler

Application: JuK (juk), signal SIGABRT
0x00007f69d45e41a1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 13081)]

Thread 6 (Thread 0x7f69c6410950 (LWP 13083)):
#0  0x00007f69d61a1e6d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f69cac6e581 in metronom_sync_loop () from /usr/lib/libxine.so.1
#2  0x00007f69d619d3b4 in start_thread () from /lib/libpthread.so.0
#3  0x00007f69d461389d in clone () from /lib/libc.so.6

Thread 5 (Thread 0x7f69c55d5950 (LWP 13084)):
#0  0x00007f69d61a0b48 in __pthread_mutex_unlock_usercnt () from /lib/libpthread.so.0
#1  0x00007f69cfdad64a in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#2  0x00007f69cfdad87c in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007f69d65227fe in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
#4  0x00007f69d64f7a32 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#5  0x00007f69d64f7dfd in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#6  0x00007f69d640ddc8 in QThread::exec () from /usr/lib/libQtCore.so.4
#7  0x00007f69caec76d2 in Phonon::Xine::XineThread::run () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#8  0x00007f69d6410d22 in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f69d619d3b4 in start_thread () from /lib/libpthread.so.0
#10 0x00007f69d461389d in clone () from /lib/libc.so.6

Thread 4 (Thread 0x7f69c4bcb950 (LWP 13087)):
#0  0x00007f69d460b343 in poll () from /lib/libc.so.6
#1  0x00007f69c4bd0839 in ao_alsa_handle_event_thread () from /usr/lib/xine/plugins/1.26/xineplug_ao_out_alsa.so
#2  0x00007f69d619d3b4 in start_thread () from /lib/libpthread.so.0
#3  0x00007f69d461389d in clone () from /lib/libc.so.6

Thread 3 (Thread 0x7f69c43ca950 (LWP 13088)):
#0  0x00007f69d61a1be9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f69cac7f5c3 in ao_loop () from /usr/lib/libxine.so.1
#2  0x00007f69d619d3b4 in start_thread () from /lib/libpthread.so.0
#3  0x00007f69d461389d in clone () from /lib/libc.so.6

Thread 2 (Thread 0x7f69c39c7950 (LWP 13089)):
#0  0x00007f69d61a1be9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f69cac7f5c3 in ao_loop () from /usr/lib/libxine.so.1
#2  0x00007f69d619d3b4 in start_thread () from /lib/libpthread.so.0
#3  0x00007f69d461389d in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7f69d9d12760 (LWP 13081)):
[KCrash Handler]
#5  0x00007f69d4579e45 in raise () from /lib/libc.so.6
#6  0x00007f69d457b2aa in abort () from /lib/libc.so.6
#7  0x00007f69d6408c95 in qt_message_output () from /usr/lib/libQtCore.so.4
#8  0x00007f69d6408ddb in qFatal () from /usr/lib/libQtCore.so.4
#9  0x0000000000444caf in CoverManager::data () at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/covermanager.cpp:160
#10 0x0000000000445446 in CoverManager::idForTrack (path=@0x3319) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/covermanager.cpp:570
#11 0x0000000000440613 in CoverInfo::coverId (this=0x2bbbad0) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/coverinfo.cpp:205
#12 0x00000000004a8edd in PlaylistItem::compare (this=<value optimized out>, firstItem=<value optimized out>, secondItem=0x2bbb850, column=<value optimized out>)
    at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/playlistitem.cpp:376
#13 0x00000000004a9353 in PlaylistItem::compare (this=0x2bbc1d0, item=0x2bbb850, column=<value optimized out>, ascending=<value optimized out>)
    at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/playlistitem.cpp:328
#14 0x00007f69d7db012e in ?? () from /usr/lib/libQt3Support.so.4
#15 0x00007f69d7da121b in Q3ListViewItem::sortChildItems () from /usr/lib/libQt3Support.so.4
#16 0x00007f69d7d9984c in Q3ListView::firstChild () from /usr/lib/libQt3Support.so.4
#17 0x00007f69d7d9a58c in Q3ListViewItemIterator::Q3ListViewItemIterator () from /usr/lib/libQt3Support.so.4
#18 0x0000000000488da8 in Playlist::files (this=0x3319) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/playlist.cpp:618
#19 0x0000000000488f22 in operator<< (s=@0x7fffe1d4e9f0, p=@0x2bb04a0) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/playlist.cpp:2388
#20 0x0000000000435125 in Cache::savePlaylists (playlists=@0x7fffe1d4eb70) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/cache.cpp:306
#21 0x0000000000496ef7 in ~PlaylistBox (this=0x1ea8470) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/playlistbox.cpp:177
#22 0x00000000004af693 in ~PlaylistSplitter (this=0x1f4d290) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/playlistsplitter.cpp:78
#23 0x000000000046f866 in JuK::slotAboutToQuit (this=0x1dae640) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/juk.cpp:476
#24 0x000000000046fee8 in JuK::qt_metacall (this=0x1dae640, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fffe1d4ec90)
    at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/juk.moc:81
#25 0x00007f69d650eb62 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#26 0x00007f69d64fa115 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#27 0x000000000047775b in main (argc=5, argv=0x7fffe1d4f3e8) at /home/sandsmark/kdemod/testing/kdemultimedia/src/kdemultimedia-4.2.2/juk/main.cpp:123
Comment 3 Dario Andres 2009-06-15 03:30:37 UTC
*** Bug 196495 has been marked as a duplicate of this bug. ***
Comment 4 Dario Andres 2009-09-07 23:09:06 UTC
*** Bug 206685 has been marked as a duplicate of this bug. ***
Comment 5 Dario Andres 2009-10-14 03:13:16 UTC
From bug 210434:
--

Updated backtrace:

Backtrace:
Application: JuK (juk), signal: Aborted
[KCrash Handler]
#5  0x00007f4590d3c205 in raise (sig=<value optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#6  0x00007f4590d3d723 in abort () at abort.c:88
#7  0x00007f4592a7783d in qt_message_output (msgType=QtFatalMsg, buf=<value
optimized out>) at global/qglobal.cpp:2042
#8  0x00007f4592a77950 in qFatal (msg=<value optimized out>) at
global/qglobal.cpp:2241
#9  0x000000000044100f in operator-> (this=<value optimized out>) at
/var/tmp/portage/kde-base/juk-4.3.2/work/juk-4.3.2/juk/covermanager.cpp:176
#10 operator CoverManagerPrivate* (this=<value optimized out>) at
/var/tmp/portage/kde-base/juk-4.3.2/work/juk-4.3.2/juk/covermanager.cpp:176
#11 CoverManager::data (this=<value optimized out>) at
/var/tmp/portage/kde-base/juk-4.3.2/work/juk-4.3.2/juk/covermanager.cpp:573
#12 0x0000000000441796 in CoverManager::idForTrack (path=...) at
/var/tmp/portage/kde-base/juk-4.3.2/work/juk-4.3.2/juk/covermanager.cpp:627
#13 0x000000000043cfd3 in CoverInfo::coverId (this=0x11f4dd0) at
/var/tmp/portage/kde-base/juk-4.3.2/work/juk-4.3.2/juk/coverinfo.cpp:205
#14 0x00000000004a077d in PlaylistItem::compare (this=<value optimized out>,
firstItem=0xbb4f50, secondItem=0xbb4970, column=4)
    at
/var/tmp/portage/kde-base/juk-4.3.2/work/juk-4.3.2/juk/playlistitem.cpp:379
#15 0x00000000004a0b22 in PlaylistItem::compare (this=0xbb4f50, item=0xbb4970,
column=<value optimized out>, ascending=<value optimized out>)
    at
/var/tmp/portage/kde-base/juk-4.3.2/work/juk-4.3.2/juk/playlistitem.cpp:331
#16 0x00007f4594353a98 in cmp (i=<value optimized out>, this=<value optimized
out>) at itemviews/q3listview.cpp:121
Comment 6 Dario Andres 2009-10-14 03:13:20 UTC
*** Bug 210434 has been marked as a duplicate of this bug. ***
Comment 7 Dario Andres 2009-10-28 17:36:11 UTC
According to the backtrace from bug 212013, the problem seems to be:
#9  0x001f4f8c in qt_message_output (msgType=QtFatalMsg, 
    buf=0x875df50 "Fatal Error: Accessed global static 'CoverManagerPrivate
*sd()' after destruction. Defined at
/builddir/build/BUILD/kdemultimedia-4.3.1/juk/covermanager.cpp:176")
    at global/qglobal.cpp:2042
Comment 8 Dario Andres 2009-10-28 17:36:17 UTC
*** Bug 212013 has been marked as a duplicate of this bug. ***
Comment 9 Michael Pyne 2009-10-29 04:09:56 UTC
SVN commit 1042066 by mpyne:

Postpone CoverManager shutdown until after the playlists have been destroyed.  The playlists
use cover information as one of the comparison keys, so having the order reversed could
sometimes cause crashes on shutdown.  This fix will be in KDE 4.4, will backport.

CCBUG:192371


 M  +4 -2      juk.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1042066
Comment 10 Michael Pyne 2009-10-29 04:15:56 UTC
SVN commit 1042068 by mpyne:

Postpone CoverManager shutdown until after the playlists have been destroyed, backported
to KDE 4.3.3.

BUG:192371


 M  +4 -2      juk.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1042068
Comment 11 Dario Andres 2009-12-13 23:48:59 UTC
*** Bug 218545 has been marked as a duplicate of this bug. ***