Summary: | Crashed when aborting scan (0-pointer ScanManager) | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | simon |
Component: | general | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 2.1 | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
simon
2009-06-04 18:58:02 UTC
This backtrace is pretty interesting. This line clearly shows that a 0-pointer of ScanManager is being dereferenced: [KCrash Handler] #5 0x00007f36ed4147b1 in ScanManager::isDirInCollection (this=0x0, path=@0x7fff7f878200) at /home/user/kde/src/amarok/src/collection/sqlcollection/ScanManager.cpp:216 Although the report might be a dupe (I think I've seen a similar before), I would like to keep this one open because of the good backtrace. Will look into the problem. SVN commit 978819 by markey: Don't crash when starting a collection scan after a previous scan had been aborted. We destroyed the ScanManager instance when aborting the scan, and then never instantiated it again, ending up with a 0-pointer dereference. Now we reinstantiate the ScanManager automatically. This seems the safest way to fix this issue for now. I pondered refactoring the code to keep the ScanManager always alive, but this would require major changes and seemed too risky at this point. BUG: 195242 M +0 -1 ScanManager.h M +15 -9 SqlCollection.cpp M +1 -4 SqlCollection.h WebSVN link: http://websvn.kde.org/?view=rev&revision=978819 SVN commit 979107 by mitchell: Fix bug 195242 moar properly. Don't keep regen-ing new instances of the scan manager, just abort what's there. Which means stop having the parser delete its parent for some odd reason. Also a lot of pointer safety checks added. BUG: 195242 M +21 -13 ScanManager.cpp M +2 -0 ScanManager.h M +18 -15 SqlCollection.cpp M +4 -1 SqlCollection.h WebSVN link: http://websvn.kde.org/?view=rev&revision=979107 *** Bug 195110 has been marked as a duplicate of this bug. *** |