Bug 450361 - digikam crashes when running recognize faces with "CFRelease() called with NULL"
Summary: digikam crashes when running recognize faces with "CFRelease() called with NULL"
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-MainView (show other bugs)
Version: 7.6.0
Platform: macOS (DMG) macOS
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-16 07:07 UTC by James Tuttle
Modified: 2023-04-19 14:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.1.0
Sentry Crash Report:


Attachments
Stack trace from MacOS crash reporter (5.28 KB, text/plain)
2022-02-16 07:07 UTC, James Tuttle
Details
Additional stack trace (198.48 KB, text/plain)
2022-02-16 07:09 UTC, James Tuttle
Details
One more stack trace (183.74 KB, text/plain)
2022-02-16 07:10 UTC, James Tuttle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Tuttle 2022-02-16 07:07:54 UTC
Created attachment 146799 [details]
Stack trace from MacOS crash reporter

SUMMARY
Digikam 7.6.0 seems to frequently crash when using the Albums UI while "Updating faces database" is in-progress.


STEPS TO REPRODUCE
1. Launch Digikam 7.6.0 with a large photo library (mine has around 40,000 images)
2. Click on the "People" tab in the L side bar, then "Workflow", and begin "Detect Faces" or "Recognize Faces"
3. Click around in the UI repeatedly, selecting and unselecting images, etc., while the faces database update is in-progress in background

OBSERVED RESULT
Digikam crashes with EXC_BAD_INSTRUCTION (SIGILL) on Thread 0, CFRelease() called with NULL
See attached stack traces for further information. (If helpful, I can re-run using a version with debug symbols.)

EXPECTED RESULT
No crash, normal operation

SOFTWARE/OS VERSIONS
macOS: 10.13.6 (High Sierra), 32GB RAM

ADDITIONAL INFORMATION
Not sure if this is a problem with the Albums-MainView component or with the Faces-Engine, but since the stack trace is on Thread 0 and mentions "Digikam::ContextMenuHelper::addOpenAndNavigateActions" it seems like maybe it's coming from the UI...?
Comment 1 James Tuttle 2022-02-16 07:09:03 UTC
Created attachment 146800 [details]
Additional stack trace

Added additional stack trace (same issue)
Comment 2 James Tuttle 2022-02-16 07:10:59 UTC
Created attachment 146801 [details]
One more stack trace

For completeness, here is one more stack trace obtained when replicating the behavior.
Comment 3 Maik Qualmann 2022-02-16 07:31:24 UTC
Git commit 667f2ff7bdb1992f4b2c98149eb6993d2c81bb91 by Maik Qualmann.
Committed on 16/02/2022 at 07:30.
Pushed by mqualmann into branch 'qt5-maintenance'.

this should fix the crash with CFRelease()

M  +2    -1    core/libs/threadimageio/engine/dservicemenu_mac.mm

https://invent.kde.org/graphics/digikam/commit/667f2ff7bdb1992f4b2c98149eb6993d2c81bb91
Comment 4 Maik Qualmann 2022-02-16 07:37:13 UTC
Git commit 22ce933bcfa929af25344ee78fbc02e86e0b9630 by Maik Qualmann.
Committed on 16/02/2022 at 07:36.
Pushed by mqualmann into branch 'master'.

this should fix the crash with CFRelease()
Backport commit

M  +2    -1    core/libs/threadimageio/engine/dservicemenu_mac.mm

https://invent.kde.org/graphics/digikam/commit/22ce933bcfa929af25344ee78fbc02e86e0b9630
Comment 5 James Tuttle 2022-02-17 21:53:17 UTC
For future reference, there is an easier way to reproduce this behavior in 7.6.0... right-clicking to bring up the context menu on any DNG (or raw file?) causes an immediate crash with a similar stack trace.

It will happen in Thumbnail mode if a multiple selection contains one or more DNGs.
Comment 6 Maik Qualmann 2022-02-17 21:57:44 UTC
I think the problem will be fixed with the next MacOS bundle. It crashes in the new Open with... menu, so for a file for which there is no MacOS standard app, it should trigger the crash.

Maik
Comment 7 Maik Qualmann 2022-03-05 20:11:56 UTC
New MacOS version is available, is the problem still reproducible? 

https://files.kde.org/digikam/

Maik
Comment 8 caulier.gilles 2023-04-19 14:31:45 UTC
I cannot reproduce the problem here with my macbook pro and digiKam 8.1.0 pre-release. I close this file now.

Gilles Caulier