Bug 416289

Summary: 7.0.0-beta2 crash when closing Geolocation Editor
Product: [Applications] digikam Reporter: hmueller <kde>
Component: Geolocation-BookmarksAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 7.0.0   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed/Implemented In: 7.0.0
Sentry Crash Report:
Attachments: Crash report
Crash report 16.01.2020

Description hmueller 2020-01-15 12:08:21 UTC
Created attachment 125146 [details]
Crash report

This bug was introduced after digiKam-7.0.0-beta2-20200104T124857-MacOS-x86-64.
Seen since digiKam-7.0.0-beta2-20200112T104105-MacOS-x86-64 as well as in lastest build digiKam-7.0.0-beta2-20200115T070550-MacOS-x86-64.
digiKam crahes when closing the Geolocation Editor (no whether what was done in this dialog).
Comment 1 hmueller 2020-01-15 12:20:52 UTC
I havn't seen this crash on Win10 with latest build, so it might be Mac specific.
Comment 2 caulier.gilles 2020-01-15 12:39:48 UTC
If i remeber, Maik has touch something in BookmarkManager while Christmas holidays, but i don't remember what exactly...

MacOs is more sensible than Linux and Windows as i can see.

Gilles Caulier
Comment 3 Maik Qualmann 2020-01-15 13:23:51 UTC
We delete the bookmark nodes to prevent a memory leak. It is possible that we delete them too early because the view model accesses them again. A QSharedPointer is not really possible because the bookmark nodes are automatically deleted when the pointer is deleted. I'll watch it tonight.

Maik
Comment 4 Maik Qualmann 2020-01-15 21:48:14 UTC
Git commit 537345be7223394c47c7b41629b2997f706e3bd3 by Maik Qualmann.
Committed on 15/01/2020 at 21:47.
Pushed by mqualmann into branch 'master'.

try to fix crash under OSX

M  +0    -1    core/dplugins/generic/metadata/geolocationedit/dialog/geolocationedit.cpp
M  +2    -1    core/utilities/geolocation/geoiface/bookmark/gpsbookmarkowner.cpp

https://invent.kde.org/kde/digikam/commit/537345be7223394c47c7b41629b2997f706e3bd3
Comment 5 hmueller 2020-01-16 12:19:23 UTC
Created attachment 125167 [details]
Crash report 16.01.2020
Comment 6 hmueller 2020-01-16 12:22:05 UTC
Comment on attachment 125167 [details]
Crash report 16.01.2020

Tried the new nightly build digiKam-7.0.0-beta2-20200116T073708-MacOS-x86-64. No success. Sorry.
Comment 7 Maik Qualmann 2020-01-16 12:26:21 UTC
Thanks, the backtrace is good, next try tonight.

Maik
Comment 8 Maik Qualmann 2020-01-16 22:07:02 UTC
Git commit 21ac95e61167bcf705b46ba6f926e184f69608ae by Maik Qualmann.
Committed on 16/01/2020 at 22:05.
Pushed by mqualmann into branch 'master'.

fix delete order from the bookmark nodes
FIXED-IN: 7.0.0

M  +2    -2    NEWS
M  +4    -3    core/utilities/geolocation/geoiface/bookmark/bookmarknode.cpp

https://invent.kde.org/kde/digikam/commit/21ac95e61167bcf705b46ba6f926e184f69608ae
Comment 9 Maik Qualmann 2020-01-16 22:08:56 UTC
This crash was not specific to OSX and could also be reproduced under Linux, depending on the tree structure of the bookmarks.

Maik
Comment 10 hmueller 2020-01-17 08:15:20 UTC
Unfortunately there was no new build tonight at https://files.kde.org/digikam/
So I can not test it right away.
Comment 11 caulier.gilles 2020-01-17 08:27:44 UTC
Wait a little bit, compilation is under progress. It must be published in one hour

Gilles Caulier
Comment 12 hmueller 2020-01-17 09:21:55 UTC
Perfect, the patch works. No crash any more. Thanks for this very quick solution!
Comment 13 caulier.gilles 2020-01-17 09:47:56 UTC
Thanks for the feedback. Great to see the problem solved under MacOS