Bug 517354 - Images seem to be gone when upgrading from 8.8.0 with mariadb on NAS (but are still in DB)
Summary: Images seem to be gone when upgrading from 8.8.0 with mariadb on NAS (but are...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Albums-Engine (other bugs)
Version First Reported In: 9.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-09 19:08 UTC by Robin
Modified: 2026-03-23 15:55 UTC (History)
2 users (show)

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


Attachments
Startup after scanning collection to internal database (226.00 KB, text/plain)
2026-03-11 09:24 UTC, Robin
Details
Changed settings back to mariadb on NAS but digikam not responding (12.42 KB, text/plain)
2026-03-11 09:25 UTC, Robin
Details
Restarted digikam with mariadb on NAS set but only shows 2 folders in Albums view, people is empty (60.46 KB, text/plain)
2026-03-11 09:27 UTC, Robin
Details
Changed face database name (72.79 KB, text/plain)
2026-03-11 13:03 UTC, Robin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin 2026-03-09 19:08:17 UTC
SUMMARY
After running the installer for 9.0.0 and reinstalling from 8.8.0, on first launch the images are all there. Response is very very slow. After trying to disregard 2 suggested faces the platform hung for minutes. After closing and re-opening the names of all the people were still there but unpopulated. After changing to Albums view and then to People view the people entries were all gone. After closing and re-opening digikam no people were available and pretty much everything was empty. The Help -> database settings showed 35 images (down from ~250k). Had to add the photo's share again and am now rescanning (to a local mariadb version - the NAS had always been unbearably slow). Checked the old NAS database and the data seems to be in it. No idea why digikam wouldn't seem to read it.
Comment 1 Maik Qualmann 2026-03-09 19:25:44 UTC
There is no database update between digiKam versions 8.8.0 and 9.0.0.

Albums disappear because the collection is not online, but the People never disappear.

Without a complete DebugView log from startup, as described here, we will not be able to help:

https://www.digikam.org/contribute/#windows-host

Maik
Comment 2 Robin 2026-03-09 20:25:27 UTC
(In reply to Maik Qualmann from comment #1)
> There is no database update between digiKam versions 8.8.0 and 9.0.0.
> 
> Albums disappear because the collection is not online, but the People never
> disappear.
> 
> Without a complete DebugView log from startup, as described here, we will
> not be able to help:
> 
> https://www.digikam.org/contribute/#windows-host
> 
> Maik

OK. I will revert in about 3 days time, when I hope my collection has rescanned (now at 28%, started around 16 hours ago)
Comment 3 Robin 2026-03-11 09:24:17 UTC
Created attachment 190556 [details]
Startup after scanning collection to internal database

People view shows no faces in the left side, but does show the content when I click on a person, album, etc.
Comment 4 Robin 2026-03-11 09:25:35 UTC
Created attachment 190557 [details]
Changed settings back to mariadb on NAS but digikam not responding

Left digikam to run for around 1/2 an hour, but digikam was not responding
Comment 5 Robin 2026-03-11 09:27:28 UTC
Created attachment 190558 [details]
Restarted digikam with mariadb on NAS set but only shows 2 folders in Albums view, people is empty

After restarting digikam from the not responding state.
The list of people is present on the left, but when clicking on a person there are no images visible. The thumbnail image for the person is also not visible
Comment 6 Robin 2026-03-11 09:31:06 UTC
Hi, the scanning process is complete. I have attached 3 logs:
- TJX Internal Database.LOG - after scanning the collection again, no people thumbnails are visible
- TJX.LOG set to database.LOG - started the debugger after changing database settings back to the NAS database server. This resulted in digikam not responding. Waited for ~30 minutes before killing the process
- TJX database on NAS after restart.LOG - Started up digikam. Only 2 folders are visible in Albums view. The names of the people are visible in People view, but no thumbnails. Clicking on them shows no images.
Thanks!
Comment 7 Maik Qualmann 2026-03-11 11:41:22 UTC
In Comment 4, they switch databases, and unfortunately, due to a race condition, digiKam can freeze. I will fix that.

Otherwise, there is an access problem to the face database that needs to be resolved:

digikam.dbengine: Error while opening the database. Error was QSqlError("1044", "QMYSQL: Unable to connect", "Access denied for user 'digikam'@'%' to database 'digikam_faces'")

Maik
Comment 8 Robin 2026-03-11 13:03:53 UTC
Created attachment 190570 [details]
Changed face database name

face database name was incorrect. Changed the name in settings, which led to digikam hanging / becoming unresponsive. Closed and re-opened. Same results as previously: only 2 albums visible.

MariaDB [digikam]> select * from Albums;
returns
32722 rows in set (0.035 sec)

Rows look very similar to
MariaDB [digikam]> select * from Albums limit 0,3;
+----+-----------+--------------+------------+---------+------------+------+---------------------+
| id | albumRoot | relativePath | date       | caption | collection | icon | modificationDate    |
+----+-----------+--------------+------------+---------+------------+------+---------------------+
|  1 |         0 | 1-/          | 2003-04-19 | NULL    | NULL       | NULL | 2025-06-26 07:51:00 |
|  2 |         0 | 1-/3d scans  | 2022-04-05 | NULL    | NULL       | NULL | 2022-04-05 10:10:48 |
|  3 |         0 | 1-/4chan     | 2026-01-24 | NULL    | NULL       | NULL | 2026-01-27 21:34:17 |
+----+-----------+--------------+------------+---------+------------+------+---------------------+

but found some seeming doubles
MariaDB [digikam]> select * from Albums where "id" < 32720 and id > 32718;
+-------+-----------+----------------------------+------------+---------+------------+------+---------------------+
| id    | albumRoot | relativePath               | date       | caption | collection | icon | modificationDate    |
+-------+-----------+----------------------------+------------+---------+------------+------+---------------------+
| 32719 |         0 | 1-/Events/Sinterklaas 2025 | 2026-01-30 | NULL    | NULL       | NULL | 2026-01-30 16:19:00 |
| 32720 |         1 | /                          | 2025-06-26 | NULL    | NULL       | NULL | NULL                |
| 32721 |         1 | /3d scans                  | 2022-04-05 | NULL    | NULL       | NULL | 2022-04-05 10:10:48 |
| 32722 |         1 | /4chan                     | 2026-02-06 | NULL    | NULL       | NULL | NULL                |
+-------+-----------+----------------------------+------------+---------+------------+------+---------------------+
4 rows in set, 1 warning (0.000 sec)

MariaDB [digikam]> select * from Albums where relativePath like "1-/%";
results in
32719 rows in set (0.038 sec)

and 
MariaDB [digikam]> select * from Albums where relativePath like "/%";
+-------+-----------+--------------+------------+---------+------------+------+---------------------+
| id    | albumRoot | relativePath | date       | caption | collection | icon | modificationDate    |
+-------+-----------+--------------+------------+---------+------------+------+---------------------+
| 32720 |         1 | /            | 2025-06-26 | NULL    | NULL       | NULL | NULL                |
| 32721 |         1 | /3d scans    | 2022-04-05 | NULL    | NULL       | NULL | 2022-04-05 10:10:48 |
| 32722 |         1 | /4chan       | 2026-02-06 | NULL    | NULL       | NULL | NULL                |
+-------+-----------+--------------+------------+---------+------------+------+---------------------+
3 rows in set (0.018 sec)

are also the only albums that show up in my Albums list.

Considering:
- When I restarted digikam the second time after installation of 9.0.0 it asked me to enter a collection again
- I added the same network share 
- I have scan for new files on startup set (which I cancel pretty much as soon as I started up the last few times)

it looks like somehow digikam set albumRoot to 0 and relativePath to 1-/% and found the 3 with albumRoot 1 and relativePath /% entries whilst scanning.

Do you recommend me deleting the last 3 entries and setting albumRoot to 1 for all that is 0, as well as replacing the relativePath 1-% to %?

It won't solve the mystery of why that was changed though - there were no network outages with the NAS whilst I upgraded (.exe installer) from 8.8.0.
Comment 9 Maik Qualmann 2026-03-13 08:47:31 UTC
The cause is the network path, which only points to "T:". This cannot be resolved and found in our Collection Location code. I will fix it this weekend.

Maik
Comment 10 Maik Qualmann 2026-03-13 19:51:51 UTC
Git commit 622d611d0315116f68aa4245fad7b3a31afd6fd8 by Maik Qualmann.
Committed on 13/03/2026 at 19:50.
Pushed by mqualmann into branch 'master'.

add test debug for Windows

M  +13   -6    core/libs/database/collection/collectionscanner_scan.cpp
M  +11   -1    core/libs/database/collection/collectionscanner_utils.cpp

https://invent.kde.org/graphics/digikam/-/commit/622d611d0315116f68aa4245fad7b3a31afd6fd8
Comment 11 Maik Qualmann 2026-03-14 12:13:03 UTC
Git commit e032d28fcf6d871f616fd9da1960c8c0b70b425f by Maik Qualmann.
Committed on 14/03/2026 at 12:11.
Pushed by mqualmann into branch 'master'.

remove test debug for Windows
Problem is fixed when using only one drive letter as the collection path.
With QDir, the slash in the path is now handled correctly.
FIXED-IN: 9.1.0

M  +1    -1    NEWS
M  +0    -9    core/libs/database/collection/collectionscanner_scan.cpp
M  +0    -10   core/libs/database/collection/collectionscanner_utils.cpp

https://invent.kde.org/graphics/digikam/-/commit/e032d28fcf6d871f616fd9da1960c8c0b70b425f
Comment 12 Robin 2026-03-17 19:01:54 UTC
(In reply to Maik Qualmann from comment #11)
> Git commit e032d28fcf6d871f616fd9da1960c8c0b70b425f by Maik Qualmann.
> Committed on 14/03/2026 at 12:11.
> Pushed by mqualmann into branch 'master'.
> 
> remove test debug for Windows
> Problem is fixed when using only one drive letter as the collection path.
> With QDir, the slash in the path is now handled correctly.
> FIXED-IN: 9.1.0
> 
> M  +1    -1    NEWS
> M  +0    -9    core/libs/database/collection/collectionscanner_scan.cpp
> M  +0    -10   core/libs/database/collection/collectionscanner_utils.cpp
> 
> https://invent.kde.org/graphics/digikam/-/commit/
> e032d28fcf6d871f616fd9da1960c8c0b70b425f

So for now do you recommend I wait for a few months until 9.1.0 release or do you recommend me deleting the last 3 entries and setting albumRoot to 1 for all that is 0, as well as replacing the relativePath 1-% to %?
As in how do I fix this now?
Comment 13 Maik Qualmann 2026-03-17 20:46:51 UTC
Use the current pre-release version of digiKam-9.1.0. It currently only contains bug fixes.

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

Maik
Comment 14 Robin 2026-03-18 05:41:13 UTC
(In reply to Maik Qualmann from comment #13)
> Use the current pre-release version of digiKam-9.1.0. It currently only
> contains bug fixes.
> 
> https://files.kde.org/digikam/
> 
> Maik

Thanks, but version digiKam-9.1.0-20260317T180154-Qt6-Win64 still only shows the 2 folders with albumRoot 1
Comment 15 Maik Qualmann 2026-03-18 06:58:47 UTC
Albums with a "1-" path are marked as deleted. Due to a bug in digiKam-9.0.0, all albums in the T: drive were marked as no longer present. You will have to rescan your collection – unfortunately.

Please also provide an updated DebugView log.

Maik
Comment 16 doobs 2026-03-23 15:55:05 UTC
Ok,

After running into the same issue, I've got v9.1.0 installed on my Windows box.

It reads the database, but Finding new items is stuck at 0%.

Is this a by-product of the bug, or something else?