Bug 514764 - "Find new items" background task is not stopped when closing DigiKam
Summary: "Find new items" background task is not stopped when closing DigiKam
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Similarity (other bugs)
Version First Reported In: 8.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-17 20:37 UTC by kde
Modified: 2026-01-18 13:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 9.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kde 2026-01-17 20:37:12 UTC
SUMMARY
If you close the DigiKam software while the "Find new items" background process is running, the main DigiKam window will close but the scan process will continue (probably until it completes?)

STEPS TO REPRODUCE
1. Start ProcMon and filter for DigiKam process / QueryDirectory operation
2. Start DigiKam
3. In my case, the "Find new items" background task automatically starts (and can be monitored in the background tasks tray)
4. Confirm ProcMon is logging
5. Close DigiKam

OBSERVED RESULT
ProcMon is still scanning folders way after DigiKam closed and Task Manager still shows DigiKam as a running background task.

EXPECTED RESULT
The background process whould be cleanly aborted if the main application is closed. Additionaly, a popup could ask the user if he really wants to close the application since it will interrupt background processes.

SOFTWARE/OS VERSIONS
digiKam: 8.8.0
KDE Frameworks: 6.17.0
Qt: Using 6.9.1 and built against 6.9.1
Windows 11 Version 25H2
Build ABI: x86_64-little_endian-llp64
Kernel: winnt 10.0.26200

ADDITIONAL INFORMATION
Each time I start a new DigiKam instance, these background processes will pile up. I suppose that at some point, races could occur...
Comment 1 Maik Qualmann 2026-01-18 13:00:15 UTC
Git commit e6b5b59afc88359787c4dbdd273f8ecac45cf80c by Maik Qualmann.
Committed on 18/01/2026 at 12:58.
Pushed by mqualmann into branch 'master'.

faster exit from item scanning process
Related: bug 514683
FIXED-IN: 9.0.0

M  +1    -1    NEWS
M  +10   -0    core/libs/database/collection/collectionscanner_scan.cpp
M  +5    -1    core/libs/database/collection/collectionscanner_utils.cpp
M  +6    -5    core/libs/database/utils/scan/scancontroller_stop.cpp

https://invent.kde.org/graphics/digikam/-/commit/e6b5b59afc88359787c4dbdd273f8ecac45cf80c