https://bugs.kde.org/show_bug.cgi?id=419852
Bug ID: 419852 Summary: Seg fault (double free or corruption) while detecting faces, 0-length JPG files Product: digikam Version: 7.0.0 Platform: Appimage OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Faces-Detection Assignee: digikam-bugs-n...@kde.org Reporter: jeff.w...@gmail.com Target Milestone: --- SUMMARY While running digiKam 7.0.0-beta2 face detection on my large, untidy collection, digiKam crashed on one particular file. I restarted digiKam, and restarted face detection, and it crashed on the same file. Some notes - probably not all relevant: - it's crashing on a 0-length file (invalid JPEG) - there is a space in the filename. - there are spaces and an apostrophe in the directory name - there are other 0-length files in the same directory which did not cause a crash. - the /share/ directory is a CIFS network mount, and the collection is a "Network Share" type Here's the directory listing: >ls -la "/share/pics/080304 Jeff's Pics/" total 0 drwxr-xr-x 2 jward jward 0 Sep 8 2012 . drwxr-xr-x 2 jward jward 0 Aug 3 2019 .. -rwxr-xr-x 1 jward jward 0 Mar 5 2008 IMG_0391_small.jpg -rwxr-xr-x 1 jward jward 0 Mar 5 2008 IMG_0406_small.jpg -rwxr-xr-x 1 jward jward 0 Mar 5 2008 IMG_0445_small.jpg -rwxr-xr-x 1 jward jward 0 Mar 5 2008 'IMG_0474_small copy.jpg' Here's digiKam's appImage stdout: Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file /share/pics/080304 Jeff's Pics/IMG_0445_small.jpg (Error # 20 : Failed to read input data Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file /share/pics/080304 Jeff's Pics/IMG_0445_small.jpg (Error # 20 : Failed to read input data unknown: Can not load " "/share/pics/080304 Jeff's Pics/IMG_0445_small.jpg" " using DImg::DImgQImageLoader! unknown: Error message from loader: "Unsupported image format" Digikam::DImg::load: "/share/pics/080304 Jeff's Pics/IMG_0445_small.jpg" : Unknown image format !!! Digikam::PreviewLoadingTask::execute: Cannot extract preview for "/share/pics/080304 Jeff's Pics/IMG_0445_small.jpg" Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file /share/pics/080304 Jeff's Pics/IMG_0474_small copy.jpg (Error # 20 : Failed to read input data Digikam::MetaEngine::Private::printExiv2ExceptionError: Cannot load metadata from file /share/pics/080304 Jeff's Pics/IMG_0474_small copy.jpg (Error # 20 : Failed to read input data unknown: Can not load " "/share/pics/080304 Jeff's Pics/IMG_0474_small copy.jpg" " using DImg::DImgQImageLoader! unknown: Error message from loader: "Unsupported image format" Digikam::DImg::load: "/share/pics/080304 Jeff's Pics/IMG_0474_small copy.jpg" : Unknown image format !!! Digikam::PreviewLoadingTask::execute: Cannot extract preview for "/share/pics/080304 Jeff's Pics/IMG_0474_small copy.jpg" double free or corruption (out) /tmp/.mount_digikaaSK5HO/AppRun: line 155: 5130 Aborted (core dumped) digikam $@ > STEPS TO REPRODUCE I tried to setup a simple test album with a directory containing empty files as above, but the issue did not reproduce. :( OBSERVED RESULT digiKam crashes while running face detection on odd files. EXPECTED RESULT digiKam should not crash due to invalid image files. SOFTWARE/OS VERSIONS Windows: n/a macOS: n/a Linux/KDE Plasma: n/a (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: 4.8.7 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.