Bug 215773 - amarok crashes on startup, possibly due to a problem in QString
Summary: amarok crashes on startup, possibly due to a problem in QString
Status: RESOLVED UPSTREAM
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.2.1
Platform: Exherbo Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-23 02:58 UTC by Arthur Nascimento
Modified: 2011-03-12 11:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (10.89 KB, text/plain)
2011-03-12 11:14 UTC, Ladislav Sückr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Nascimento 2009-11-23 02:58:02 UTC
Version:           2.2.1 (using KDE 4.3.3)
Compiler:          GCC 4.4.2 
OS:                Linux
Installed from:    Exherbo Packages

After upgrading Amarok to version 2.2.0, it crashes every time I try to start it.

I tried several times with a couple of different versions of Amarok (2.2.0 and 2.2.1) and Qt (a few versions around 4.5, as well as 4.6 from the repository).

Qt versions 4.5 always chashed with signal 11, SIGSEGV. Qt version 4.6 (latest directly from repository as of today) always crashes with signal 6, SIGABRT.

Following, are the backtraces of two of the runs I tried. On both cases, the signals are sent after a QString::append(), according to the backtraces.

Backtrace with Qt 4.5.3:
================================================================

Application that crashed: amarok
Version of the application: 2.2.1
KDE Version: 4.3.3 (KDE 4.3.3)
Qt Version: 4.5.3
Operating System: Linux 2.6.32-rc7 i686

 -- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault
[Current thread is 1 (Thread 0xb223d730 (LWP 3525))]

Thread 7 (Thread 0xb00c6b70 (LWP 3526)):
#0  0xb78f0424 in __kernel_vsyscall ()
#1  0xb6c85b91 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb0ac1407 in metronom_sync_loop () from /usr/lib/libxine.so.1
#3  0x00000005 in ?? ()
#4  0xb00c6320 in ?? ()
#5  0x004aee04 in ?? ()
#6  0x00000000 in ?? ()

Thread 6 (Thread 0xaf8c5b70 (LWP 3527)):
#0  0xb6c84ccb in __pthread_mutex_unlock_usercnt () from /lib/libpthread.so.0
#1  0xb38f5a65 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#2  0xb38f5e05 in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#3  0xb38f62e2 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb6943cc9 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#5  0xb691a72f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#6  0xb691ab1c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#7  0xb6837631 in QThread::exec() () from /usr/lib/qt4/libQtCore.so.4
#8  0xb0b0dcdc in Phonon::Xine::XineThread::run() () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#9  0xb683a4cc in QThreadPrivate::start(void*) () from /usr/lib/qt4/libQtCore.so.4
#10 0xb6c816dd in start_thread () from /lib/libpthread.so.0
#11 0xb5d5f57e in clone () from /lib/libc.so.6

Thread 5 (Thread 0xaf0c4b70 (LWP 3531)):
#0  0xb6c8399f in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0xb09b4222 in ao_alsa_handle_event_thread () from /usr/lib/xine/plugins/1.26/xineplug_ao_out_alsa.so
#2  0x00000000 in ?? ()

Thread 4 (Thread 0xae8c3b70 (LWP 3532)):
#0  0xb78f0424 in __kernel_vsyscall ()
#1  0xb6c85864 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb0ad2dfc in ao_loop () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 3 (Thread 0xadcffb70 (LWP 3533)):
#0  0xb78f0424 in __kernel_vsyscall ()
#1  0xb6c85864 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb0ad2dfc in ao_loop () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 2 (Thread 0xad4feb70 (LWP 3534)):
#0  0xb78f0424 in __kernel_vsyscall ()
#1  0xb6c85864 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb0ad2dfc in ao_loop () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 1 (Thread 0xb223d730 (LWP 3525)):
[KCrash Handler]
#6  0xb5d0c9c6 in memcpy () from /lib/libc.so.6
#7  0xbfe3615c in ?? ()
#8  0xb687c31b in QString::append(QString const&) () from /usr/lib/qt4/libQtCore.so.4
#9  0xb68c62d8 in QTextStreamPrivate::fillReadBuffer(long long) () from /usr/lib/qt4/libQtCore.so.4
#10 0xb68c6970 in QTextStreamPrivate::scan(QChar const**, int*, int, QTextStreamPrivate::TokenDelimiter) () from /usr/lib/qt4/libQtCore.so.4
#11 0xb68c6bc5 in QTextStream::readAll() () from /usr/lib/qt4/libQtCore.so.4
#12 0xb70c811b in PlaylistBrowserNS::DynamicModel::loadPlaylists (this=0x9b30050)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/DynamicModel.cpp:282
#13 0xb70d02cd in DynamicCategory (this=0x9f831f0, parent=0x0) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/DynamicCategory.cpp:117
#14 0xb70e3bef in PlaylistBrowserNS::PlaylistBrowser::loadDynamicCategory (this=0x9f7b718)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/PlaylistBrowser.cpp:114
#15 0xb70e6cf3 in PlaylistBrowserNS::PlaylistBrowser::addCategory (this=0x9f7b718, category=4)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/PlaylistBrowser.cpp:94
#16 0xb70e6f32 in PlaylistBrowser (this=0x9f7b718, name=0xb73d0993 "playlists", parent=0x0)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/PlaylistBrowser.cpp:52
#17 0xb72207d8 in MainWindow::init (this=0x97e1c48) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/MainWindow.cpp:335
#18 0xb7222169 in MainWindow (this=0x97e1c48) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/MainWindow.cpp:181
#19 0xb71ed8ed in App::continueInit (this=0xbfe36b90) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/App.cpp:664
#20 0xb71f2172 in App (this=0xbfe36b90) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/App.cpp:222
#21 0x08112542 in main (argc=1, argv=0xbfe373a4) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/main.cpp:225

This bug may be a duplicate of or related to bug 210707

Report to https://bugs.kde.org

================================================================


Backtrace with Qt 4.6.0:
================================================================

Application that crashed: amarok
Version of the application: 2.2.1
KDE Version: 4.3.3 (KDE 4.3.3)
Qt Version: 4.6.0
Operating System: Linux 2.6.32-rc7 i686

 -- Backtrace:
Application: Amarok (amarok), signal: Aborted
[Current thread is 1 (Thread 0xb1a29730 (LWP 21516))]

Thread 8 (Thread 0xaf8b4b70 (LWP 21520)):
#0  0xb780b424 in __kernel_vsyscall ()
#1  0xb6b9fb91 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb02b4407 in metronom_sync_loop () from /usr/lib/libxine.so.1
#3  0x00000005 in ?? ()
#4  0xaf8b4320 in ?? ()
#5  0x009b5ab4 in ?? ()
#6  0x00000000 in ?? ()

Thread 7 (Thread 0xaf0b3b70 (LWP 21522)):
#0  0xb6b9d99f in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0xb34a558e in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0
#2  0xb34a6d7a in g_main_context_iterate () from /usr/lib/libglib-2.0.so.0
#3  0xb34a72e2 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#4  0xb683c1e6 in QEventDispatcherGlib::processEvents (this=0x8ece178, flags=...) at kernel/qeventdispatcher_glib.cpp:409
#5  0xb6811ac7 in QEventLoop::processEvents (this=0xaf0b3280, flags=) at kernel/qeventloop.cpp:149
#6  0xb6811eb7 in QEventLoop::exec (this=0xaf0b3280, flags=...) at kernel/qeventloop.cpp:201
#7  0xb671e60c in QThread::exec (this=0x8eb89b0) at thread/qthread.cpp:487
#8  0xb0300cdc in Phonon::Xine::XineThread::run() () from /usr/lib/kde4/plugins/phonon_backend/phonon_xine.so
#9  0xb67210e8 in QThreadPrivate::start (arg=0x8eb89b0) at thread/qthread_unix.cpp:244
#10 0xb6b9b6dd in start_thread () from /lib/libpthread.so.0
#11 0xb5b6757e in clone () from /lib/libc.so.6

Thread 6 (Thread 0xae8b2b70 (LWP 21542)):
#0  0xb5b73d20 in __libc_enable_asynccancel () from /lib/libc.so.6
#1  0xb5b5e2ad in poll () from /lib/libc.so.6
#2  0xb01a31ef in ao_alsa_handle_event_thread () from /usr/lib/xine/plugins/1.26/xineplug_ao_out_alsa.so
#3  0x00000000 in ?? ()

Thread 5 (Thread 0xae0b1b70 (LWP 21543)):
#0  0xb780b424 in __kernel_vsyscall ()
#1  0xb6b9f864 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb02c5dfc in ao_loop () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 4 (Thread 0xad8a9b70 (LWP 21544)):
#0  0xb780b424 in __kernel_vsyscall ()
#1  0xb6b9f864 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb02c5dfc in ao_loop () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 3 (Thread 0xad0a8b70 (LWP 21545)):
#0  0xb780b424 in __kernel_vsyscall ()
#1  0xb6b9f864 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb02c5dfc in ao_loop () from /usr/lib/libxine.so.1
#3  0x00000000 in ?? ()

Thread 2 (Thread 0xac626b70 (LWP 21782)):
#0  0xb780b424 in __kernel_vsyscall ()
#1  0xb6b9f864 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb3b3fc67 in WTF::TCMalloc_PageHeap::scavengerThread (this=0xb48f3f40) at ../JavaScriptCore/wtf/FastMalloc.cpp:2299
#3  0xb3b3fca5 in WTF::TCMalloc_PageHeap::runScavengerThread (context=0xb48f3f40) at ../JavaScriptCore/wtf/FastMalloc.cpp:1433
#4  0xb6b9b6dd in start_thread () from /lib/libpthread.so.0
#5  0xb5b6757e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb1a29730 (LWP 21516)):
[KCrash Handler]
#6  0xb780b424 in __kernel_vsyscall ()
#7  0xb5acd959 in raise () from /lib/libc.so.6
#8  0xb5acee1c in abort () from /lib/libc.so.6
#9  0xb5cc910d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#10 0xb5cc6df5 in __cxxabiv1::__terminate(void (*)()) () from /usr/lib/libstdc++.so.6
#11 0xb5cc6e26 in std::terminate() () from /usr/lib/libstdc++.so.6
#12 0xb5cc6f43 in __cxa_throw () from /usr/lib/libstdc++.so.6
#13 0xb6718ed5 in qBadAlloc () at global/qglobal.cpp:1980
#14 0xb6766d0d in q_check_ptr<void> (this=0x9775b04, alloc=1073741823) at ../../include/QtCore/../../src/corelib/global/qglobal.h:1693
#15 QString::realloc (this=0x9775b04, alloc=1073741823) at tools/qstring.cpp:1242
#16 0xb676725b in QString::append (this=0x9775b04, str=...) at tools/qstring.cpp:1456
#17 0xb67b8290 in QString::operator+= (this=0x9775a98, maxBytes=-1) at ../../include/QtCore/../../src/corelib/tools/qstring.h:269
#18 QTextStreamPrivate::fillReadBuffer (this=0x9775a98, maxBytes=-1) at io/qtextstream.cpp:588
#19 0xb67b9fc1 in QTextStreamPrivate::read (this=0x9775a98, maxlen=2147483647) at io/qtextstream.cpp:715
#20 0xb67ba27b in QTextStream::readAll (this=0xbfd16438) at io/qtextstream.cpp:1635
#21 0xb6fe311b in PlaylistBrowserNS::DynamicModel::loadPlaylists (this=0x9397558)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/DynamicModel.cpp:282
#22 0xb6feb2cd in DynamicCategory (this=0x9771058, parent=0x0) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/DynamicCategory.cpp:117
#23 0xb6ffebef in PlaylistBrowserNS::PlaylistBrowser::loadDynamicCategory (this=0x9769860)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/PlaylistBrowser.cpp:114
#24 0xb7001cf3 in PlaylistBrowserNS::PlaylistBrowser::addCategory (this=0x9769860, category=4)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/PlaylistBrowser.cpp:94
#25 0xb7001f32 in PlaylistBrowser (this=0x9769860, name=0xb72eb993 "playlists", parent=0x0)
    at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/browsers/playlistbrowser/PlaylistBrowser.cpp:52
#26 0xb713b7d8 in MainWindow::init (this=0x8ec5dc8) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/MainWindow.cpp:335
#27 0xb713d169 in MainWindow (this=0x8ec5dc8) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/MainWindow.cpp:181
#28 0xb71088ed in App::continueInit (this=0xbfd16d00) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/App.cpp:664
#29 0xb710d172 in App (this=0xbfd16d00) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/App.cpp:222
#30 0x08112542 in main (argc=1, argv=0xbfd17514) at /var/tmp/paludis/build/media-sound-amarok-2.2.1/work/amarok-2.2.1/src/main.cpp:225

Report to https://bugs.kde.org
Comment 1 Dario Andres 2009-11-23 14:04:33 UTC
This looks related to bug 211275. Thanks
Comment 2 Arthur Nascimento 2009-11-23 15:22:40 UTC
It really does look exactly like bug 211275.

However, that bug is marked RESOLVED UPSTREAM, and if that were the case, then I shouldn't be experiencing it. So it should be reopened or at least re-looked at.

Unfortunately, it doesn't say how it was resolved or what was the bottomline problem (was it that piece of code or Qt?). If anybody can explain it to me, maybe I can run some better tests.
Comment 3 Dario Andres 2009-11-23 15:24:22 UTC
UPSTREAM means that the bug was caused by some of the used libraries, in that case Qt...  but I'm not an Amarok developer to tell if the issue was investigated or if it is going to be forwarded to Qt bugtracker. Regards
Comment 4 Mark Kretschmann 2009-11-23 18:05:51 UTC
No, this is probably something different, please read up here:

http://www.purinchu.net/wp/2009/11/16/malloc_check_-crashes/


If that's really it, it would be a bug in glibc, which is upstream. Please read up on this blog article, and check if the glibc issue might affect you. Thanks.
Comment 5 Arthur Nascimento 2009-11-23 19:46:03 UTC
Very interesting. The reason of this bug and of bug 211275 is probably a glibc issue.

According to the glibc guys, the bug will be fixed on 2.11.1, which should be out before the end of this month.

I am currently using 2.11, but I will bump it up as soon as possible and report back if I still have problems.
Comment 6 Ladislav Sückr 2011-03-12 11:14:08 UTC
Created attachment 57896 [details]
New crash information added by DrKonqi

amarok (2.4.0) on KDE Platform 4.6.00 (4.6.0) "release 6" using Qt 4.7.1

- What I was doing when the application crashed:

first start of amarok after instalation openSUSE 11.4 64 bit in virtualbox

-- Backtrace (Reduced):
#12 0x00007ff5372df4f2 in qBadAlloc () at global/qglobal.cpp:2019
#13 0x00007ff53732f835 in QString::realloc (this=0x16a5fd8, alloc=1048560) at tools/qstring.cpp:1297
#14 0x00007ff53732fc4f in QString::append (this=0x16a5fd8, str=...) at tools/qstring.cpp:1534
#15 0x00007ff53740574c in operator+= (this=<value optimized out>, target=0x16a5fd8, chars=<value optimized out>, len=<value optimized out>, state=<value optimized out>) at ../../src/corelib/tools/qstring.h:281
#16 QUtf8Codec::convertToUnicode (this=<value optimized out>, target=0x16a5fd8, chars=<value optimized out>, len=<value optimized out>, state=<value optimized out>) at codecs/qutfcodec.cpp:527