Bug 311723 - Amarok crash upon start after an upgrade
Summary: Amarok crash upon start after an upgrade
Alias: None
Product: amarok
Classification: Applications
Component: Services/Last.fm (show other bugs)
Version: 2.6.90 (2.7 beta)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: 2.7
Assignee: Amarok Developers
: 312559 (view as bug list)
Depends on:
Reported: 2012-12-15 10:08 UTC by Lukas Jirkovsky
Modified: 2013-01-16 20:46 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.7

New crash information added by DrKonqi (4.11 KB, text/plain)
2013-01-07 10:40 UTC, Pedro

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jirkovsky 2012-12-15 10:08:46 UTC
Application: amarok (2.6.90)
KDE Platform Version: 4.9.4 (Compiled from sources)
Qt Version: 4.8.4
Operating System: Linux 3.6.10-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- What I was doing when the application crashed:
Started amarok.

When I first started amarok 2.7 beta, a message that the database is being upgraded appeared and amarok crashed afterwards (the main window didn't even show up).

Now amarok crashes everytime I try to start it, but without a message that the database is being upgraded.

The crash can be reproduced every time.

-- Backtrace:
Application: Amarok (amarok), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fda1b7627c0 (LWP 29946))]

Thread 2 (Thread 0x7fd9f6472700 (LWP 29950)):
#0  0x00007fda1806518d in poll () from /usr/lib/libc.so.6
#1  0x00007fda113adb14 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fda113adc34 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fda189ecb86 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007fda189bd3ff in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007fda189bd688 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007fda188be8a0 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007fda1899dbbf in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007fda188c187c in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007fda04fe1344 in ?? () from /usr/lib/libGL.so.1
#10 0x00007fda161d7e0f in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007fda1806d31d in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fda1b7627c0 (LWP 29946)):
[KCrash Handler]
#5  0x00007fda1a4e7b8b in ServiceBase::setModel (this=0x204c890, model=0x2896f10) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/services/ServiceBase.cpp:178
#6  0x00007fd9f5979b03 in LastFmService::slotReconfigure (this=this@entry=0x204c890) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/services/lastfm/LastFmService.cpp:190
#7  0x00007fd9f597a210 in LastFmService::LastFmService (this=0x204c890, parent=<optimized out>, name=...) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/services/lastfm/LastFmService.cpp:142
#8  0x00007fd9f597a263 in LastFmServiceFactory::init (this=0x2970aa0) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/services/lastfm/LastFmService.cpp:73
#9  0x00007fda1a4f6041 in ServicePluginManager::initFactory (this=this@entry=0x292ccd0, factory=factory@entry=0x2970aa0) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/services/ServicePluginManager.cpp:114
#10 0x00007fda1a4f724f in ServicePluginManager::init (this=0x292ccd0, factories=...) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/services/ServicePluginManager.cpp:71
#11 0x00007fda1a6ecae0 in Plugins::PluginManager::init (this=this@entry=0x22566a0) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/PluginManager.cpp:89
#12 0x00007fda1a6ecd34 in Plugins::PluginManager::PluginManager (this=0x22566a0, parent=<optimized out>) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/PluginManager.cpp:64
#13 0x00007fda1a6ece74 in Plugins::PluginManager::instance () at /home/lukas/amarok-devel/src/amarok-2.6.90/src/PluginManager.cpp:43
#14 0x00007fda1a6e1cb1 in MainWindow::MainWindow (this=0x20ab630) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/MainWindow.cpp:142
#15 0x00007fda1a6c476d in App::continueInit (this=this@entry=0x7fff6f788f70) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/App.cpp:546
#16 0x00007fda1a6c552c in App::App (this=0x7fff6f788f70) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/App.cpp:180
#17 0x000000000040874c in main (argc=0, argv=<optimized out>) at /home/lukas/amarok-devel/src/amarok-2.6.90/src/main.cpp:327

Reported using DrKonqi
Comment 1 Matěj Laitl 2012-12-15 22:23:44 UTC
Git commit 68f90970f51015b9410b0786fa4d861089ccd413 by Matěj Laitl.
Committed on 15/12/2012 at 23:17.
Pushed by laitl into branch 'master'.

ServiceBase::setModel(): prevent crash triggered by Last.fm rewrite

 * Prevent crash in ServiceBase::setModel triggered by Last.fm rewrite.

Lukáši, please test the patch so that we have no fear releasing 2.7

M  +1    -0    ChangeLog
M  +3    -4    src/services/ServiceBase.cpp

Comment 2 Lukas Jirkovsky 2012-12-16 10:05:37 UTC
I can confirm that it doesn't crash anymore.
Comment 3 Matěj Laitl 2012-12-16 17:17:52 UTC
(In reply to comment #2)
> I can confirm that it doesn't crash anymore.

Great, thanks a lot!
Comment 4 Matěj Laitl 2012-12-18 02:00:32 UTC
This should be a work-around:
don't store Last.fm username and password in plain-text: remove the entries tom .kde/share/config/amarokrc (search for Service_LastFm)
Comment 5 robert marshall 2012-12-21 17:08:10 UTC
I can confirm that the workaround (editing amarokrc) worked for me - thanks
Comment 6 Pedro 2013-01-07 10:40:45 UTC
Created attachment 76269 [details]
New crash information added by DrKonqi

amarok (2.6.90) on KDE Platform 4.9.4 using Qt 4.8.4

- What I was doing when the application crashed:

Exactly as explained before, I started Amarok after updating it to 2.6.90 (Gentoo masked packages).
After the database upgrade process ended, Amarok died.

Any attempts to start Amarok will crash consistently.

Rebuilding without lastfm support allows Amarok to start. Ie, in Gentoo, disable the "lastfm" USE flag.

-- Backtrace (Reduced):
#7  0xb70cd326 in ServiceBase::setModel (this=0x92810c8, model=0x926c6b0) at /var/tmp/portage/media-sound/amarok-2.6.90/work/amarok-2.6.90/src/services/ServiceBase.cpp:178
#8  0xb3d72ae3 in LastFmService::slotReconfigure (this=0x92810c8) at /var/tmp/portage/media-sound/amarok-2.6.90/work/amarok-2.6.90/src/services/lastfm/LastFmService.cpp:190
#9  0xb3d73511 in LastFmService::LastFmService (this=0x92810c8, parent=0x90cf748, name=...) at /var/tmp/portage/media-sound/amarok-2.6.90/work/amarok-2.6.90/src/services/lastfm/LastFmService.cpp:142
#10 0xb3d7360a in LastFmServiceFactory::init (this=0x90cf748) at /var/tmp/portage/media-sound/amarok-2.6.90/work/amarok-2.6.90/src/services/lastfm/LastFmService.cpp:73
#11 0xb70dc485 in ServicePluginManager::initFactory (this=0x922f558, factory=0x90cf748) at /var/tmp/portage/media-sound/amarok-2.6.90/work/amarok-2.6.90/src/services/ServicePluginManager.cpp:114
Comment 7 Matěj Laitl 2013-01-07 17:12:07 UTC
(In reply to comment #6)
> Created attachment 76269 [details]
> New crash information added by DrKonqi

Hi Pedro,
this bug has been already resolved, unfortunately only after 2.7 Beta was released. There is no need to re-report unless you are able to reproduce with a version already containing the commit.

Please, use a work-around from comment 4 or update to amarok-9999, it is easy now that you have added kde overlay.
Comment 8 Matěj Laitl 2013-01-16 20:46:18 UTC
*** Bug 312559 has been marked as a duplicate of this bug. ***