Bug 179776 - Crash when Juk Loads
Summary: Crash when Juk Loads
Status: RESOLVED FIXED
Alias: None
Product: juk
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-06 03:18 UTC by Ethan Hall
Modified: 2009-04-29 02:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch that fixes the bug (1003 bytes, patch)
2009-04-28 12:03 UTC, Jiri Palecek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ethan Hall 2009-01-06 03:18:34 UTC
Version:            (using Devel)
Compiler:          4.2.1 i686-gcc
OS:                Linux
Installed from:    Compiled sources

No plugins loaded.
Reproduce: Load Juk, after about 15-30 seconds of loading the collection and play lists Juk crashes.  Total number of songs/items in directory to search is 11924 files, over 47G.  This happened after I rearranged the collection to be easier to navigate.

Expected Behavior: Load properly

Backtraces:
Application: JuK (juk), signal SIGSEGV
[Current thread is 0 (LWP 32080)]

Thread 6 (Thread 0xb2d79b90 (LWP 32081)):
#0  0xb7f28424 in __kernel_vsyscall ()
#1  0xb698afb2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb3a1d03b in metronom_sync_loop () from /usr/lib/libxine.so.1
#3  0xb6987170 in start_thread () from /lib/libpthread.so.0
#4  0xb5de1bce in clone () from /lib/libc.so.6

Thread 5 (Thread 0xb2578b90 (LWP 32082)):
#0  0xb59f43ca in clock_gettime () from /lib/librt.so.1
#1  0xb6b1989b in QTimerInfoList::getTime (this=0x9e5dbc4, t=@0x1) at kernel/qeventdispatcher_unix.cpp:341
#2  0xb6b19a61 in QTimerInfoList::updateCurrentTime (this=0x9e5dbc4) at kernel/qeventdispatcher_unix.cpp:299
#3  0xb6b1aedd in QTimerInfoList::timerWait (this=0x9e5dbc4, tm=@0xb2578134) at kernel/qeventdispatcher_unix.cpp:422
#4  0xb6b17f62 in timerSourcePrepare (source=0xb59f7ff4, timeout=0xb2578188) at kernel/qeventdispatcher_glib.cpp:142
#5  0xb54ddf33 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#6  0xb54de3d2 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#7  0xb54de8b2 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#8  0xb6b17d97 in QEventDispatcherGlib::processEvents (this=0x9e60fa0, flags={i = -1302887816}) at kernel/qeventdispatcher_glib.cpp:327
#9  0xb6ae872b in QEventLoop::processEvents (this=0xb25782f0, flags={i = -1302887752}) at kernel/qeventloop.cpp:149
#10 0xb6ae8902 in QEventLoop::exec (this=0xb25782f0, flags={i = -1302887688}) at kernel/qeventloop.cpp:200
#11 0xb69e5e7a in QThread::exec (this=0x9e5dfa0) at thread/qthread.cpp:464
#12 0xb3a6846e in Phonon::Xine::XineThread::run () from /usr/kde/svn/lib/kde4/plugins/phonon_backend/phonon_xine.so
#13 0xb69e95ff in QThreadPrivate::start (arg=0x9e5dfa0) at thread/qthread_unix.cpp:191
#14 0xb6987170 in start_thread () from /lib/libpthread.so.0
#15 0xb5de1bce in clone () from /lib/libc.so.6

Thread 4 (Thread 0xb1d77b90 (LWP 32085)):
#0  0xb7f28424 in __kernel_vsyscall ()
#1  0xb5dd83d7 in poll () from /lib/libc.so.6
#2  0xb3928197 in ao_alsa_handle_event_thread () from /usr/lib/xine/plugins/1.24/xineplug_ao_out_alsa.so
#3  0xb6987170 in start_thread () from /lib/libpthread.so.0
#4  0xb5de1bce in clone () from /lib/libc.so.6
Current language:  auto; currently asm

Thread 3 (Thread 0xb1534b90 (LWP 32086)):
#0  0xb7f28424 in __kernel_vsyscall ()
#1  0xb698ac85 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb3a2c26c in fifo_peek_int () from /usr/lib/libxine.so.1
#3  0x09edeeb8 in ?? ()
#4  0xb3a56ff4 in ?? () from /usr/lib/libxine.so.1
#5  0xb3a56ff4 in ?? () from /usr/lib/libxine.so.1
#6  0x09efe2d8 in ?? ()
#7  0x00000000 in ?? ()

Thread 2 (Thread 0xb0d12b90 (LWP 32087)):
#0  0xb7f28424 in __kernel_vsyscall ()
#1  0xb698ac85 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb3a2c26c in fifo_peek_int () from /usr/lib/libxine.so.1
#3  0x09ffd400 in ?? ()
#4  0x00000000 in ?? ()

Thread 1 (Thread 0xb51d7700 (LWP 32080)):
[KCrash Handler]
#6  0x08074cc8 in QBasicAtomicInt::operator!= (this=0xbfd4fb3c, value=1) at /usr/include/qt4/QtCore/qbasicatomic.h:71
#7  0x0808d220 in QList<PlaylistObserver*>::detach (this=0xd727cb8) at /usr/include/qt4/QtCore/qlist.h:121
#8  0x080d853a in QList<PlaylistObserver*>::removeAll (this=0xd727cb8, _t=@0xbfc28404) at /usr/include/qt4/QtCore/qlist.h:573
#9  0x080d85a8 in QList<PlaylistObserver*>::remove (this=0xd727cb8, t=@0xbfc28404) at /usr/include/qt4/QtCore/qlist.h:283
#10 0x080d8383 in Watched::removeObserver (this=0xd727cb4, observer=0xd72aea0) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlistinterface.cpp:40
#11 0x080d83fe in ~PlaylistObserver (this=0xbfd4fb3c) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlistinterface.cpp:61
#12 0x080ca095 in ~Item (this=0xd72ae68) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlistbox.cpp:734
#13 0xb6af969c in qDeleteInEventHandler (o=0xd727cb4) at kernel/qobject.cpp:3656
#14 0xb6afb42b in QObject::event (this=0xd72ae68, e=0xd7279b8) at kernel/qobject.cpp:1136
#15 0xb608ae6c in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
#16 0xb6092df3 in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
#17 0xb702d37c in KApplication::notify () from /usr/kde/svn/lib/libkdeui.so.5
#18 0xb6ae9e2e in QCoreApplication::notifyInternal (this=0xbfc294a8, receiver=0xbfc294a8, event=0xd7279b8) at kernel/qcoreapplication.cpp:593
#19 0xb6aeae9b in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9cad2f0) at kernel/qcoreapplication.h:215
#20 0xb6aeb0ee in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1097
#21 0xb6b180c0 in postEventSourceDispatch (s=0x9cc90a8) at kernel/qcoreapplication.h:220
#22 0xb54daf38 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#23 0xb54de6fb in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#24 0xb54de8b2 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#25 0xb6b17d79 in QEventDispatcherGlib::processEvents (this=0x9cbd510, flags={i = -1077769752}) at kernel/qeventdispatcher_glib.cpp:325
#26 0xb6121ba6 in QGuiEventDispatcherGlib::processEvents () from /usr/lib/qt4/libQtGui.so.4
#27 0xb6aeb357 in QCoreApplication::processEvents (flags={i = -1077769648}) at kernel/qcoreapplication.cpp:777
#28 0x080bb018 in processEvents () at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlist.cpp:2405
#29 0x080c4bef in Playlist::addFile (this=0x9dbff40, file=@0xbfc28b24, files=@0xbfc28c84, importPlaylists=false, after=0xbfc28ca8) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlist.cpp:1855
#30 0x080c4a18 in Playlist::addFile (this=0x9dbff40, file=@0xbfc28ba4, files=@0xbfc28c84, importPlaylists=false, after=0xbfc28ca8) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlist.cpp:1908
#31 0x080c4a18 in Playlist::addFile (this=0x9dbff40, file=@0xbfc28c24, files=@0xbfc28c84, importPlaylists=false, after=0xbfc28ca8) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlist.cpp:1908
#32 0x080c4a18 in Playlist::addFile (this=0x9dbff40, file=@0x9d5b35c, files=@0xbfc28c84, importPlaylists=true, after=0xbfc28ca8) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlist.cpp:1908
#33 0x080c4d17 in Playlist::addFiles (this=0x9dbff40, files=@0x9df9958, after=0x0) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlist.cpp:1355
#34 0x080d3d57 in PlaylistCollection::scanFolders (this=0x9df992c) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlistcollection.cpp:494
#35 0x080d7b32 in PlaylistCollection::ActionHandler::slotScanFolders (this=0x9de8a68) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/playlistcollection.h:244
#36 0x080d702d in PlaylistCollection::ActionHandler::qt_metacall (this=0x9de8a68, _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0xbfc28d78)
    at /var/tmp/paludis/kde-base-juk-scm/work/juk_build/juk/playlistcollection.moc:135
#37 0xb6b02279 in QMetaObject::activate (sender=0x9d5c658, from_signal_index=<value optimized out>, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3028
#38 0xb6b04233 in QMetaObject::activate (sender=0x9d5c658, m=0xb6bd6904, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3098
#39 0xb6b08468 in QSingleShotTimer::timeout (this=0x9d5c658) at .moc/debug-shared/qtimer.moc:74
#40 0xb6b0859d in QSingleShotTimer::timerEvent (this=0x9d5c658) at kernel/qtimer.cpp:300
#41 0xb6afb1bf in QObject::event (this=0x9d5c658, e=0xbfc2921c) at kernel/qobject.cpp:1117
#42 0xb608ae6c in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
#43 0xb6092df3 in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
#44 0xb702d37c in KApplication::notify () from /usr/kde/svn/lib/libkdeui.so.5
#45 0xb6ae9e2e in QCoreApplication::notifyInternal (this=0xbfc294a8, receiver=0xbfc294a8, event=0xbfc2921c) at kernel/qcoreapplication.cpp:593
#46 0xb6b1b541 in QTimerInfoList::activateTimers (this=0x9cca614) at kernel/qcoreapplication.h:215
#47 0xb6b17e21 in timerSourceDispatch (source=0x9cca5e0) at kernel/qeventdispatcher_glib.cpp:166
#48 0xb54daf38 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#49 0xb54de6fb in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#50 0xb54de8b2 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#51 0xb6b17d79 in QEventDispatcherGlib::processEvents (this=0x9cbd510, flags={i = -1077767272}) at kernel/qeventdispatcher_glib.cpp:325
#52 0xb6121ba6 in QGuiEventDispatcherGlib::processEvents () from /usr/lib/qt4/libQtGui.so.4
#53 0xb6ae872b in QEventLoop::processEvents (this=0xbfc29440, flags={i = -1077767160}) at kernel/qeventloop.cpp:149
#54 0xb6ae8902 in QEventLoop::exec (this=0xbfc29440, flags={i = -1077767096}) at kernel/qeventloop.cpp:200
#55 0xb6aeb1b5 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:851
#56 0xb608acd8 in QApplication::exec () from /usr/lib/qt4/libQtGui.so.4
#57 0x080b1556 in main (argc=5, argv=0xbfc296b4) at /var/tmp/paludis/kde-base-juk-scm/work/juk/juk/main.cpp:123
Comment 1 Ethan Hall 2009-01-06 03:30:31 UTC
I just removed .kdesvn/share/apps/juk/playlist and restarted Juk and it seems to  working.  It seems like a weird error but I'm going to set the ticket to 'later' as the program functions now. Just a bug to fix for later.
Comment 2 Jiri Palecek 2009-04-28 12:00:03 UTC
I don't quite understand the logic behind marking this as RESOLVED - it is a bug that's still there, and finding situations where it doesn't manifest itself doesn't change it in any way. Actually, it is a dangling pointer issue. (BTW, had you used the QPointer class, you'd save yourself some code and this bug).
Comment 3 Jiri Palecek 2009-04-28 12:03:27 UTC
Created attachment 33177 [details]
Patch that fixes the bug
Comment 4 Michael Pyne 2009-04-29 01:57:28 UTC
Jiri: You know I've known for a long time that there was a problem in the Watched/PlaylistObserver interaction but I was never able to pin down the issue even when I managed to dedicate time to it, so great find.  I'll commit and backport.
Comment 5 Michael Pyne 2009-04-29 02:04:37 UTC
SVN commit 960742 by mpyne:

Apply patch from Jiri Palecek to fix a fairly common source of JuK crashers, fix
will be in KDE 4.3 (backporting to 4.2.3).

CCBUG:179776


 M  +8 -3      playlistinterface.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=960742
Comment 6 Michael Pyne 2009-04-29 02:09:24 UTC
SVN commit 960744 by mpyne:

Backport fix for a common JuK crasher from Jiri Palecek to KDE 4.2.3.

BUG:179776


 M  +8 -3      playlistinterface.cpp  


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