Bug 176870 - amarok crashes on quit when collection scan was aborted
Summary: amarok crashes on quit when collection scan was aborted
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/Local (show other bugs)
Version: 2.0-SVN
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-04 11:20 UTC by simon
Modified: 2009-12-09 11:28 UTC (History)
0 users

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 simon 2008-12-04 11:20:09 UTC
Version:           2.0-SVN (using 4.1.81 (KDE 4.1.81 (KDE 4.2 >= 20081128)), Gentoo)
Compiler:          x86_64-pc-linux-gnu-gcc
OS:                Linux (x86_64) release 2.6.26-tuxonice

aborting the scan freezes the gui up to one minute here (loop in ScanManager::stopParser()) and crashes amarok on quit 

---

amarok: BEGIN: void CompoundProgressBar::cancelAll()                                                                   
amarok: BEGIN: void ProgressBarNG::cancel()                                                                            
amarok:        cancelling operation:  "Musik wird durchsucht"                                                          
amarok: BEGIN: void CompoundProgressBar::childBarCancelled(ProgressBarNG*)                                             
amarok:          p before:  QPoint(2,-9)                                                                               
amarok:          p after:  QPoint(4,692)
amarok: BEGIN: void ProgressBarNG::setDescription(const QString&)
amarok: END__: void ProgressBarNG::setDescription(const QString&) - Took 6.5e-05s
amarok: BEGIN: void StatusBar::hideProgress()
amarok: END__: void StatusBar::hideProgress() - Took 0.0004s
amarok: END__: void CompoundProgressBar::childBarCancelled(ProgressBarNG*) - Took 0.031s
amarok: END__: void ProgressBarNG::cancel() - Took 0.032s
amarok: END__: void CompoundProgressBar::cancelAll() - Took 0.032s
amarok: BEGIN: virtual ScanManager::~ScanManager()
amarok: BEGIN: void ScanManager::stopParser()
amarok: BEGIN: virtual void XmlParseJob::requestAbort()
amarok: END__: virtual void XmlParseJob::requestAbort() - Took 3.3e-05s
amarok:        do-while done with error
amarok: BEGIN: void DatabaseUpdater::removeTemporaryTables()
amarok: END__: void DatabaseUpdater::removeTemporaryTables() - Took 0.0019s
amarok: BEGIN: virtual ScanResultProcessor::~ScanResultProcessor()
amarok: END__: virtual ScanResultProcessor::~ScanResultProcessor() - Took 0.00019s
amarok: END__: virtual void XmlParseJob::run() - Took 24s
amarok: END__: void ScanManager::stopParser() - Took 1.1s
amarok: END__: virtual ScanManager::~ScanManager() - Took 1.1s
QProcess: Destroyed while process is still running.
amarok: BEGIN: virtual XmlParseJob::~XmlParseJob()
amarok: END__: virtual XmlParseJob::~XmlParseJob() - Took 0.00022s
amarok: BEGIN: virtual App::~App()
amarok: BEGIN: virtual void SqlCollection::stopScan()
KCrash: Application 'amarok' crashing...


---

Thread 1 (Thread 0x7f360fb9b750 (LWP 10282)):
[KCrash Handler]
#5  0x00007f35f7e54fb9 in SqlCollection::stopScan (this=0x9db960) at /home/user/kde/src/amarok/src/collection/sqlcollection/SqlCollection.cpp:118
#6  0x00007f360f263f51 in CollectionManager::stopScan (this=0x9ecd80) at /home/user/kde/src/amarok/src/collection/CollectionManager.cpp:169
#7  0x00007f360f2c7350 in ~App (this=0x7fff17cf5420) at /home/user/kde/src/amarok/src/App.cpp:203
#8  0x000000000040395b in main (argc=2, argv=0x7fff17cf65f8) at /home/user/kde/src/amarok/src/main.cpp:129
Comment 1 simon 2008-12-04 11:21:24 UTC
oops forgot to set correct severity
Comment 2 simon 2009-01-14 08:23:01 UTC
still freezing (looooooooooooooong) when aborting a scan and still crashing ...
Comment 3 Mark Kretschmann 2009-01-14 16:16:48 UTC
Ok, I can confirm this with latest SVN trunk.

Debug:

amarok: BEGIN: virtual ScanResultProcessor::~ScanResultProcessor()
amarok: END__: virtual ScanResultProcessor::~ScanResultProcessor() - Took 4.1e-05s
amarok: END__: virtual void XmlParseJob::run() - Took 4.4s
amarok: END__: void ScanManager::stopParser() - Took 0.1s
amarok: END__: virtual ScanManager::~ScanManager() - Took 0.1s
QProcess: Destroyed while process is still running.
amarok: BEGIN: virtual XmlParseJob::~XmlParseJob()
amarok: END__: virtual XmlParseJob::~XmlParseJob() - Took 0.00019s
amarok: BEGIN: virtual App::~App()
amarok: BEGIN: virtual void SqlCollection::stopScan()
QSocketNotifier: Invalid socket 50 and type 'Read', disabling...
KCrash: Application 'amarok' crashing...


Backtrace:

[KCrash handler]
#6  0x00000000 in ?? ()
#7  0xb6b65d86 in CollectionManager::stopScan (this=0x8926660)
    at /home/mark/kde/src/amarok/src/collection/CollectionManager.cpp:164
#8  0xb6be317e in ~App (this=0xbfddde00)
    at /home/mark/kde/src/amarok/src/App.cpp:193
#9  0x0804c16f in main (argc=4, argv=0xbfdde304)
    at /home/mark/kde/src/amarok/src/main.cpp:130
#0  0xb7fdc430 in __kernel_vsyscall ()

Comment 4 Mark Kretschmann 2009-01-14 16:44:15 UTC
SVN commit 911001 by markey:

Fix crash on exit when collection scan has been aborted.

Crash was caused by dangling pointer. QPointer to the rescue.

BUG: 176870

 M  +3 -1      SqlCollection.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=911001
Comment 5 Dan Meltzer 2009-02-08 01:54:02 UTC
SVN commit 923010 by dmeltzer:

Backport r911001

Fix crash on exit when collection scan has been aborted.

Crash was caused by dangling pointer. QPointer to the rescue.

BUG: 176870

 M  +3 -1      SqlCollection.h  


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