SUMMARY when I click on "scan for faces" when digikam starts, it crashes after several seconds with this log: STEPS TO REPRODUCE 1. aFAsaEzQqM found a way to reproduce the crash, see https://discuss.kde.org/t/digikam-crashes-when-starting-to-scan-faces-with-qt6-error/43970/2?u=peta 2. "I just now created a new screenshot with the dimensions 1273:23 pixels and put that in a new empty album. Trying to view that album or scanning its faces also caused the same crash." OBSERVED RESULT ASSERT failure in constexpr QtPrivate::QCheckedIntegers::QCheckedInt<int> QtPrivate::QCheckedIntegers::operator-(QCheckedInt<int>, QCheckedInt<int>): "Overflow in operator-", file /usr/include/qt6/QtCore/qcheckedint_impl.h, line 69 [1] 6076 IOT instruction (core dumped) digikam EXPECTED RESULT well, should not crash :-D SOFTWARE/OS VERSIONS Linux/KDE Plasma: Manjaro Linux x86_64 KDE Plasma Version: 6.5.5 KDE Frameworks Version: 6.23.0 Qt Version: 6.10.2 ADDITIONAL INFORMATION britiger suggested a fix: diff --git a/core/utilities/facemanagement/pipelines/detectrecognize/facepipelinedetectrecognize.cpp b/core/utilities/facemanagement/pipelines/detectrecognize/facepipelinedetectrecognize.cpp index 43d6ba65d1..3d54c14f1b 100644 --- a/core/utilities/facemanagement/pipelines/detectrecognize/facepipelinedetectrecognize.cpp +++ b/core/utilities/facemanagement/pipelines/detectrecognize/facepipelinedetectrecognize.cpp @@ -415,6 +415,10 @@ bool FacePipelineDetectRecognize::extractor() int width = static_cast<int>(detectionResults.at<float>(i, 2)); int height = static_cast<int>(detectionResults.at<float>(i, 3)); + if(qMin(X, Y) == std::numeric_limits<int>::min() || qMin(width, height) == std::numeric_limits<int>::min()) { + qCWarning(DIGIKAM_FACESENGINE_LOG) << "Invalid detectionResults rect (INT_MIN) for image" << package->info.filePath(); + continue; + } // Add the rect to result list. faceFRects << QRectF(qreal(X) / qreal(cvUResizedImage.cols), see https://discuss.kde.org/t/digikam-crashes-when-starting-to-scan-faces-with-qt6-error/43970/4?u=peta
Git commit 00d2dfc31eb90c392e11d77d1d35c91dff4df3e8 by Gilles Caulier. Committed on 21/03/2026 at 12:10. Pushed by cgilles into branch 'master'. Add patch to prevent crash overflow in face pipeline when values returned by OpenCV raise INT_MIN limit. FIXED-IN: 9.1.0 M +20 -0 core/utilities/facemanagement/pipelines/detectrecognize/facepipelinedetectrecognize.cpp https://invent.kde.org/graphics/digikam/-/commit/00d2dfc31eb90c392e11d77d1d35c91dff4df3e8