Bug 411927 - Crash during initial scan
Summary: Crash during initial scan
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Scan (show other bugs)
Version: 6.3.0
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-15 00:33 UTC by MarcP
Modified: 2020-08-10 10:18 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.4.0


Attachments
Backtrace of the crash (459.34 KB, text/plain)
2019-09-15 00:33 UTC, MarcP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MarcP 2019-09-15 00:33:47 UTC
Created attachment 122661 [details]
Backtrace of the crash

SUMMARY

Today digikam crashed twice while scanning for new pictures in the collection. The second time I was able to run it in debug mode and capture the backtrace. I have attached the console output to this bug report. I hope it is useful.

I am using digikam-6.4.0-git-20190911T052139-x86-64.appimage under Ubuntu 18.04.
Comment 1 caulier.gilles 2019-09-15 04:54:11 UTC
You trying 6.4.0, not 6.3.0 as annoted in this bug report. Can you check really with 6.3.0 appimage to see if problem is reproducible ?

Gilles Caulier
Comment 2 Maik Qualmann 2019-09-15 05:02:45 UTC
The problem is clear, I can fix it. An SQL query is aborted because of too long a wait and the QList is then empty. The main problem is that 8 core is used and it takes more than 500ms to scan one item. Therefore the database runs into timeout. My suggestions would be MySQL or we might limit to 2 cores on SQLite.

Maik
Comment 3 Maik Qualmann 2019-09-15 05:46:56 UTC
Git commit 91af8f402e9c63c6096e431fd7fa3cfb23912ad3 by Maik Qualmann.
Committed on 15/09/2019 at 05:44.
Pushed by mqualmann into branch 'master'.

check the return value of the SQL query
FIXED-IN: 6.4.0

M  +2    -1    NEWS
M  +16   -10   core/libs/database/coredb/coredb.cpp
M  +2    -1    core/libs/database/coredb/coredb.h

https://invent.kde.org/kde/digikam/commit/91af8f402e9c63c6096e431fd7fa3cfb23912ad3
Comment 4 Maik Qualmann 2019-09-15 06:07:38 UTC
Git commit 0ca8479b9b9ff100c30e6a7f98c17c59befe7372 by Maik Qualmann.
Committed on 15/09/2019 at 06:06.
Pushed by mqualmann into branch 'master'.

this function has a low priority,
check if there is a running transaction

M  +5    -0    core/libs/database/coredb/coredb.cpp
M  +1    -1    core/libs/database/coredb/coredb.h

https://invent.kde.org/kde/digikam/commit/0ca8479b9b9ff100c30e6a7f98c17c59befe7372
Comment 5 Maik Qualmann 2019-09-15 06:48:13 UTC
Git commit e6e76cf0cf8b34f028511958070f98f457eef81a by Maik Qualmann.
Committed on 15/09/2019 at 06:47.
Pushed by mqualmann into branch 'master'.

less locked database during the initial scan
Related: bug 389652, bug 389949
FIXED-IN: 6.4.0

M  +3    -1    NEWS
M  +8    -4    core/libs/database/collection/collectionscanner_scan.cpp

https://invent.kde.org/kde/digikam/commit/e6e76cf0cf8b34f028511958070f98f457eef81a
Comment 6 MarcP 2019-09-15 12:22:47 UTC
Glad you could fix it.

Gilles, sadly, the following time I started digikam, it finished the initial scan successfully (it continued where it left it), so I could not reproduce it anymore. I would need to wait until another batch of new pictures are added to the library and digikam scans them.

In any case, I'll keep an eye in case it happens again and report back if necessary.
Comment 7 Maik Qualmann 2019-09-29 19:16:57 UTC
*** Bug 412453 has been marked as a duplicate of this bug. ***
Comment 8 Maik Qualmann 2019-10-15 05:44:42 UTC
*** Bug 412950 has been marked as a duplicate of this bug. ***
Comment 9 Maik Qualmann 2019-10-26 08:17:22 UTC
*** Bug 413464 has been marked as a duplicate of this bug. ***
Comment 10 Maik Qualmann 2019-10-27 08:17:39 UTC
*** Bug 413508 has been marked as a duplicate of this bug. ***
Comment 11 Maik Qualmann 2019-11-08 16:34:48 UTC
*** Bug 413944 has been marked as a duplicate of this bug. ***
Comment 12 Maik Qualmann 2019-11-15 17:22:50 UTC
*** Bug 414186 has been marked as a duplicate of this bug. ***
Comment 13 Maik Qualmann 2020-01-22 05:03:15 UTC
*** Bug 416560 has been marked as a duplicate of this bug. ***