Bug 272824 - Amarok 2.4.1 Crashes at start [@ Plugins::PluginManager::init() line 93 ]
Summary: Amarok 2.4.1 Crashes at start [@ Plugins::PluginManager::init() line 93 ]
Status: RESOLVED NOT A BUG
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.4.1
Platform: Compiled Sources Linux
: HI crash
Target Milestone: 2.4.2
Assignee: Amarok Developers
URL:
Keywords:
: 273392 274391 275198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-09 01:16 UTC by Leonardo
Modified: 2012-09-14 10:03 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
enable mysql server if mysqle is not available (2.27 KB, patch)
2011-06-13 14:07 UTC, Cédric Cabessa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo 2011-05-09 01:16:43 UTC
Application: amarok (2.4.1)
KDE Platform Version: 4.6.3 (4.6.3) (Compiled from sources)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-gentoo i686
Distribution: "Gentoo Base System release 1.12.14"

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

- Unusual behavior I noticed:
Current line at amarok-2.4.1/src/PluginManager.cpp:93
m_mountPointManager = static_cast<Collections::SqlCollection*>( coll )->mountPointManager();
I noticed that coll is null. Previous line is:
Collections::Collection *coll = CollectionManager::instance()->primaryCollection();
Turns out that primaryCollection() really is null, but I have no information on why it is null.
I have compiled amarok without embedded mysql.

- Custom settings of the application:

The crash can be reproduced every time.

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

Thread 2 (Thread 0xad139b70 (LWP 32555)):
#0  0xb53c8f8b in pthread_mutex_lock () from /lib/libpthread.so.0
#1  0xb57e1b66 in pthread_mutex_lock () from /lib/libc.so.6
#2  0xb385f2d9 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#3  0xb385f864 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0xb385fded in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0xb5addf81 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#6  0xb5ab0bdf in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#7  0xb5ab1005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#8  0xb59bc4d3 in QThread::exec() () from /usr/lib/qt4/libQtCore.so.4
#9  0xb5a9131c in ?? () from /usr/lib/qt4/libQtCore.so.4
#10 0xb59bf433 in ?? () from /usr/lib/qt4/libQtCore.so.4
#11 0xb53c69ae in start_thread () from /lib/libpthread.so.0
#12 0xb57d49de in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb0018720 (LWP 32554)):
[KCrash Handler]
#7  0xb6f3c741 in Plugins::PluginManager::init (this=0x8efb8e0) at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/PluginManager.cpp:93
#8  0xb6f3bedb in Plugins::PluginManager::PluginManager (this=0x8efb8e0, parent=0x0) at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/PluginManager.cpp:62
#9  0xb6f3ba95 in Plugins::PluginManager::instance () at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/PluginManager.cpp:41
#10 0xb6b6cb2a in The::pluginManager () at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/PluginManager.h:76
#11 0xb6f1a04b in MainWindow::MainWindow (this=0x8ea10f8) at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/MainWindow.cpp:149
#12 0xb6efb947 in App::continueInit (this=0xbfba9420) at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/App.cpp:612
#13 0xb6ef82f5 in App::App (this=0xbfba9420) at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/App.cpp:208
#14 0x08054cfa in main (argc=1, argv=0xbfba9e54) at /var/tmp/portage/media-sound/amarok-2.4.1/work/amarok-2.4.1/src/main.cpp:286

Possible duplicates by query: bug 269394, bug 269070.

Reported using DrKonqi
Comment 1 Leonardo 2011-05-09 03:05:41 UTC
If i compile using embedded mysql, it works, but I still thinks this worth a look.
Comment 2 Myriam Schweingruber 2011-05-10 03:24:45 UTC
It's the same problem as bug 269070, a leftover configuration in the configuration files of Amarok. Changing priority.
Comment 3 Leonardo 2011-05-10 04:44:28 UTC
I checked that other bug and I can assure you I removed any and every file that had amarok in my system, even the ones mentioned in that bug, thats why I created a new one. Well, you know better, but I am curious why compiling with embedded mysql solved the problem...
Comment 4 Myriam Schweingruber 2011-05-10 13:28:19 UTC
As you can see I didn't close the bug but confirmed it and raised its priority :)
Comment 5 Myriam Schweingruber 2011-05-16 09:09:03 UTC
*** Bug 273392 has been marked as a duplicate of this bug. ***
Comment 6 Myriam Schweingruber 2011-05-29 11:31:46 UTC
*** Bug 274391 has been marked as a duplicate of this bug. ***
Comment 7 Hamed Masafi 2011-06-03 07:25:48 UTC
This fixed for me by recompiletion from source code
Comment 8 Kevin Funk 2011-06-08 22:41:25 UTC
*** Bug 275198 has been marked as a duplicate of this bug. ***
Comment 9 José Carllos 2011-06-09 10:00:08 UTC
May be it can help you. I have an usb disk, where is part of my music files. But not always this disk is mounted. May be, when amarok crash, this disk is not mounted.
Comment 10 Cédric Cabessa 2011-06-13 11:28:42 UTC
Same problem on Gentoo linux, amarok compiled without mysql embedded.

I tried with a new environment (no ~/.kde4), it do not work.

A workaround is to create a dummy sql configuration in ~/.kde4/share/config/amarokrc

"""
[MySQL]
UseServer=true
Database=amarok
Host=localhost
Password=mypassword
User=amarokuser
"""

Then amarok is launched correctly.

gentoo bug:
http://bugs.gentoo.org/365969
Comment 11 Grigore Moldovan 2011-06-13 12:07:41 UTC
Following Cédric Cabessa's comment, I've managed to get Amarok up and running again in debian testing by commenting out the MySQL section in ~/.kde/share/config/amarokrc

Enabling 'Use external MySQL database' in settings crashes Amarok again.

FYI: debian testing now runs Amarok version 2.4.1 using KDE 4.6.3
Comment 12 Cédric Cabessa 2011-06-13 14:07:45 UTC
Created attachment 60961 [details]
enable mysql server if mysqle is not available

Here is an attempt to fix this bug.

The idea is to enable mysql server if mysqle is not available, even if there is no "useServer" in config file (which the case on the first run).
Comment 13 Myriam Schweingruber 2012-04-25 23:38:29 UTC
Is this still valid with Amarok 2.5? If yes, does that patch still apply? If yes, please submit it to http://reviewboard.kde.org
Comment 14 Myriam Schweingruber 2012-09-14 10:03:58 UTC
Closing for lack of feedback, please feel free to reopen this report if you can still reproduce it with Amarok 2.6.0 or later.
Cedric: if this still happens and your patch still applies then please submit this to http://reviewboard.kde.org