Bug 187510 - [OS X] Crash on exit during CurrentEngine statistics query
Summary: [OS X] Crash on exit during CurrentEngine statistics query
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Context View (show other bugs)
Version: 2.3.1-GIT
Platform: unspecified All
: HI crash
Target Milestone: 2.4.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-18 13:59 UTC by Leo Franchi
Modified: 2011-07-15 08:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leo Franchi 2009-03-18 13:59:46 UTC
Version:           2.1-SVN (using KDE 4.2.0)
OS:                OS X
Installed from:    Unspecified

on osx,with my large collection (28000 songs), it takes about 4-5 seconds for the "last played" etc info to load in the current applet, after i press stop.

if i quit amarok during this time, it crashes. log and bt below:

amarok: BEGIN: virtual void MainWindow::closeEvent(QCloseEvent*) 
amarok: END__: virtual void MainWindow::closeEvent(QCloseEvent*) - Took 0.027s 
amarok: BEGIN: virtual App::~App() 
amarok: BEGIN: virtual void SqlCollection::stopScan() 
amarok: BEGIN: virtual ScanManager::~ScanManager() 
amarok: BEGIN: void ScanManager::stopParser() 
amarok: END__: void ScanManager::stopParser() - Took 3.7e-05s 
amarok: END__: virtual ScanManager::~ScanManager() - Took 0.00011s 
amarok: END__: virtual void SqlCollection::stopScan() - Took 0.00032s 
amarok: BEGIN: virtual ScriptManager::~ScriptManager() 
amarok: BEGIN: void ScriptManager::slotStopScript(QString) 
amarok: BEGIN: void ServiceBrowser::removeService(const QString&) 
amarok:          removing service:  "Cool Streams" 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 0.00018s 
amarok: END__: void ServiceBrowser::removeService(const QString&) - Took 0.0014s 
amarok: BEGIN: void ScriptManager::scriptFinished(QString) 
amarok: BEGIN: virtual ScriptableServiceScript::~ScriptableServiceScript() 
amarok: END__: virtual ScriptableServiceScript::~ScriptableServiceScript() - Took 4e-05s 
amarok: END__: void ScriptManager::scriptFinished(QString) - Took 0.0006s 
amarok: END__: void ScriptManager::slotStopScript(QString) - Took 0.0022s 
amarok: BEGIN: void ScriptManager::slotStopScript(QString) 
amarok: BEGIN: void ServiceBrowser::removeService(const QString&) 
amarok:          removing service:  "Librivox.org" 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 4e-05s 
amarok: END__: void ServiceBrowser::removeService(const QString&) - Took 0.00052s 
amarok: BEGIN: void ScriptManager::scriptFinished(QString) 
amarok: BEGIN: virtual ScriptableServiceScript::~ScriptableServiceScript() 
amarok: END__: virtual ScriptableServiceScript::~ScriptableServiceScript() - Took 3.8e-05s 
amarok: END__: void ScriptManager::scriptFinished(QString) - Took 0.019s 
amarok: END__: void ScriptManager::slotStopScript(QString) - Took 0.02s 
amarok: BEGIN: void ScriptManager::slotStopScript(QString) 
amarok: BEGIN: void ScriptManager::scriptFinished(QString) 
amarok: BEGIN: virtual ScriptableServiceScript::~ScriptableServiceScript() 
amarok: END__: virtual ScriptableServiceScript::~ScriptableServiceScript() - Took 3.7e-05s 
amarok: END__: void ScriptManager::scriptFinished(QString) - Took 0.0058s 
amarok: END__: void ScriptManager::slotStopScript(QString) - Took 0.0061s 
amarok: BEGIN: void ScriptManager::slotStopScript(QString) 
amarok: BEGIN: void ServiceBrowser::removeService(const QString&) 
amarok:          removing service:  "Seeqpod.com" 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 0.00017s 
amarok: END__: void ServiceBrowser::removeService(const QString&) - Took 0.0015s 
amarok: BEGIN: void ScriptManager::scriptFinished(QString) 
amarok: BEGIN: virtual ScriptableServiceScript::~ScriptableServiceScript() 
amarok: END__: virtual ScriptableServiceScript::~ScriptableServiceScript() - Took 4.5e-05s 
amarok: END__: void ScriptManager::scriptFinished(QString) - Took 0.019s 
amarok: END__: void ScriptManager::slotStopScript(QString) - Took 0.021s 
amarok: END__: virtual ScriptManager::~ScriptManager() - Took 0.15s 
amarok: BEGIN: virtual OSDWidget::~OSDWidget() 
amarok: END__: virtual OSDWidget::~OSDWidget() - Took 7.8e-05s 
amarok: BEGIN: void SideBar::deleteBrowsers() 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: BEGIN: virtual CollectionTreeItemModel::~CollectionTreeItemModel() 
amarok: END__: virtual CollectionTreeItemModel::~CollectionTreeItemModel() - Took 0.00026s 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 0.0006s 
amarok: BEGIN: virtual ServiceBrowser::~ServiceBrowser() 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 0.00013s 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 4.1e-05s 
amarok: BEGIN: virtual LastFmService::~LastFmService() 
amarok: END__: virtual LastFmService::~LastFmService() - Took 0.0044s 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 0.00017s 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 0.00034s 
amarok: BEGIN: virtual CollectionTreeView::~CollectionTreeView() 
amarok: END__: virtual CollectionTreeView::~CollectionTreeView() - Took 0.00011s 
amarok: END__: virtual ServiceBrowser::~ServiceBrowser() - Took 0.015s 
amarok: BEGIN: virtual ScriptableServiceManager::~ScriptableServiceManager() 
amarok: END__: virtual ScriptableServiceManager::~ScriptableServiceManager() - Took 4.7e-05s 
amarok: BEGIN: virtual FileBrowser::Widget::~Widget() 
amarok: BEGIN: void FileBrowser::Widget::writeConfig() 
amarok: END__: void FileBrowser::Widget::writeConfig() - Took 0.00046s 
amarok: END__: virtual FileBrowser::Widget::~Widget() - Took 0.00057s 
amarok: BEGIN: virtual MyDirLister::~MyDirLister() 
amarok: END__: virtual MyDirLister::~MyDirLister() - Took 4.7e-05s 
amarok: END__: void SideBar::deleteBrowsers() - Took 0.042s 
amarok: BEGIN: virtual MainWindow::~MainWindow() 
amarok: BEGIN: virtual PlaylistFileProvider::~PlaylistFileProvider() 
amarok:        0  Playlists loaded 
amarok: END__: virtual PlaylistFileProvider::~PlaylistFileProvider() - Took 0.0033s 
amarok: BEGIN: virtual Context::ContextView::~ContextView() 
amarok:        Unloading plasma engine:  "amarok-lyrics" 
amarok: BEGIN: virtual ContextObserver::~ContextObserver() 
amarok: BEGIN: void ContextSubject::detach(ContextObserver*) 
amarok: END__: void ContextSubject::detach(ContextObserver*) - Took 0.00012s 
amarok: END__: virtual ContextObserver::~ContextObserver() - Took 0.0003s 
amarok:        Unloading plasma engine:  "amarok-service" 
amarok:        Unloading plasma engine:  "amarok-wikipedia" 
amarok: BEGIN: virtual WikipediaEngine::~WikipediaEngine() 
amarok: END__: virtual WikipediaEngine::~WikipediaEngine() - Took 4.4e-05s 
amarok: BEGIN: virtual ContextObserver::~ContextObserver() 
amarok: BEGIN: void ContextSubject::detach(ContextObserver*) 
amarok: END__: void ContextSubject::detach(ContextObserver*) - Took 4.2e-05s 
amarok: END__: virtual ContextObserver::~ContextObserver() - Took 0.00011s 
amarok:        Unloading plasma engine:  "amarok-current" 
amarok: BEGIN: virtual CurrentEngine::~CurrentEngine() 
amarok: END__: virtual CurrentEngine::~CurrentEngine() - Took 8e-05s 
amarok: BEGIN: virtual ContextObserver::~ContextObserver() 
amarok: BEGIN: void ContextSubject::detach(ContextObserver*) 
amarok: END__: void ContextSubject::detach(ContextObserver*) - Took 3.7e-05s 
amarok: END__: virtual ContextObserver::~ContextObserver() - Took 0.0001s 
amarok: BEGIN: void Context::ContextView::clear(const Context::ContextState&) 
amarok(66604) Context::ContextView::clear: "        " Line:  126
amarok: BEGIN: virtual void Context::VerticalAppletLayout::saveToConfig(KConfigGroup&) 
amarok:            saving applet "Current Track" 
amarok:            saving applet "Lyrics" 
amarok:            saving applet "Wikipedia" 
amarok: END__: virtual void Context::VerticalAppletLayout::saveToConfig(KConfigGroup&) - Took 0.00052s 
amarok: BEGIN: virtual QSizeF LyricsApplet::sizeHint(Qt::SizeHint, const QSizeF&) const 
amarok: END__: virtual QSizeF LyricsApplet::sizeHint(Qt::SizeHint, const QSizeF&) const - Took 4.4e-05s 
amarok: END__: void Context::ContextView::clear(const Context::ContextState&) - Took 0.015s 
amarok: END__: virtual Context::ContextView::~ContextView() - Took 0.017s 
amarok: BEGIN: virtual ContextSubject::~ContextSubject() 
amarok: END__: virtual ContextSubject::~ContextSubject() - Took 3.8e-05s 
amarok: BEGIN: virtual Context::ContextScene::~ContextScene() 
amarok: END__: virtual Context::ContextScene::~ContextScene() - Took 4.2e-05s 
amarok: BEGIN: virtual Context::Containment::~Containment() 
amarok: END__: virtual Context::Containment::~Containment() - Took 3.9e-05s 
amarok: BEGIN: virtual Amarok::Splitter::~Splitter() 
amarok: END__: virtual Amarok::Splitter::~Splitter() - Took 4.5e-05s 
amarok: BEGIN: virtual SideBar::~SideBar() 
amarok: END__: virtual SideBar::~SideBar() - Took 0.0003s 
amarok: BEGIN: virtual SideBarWidget::~SideBarWidget() 
amarok: END__: virtual SideBarWidget::~SideBarWidget() - Took 0.0042s 
amarok: BEGIN: virtual StatusBar::~StatusBar() 
amarok: BEGIN: virtual CompoundProgressBar::~CompoundProgressBar() 
amarok: BEGIN: virtual PopupWidget::~PopupWidget() 
amarok: END__: virtual PopupWidget::~PopupWidget() - Took 0.0001s 
amarok: END__: virtual CompoundProgressBar::~CompoundProgressBar() - Took 0.00044s 
amarok: END__: virtual StatusBar::~StatusBar() - Took 0.001s 
amarok: BEGIN: virtual MainToolbar::~MainToolbar() 
amarok: END__: virtual MainToolbar::~MainToolbar() - Took 4.4e-05s 
amarok: BEGIN: virtual SvgHandler::~SvgHandler() 
amarok: END__: virtual SvgHandler::~SvgHandler() - Took 0.67s 
amarok: BEGIN: virtual PaletteHandler::~PaletteHandler() 
amarok: END__: virtual PaletteHandler::~PaletteHandler() - Took 4e-05s 
amarok: END__: virtual MainWindow::~MainWindow() - Took 0.74s 
amarok: BEGIN: virtual CollectionManager::~CollectionManager() 
amarok: BEGIN: virtual MySqlEmbeddedCollection::~MySqlEmbeddedCollection() 
amarok: END__: virtual MySqlEmbeddedCollection::~MySqlEmbeddedCollection() - Took 0.00026s 
QMutex: cv destroy failure: Resource busy
QMutex: mutex destroy failure: Resource busy
amarok: END__: virtual CollectionManager::~CollectionManager() - Took 0.0057s 
amarok: BEGIN: virtual MountPointManager::~MountPointManager() 

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x30d1d9e2
[Switching to process 66604 thread 0xa907]
0x1e531a23 in evaluate_join_record ()
(gdb) bt                
#0  0x1e531a23 in evaluate_join_record ()
#1  0x1e537035 in sub_select ()
#2  0x1e531b74 in evaluate_join_record ()
#3  0x1e537035 in sub_select ()
#4  0x1e531b74 in evaluate_join_record ()
#5  0x1e537035 in sub_select ()
#6  0x1e531b74 in evaluate_join_record ()
#7  0x1e537035 in sub_select ()
#8  0x1e531b74 in evaluate_join_record ()
#9  0x1e537035 in sub_select ()
#10 0x1e531b74 in evaluate_join_record ()
#11 0x1e537035 in sub_select ()
#12 0x1e531b74 in evaluate_join_record ()
#13 0x1e537092 in sub_select ()
#14 0x1e53f5dc in do_select ()
#15 0x1e54b1f8 in JOIN::exec ()
#16 0x1e54d327 in mysql_select ()
#17 0x1e54d962 in handle_select ()
#18 0x1e50d08c in execute_sqlcom_select ()
#19 0x1e50e20a in mysql_execute_command ()
#20 0x1e513ef4 in mysql_parse ()
#21 0x1e515510 in dispatch_command ()
#22 0x1e47c6a3 in emb_advanced_command ()
#23 0x1e3a92e5 in mysql_send_query ()
#24 0x1e3a9360 in mysql_real_query ()
#25 0x1e480705 in mysql_query ()
b#26 0x1e21e7ff in MySqlEmbeddedCollection::query (this=0x1b8af5a0, statement=@0xb01bedfc) at /Users/leofranchi/kde/amarok/src/collection/sqlcollection/MySqlEmbeddedCollection.cpp:197
^R
#27 0x1e1f7a84 in SqlQueryMaker::runQuery (this=0x208a1490, query=@0xb01bedfc) at /Users/leofranchi/kde/amarok/src/collection/sqlcollection/SqlQueryMaker.cpp:664
#28 0x1e2011c1 in SqlWorkerThread::run (this=0x2fb53b80) at /Users/leofranchi/kde/amarok/src/collection/sqlcollection/SqlQueryMaker.cpp:55
#29 0x000f704c in ThreadWeaver::JobRunHelper::runTheJob ()
#30 0x000f75df in ThreadWeaver::Job::execute ()
#31 0x000f60f2 in ThreadWeaver::ThreadRunHelper::run ()
#32 0x000f66b4 in ThreadWeaver::Thread::run ()
#33 0x019a3e7b in QThreadPrivate::start ()
#34 0x9725b095 in _pthread_start ()
#35 0x9725af52 in thread_start ()
Comment 1 Leo Franchi 2009-03-18 18:19:56 UTC
SVN commit 941003 by lfranchi:

abort queries on destruction. supposed to fix the crash i'm working on, but doesn't. still good practice to clean up in destruction.

CCBUG: 187510

 M  +9 -0      CurrentEngine.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=941003
Comment 2 Myriam Schweingruber 2009-08-02 15:10:11 UTC
Any news on this?
Comment 3 Myriam Schweingruber 2009-08-09 14:57:40 UTC
Leo, did you continue to work on this?
Comment 4 Myriam Schweingruber 2009-08-18 14:28:53 UTC
Adapted title...
Comment 5 Myriam Schweingruber 2009-09-05 11:28:33 UTC
I can't reproduce this with current Amarok 2.2-git. Leo, it says all platforms, but isn't this OS X specific?
Comment 6 Leo Franchi 2009-09-05 15:46:43 UTC
i just reproduced on linux a week or so ago. basically I have to quit amarok in the last 1s or so before the query finishes. I have a large collection (38000 tracks) so the query is sorta slow, total time might be 3-5 seconds. if I quit in the last 1 or so of those, amarok crashes in mysqle code.
Comment 7 Myriam Schweingruber 2009-10-14 10:19:15 UTC
Any news on this?
Comment 8 Myriam Schweingruber 2009-11-04 00:34:59 UTC
Changing target
Comment 9 Myriam Schweingruber 2009-11-16 13:54:59 UTC
Leo, is this still valid? I can't reproduce this here, Amarok 2.2-git Qt 4.5.2, KDE 4.3.3
Comment 10 Myriam Schweingruber 2009-11-28 20:04:08 UTC
Leo, any change to get this done for 2.2.2?
Comment 11 Mark Kretschmann 2009-12-26 08:05:27 UTC
This could probably be fixed with a loop, checking for Job::isFinished(), and sleeping 100ms for each iteration.

I could do that, but I couldn't test it (my collection is too small to trigger this bug). And really, why do I have to do all this shit :)
Comment 12 Myriam Schweingruber 2010-01-06 20:45:22 UTC
Adding keyword.
Comment 13 Myriam Schweingruber 2010-05-22 12:27:00 UTC
Changing target.
Comment 14 Rick W. Chen 2010-12-15 03:34:33 UTC
is this stil valid??
Comment 15 Myriam Schweingruber 2011-06-04 11:47:48 UTC
This is an automated message from the triager:

Amarok 2.4.1 has been released on May 8 already. Could you please upgrade and test if you can still reproduce this bug?

Without feedback within a month we will close this bug as resolved.

Thank you for your understanding.
Comment 16 Myriam Schweingruber 2011-07-15 08:55:10 UTC
Closing for lack of feedback. Feel free to reopen if you can still reproduce this with Amarok 2.4.2 beta 1 or later and provide the necessary feedback.

Assuming this is fixed.