Bug 452441 - After Cancelling Import digikam shows no albums
Summary: After Cancelling Import digikam shows no albums
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (show other bugs)
Version: 7.7.0
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-09 17:40 UTC by Steve Franks
Modified: 2023-11-12 10:19 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.2.0
Sentry Crash Report:


Attachments
digikam screenshots showing Albums (empty) and Tags (546.08 KB, application/zip)
2022-04-09 17:40 UTC, Steve Franks
Details
Debugview log (312.03 KB, text/plain)
2022-04-10 07:30 UTC, Steve Franks
Details
Debugview log file (77.79 KB, text/plain)
2022-04-10 14:36 UTC, Steve Franks
Details
Debugview Log and MySQL.err (3.76 MB, text/plain)
2022-04-10 17:17 UTC, Steve Franks
Details
attachment-3852984-0.html (878 bytes, text/html)
2023-04-19 06:27 UTC, Steve Franks
Details
attachment-2957188-0.html (1.22 KB, text/html)
2023-11-12 10:03 UTC, Steve Franks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Franks 2022-04-09 17:40:45 UTC
Created attachment 148075 [details]
digikam screenshots showing Albums (empty) and Tags

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
I started digikam and my tags were displayed. Switched to album view and could see my albums. digikam started searching for new items. Tried to import photos from an SD Card, digikam was slow responding, so I killed Flickr Uploadr and paused Windows Search, because they hog CPU.
digikam import still wasn't responding, so I aborted it and copied the images using Explorer. 
Search for new items still on 0%.
Noticed that the albums have disappeared.

STEPS TO REPRODUCE
1.  Start import, while digikam is searching for new items
2.  Cancel import
3. 

OBSERVED RESULT
Import dialog closes, albums list now empty.
Tags view still shows number of items against each keyword, but selecting a keyword does not show relevant images.

EXPECTED RESULT
My album don't disappear

SOFTWARE/OS VERSIONS
Windows:  11
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2022-04-09 18:19:01 UTC
We cannot help here without a DebugView log. As a reminder, don't use MariaDB-10.6.x. If the albums disappear, the connection to the database must be lost.

Maik
Comment 2 Steve Franks 2022-04-09 18:40:32 UTC
I think something triggered regeneration of thumbnails. That takes a very long time for 175k images.
Especially with the processes mentioned above slowing my laptop.
If I am correct, when regeneration finishes, I will let you know that this report can be closed.

What, apart from a request in maintenance, could be the  trigger?
Comment 3 Steve Franks 2022-04-10 07:30:42 UTC
Created attachment 148079 [details]
Debugview log

The log shows the same few lines repeated ad nauseum.
Comment 4 Steve Franks 2022-04-10 07:49:19 UTC
Comment on attachment 148079 [details]
Debugview log

I restored earlier version of digikam folder, then "Refreshed" the latest folder. "Thumbnails" stuck at 12%, "Find New Items" not started.
Debugview log as shown in the zip:-
[18044] QSqlQuery::prepare: database not open
[18044] QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-316072896' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'digikamDatabase-316072896', old connection removed.
[18044] QSqlQuery::prepare: database not open
[18044] QSqlDatabasePrivate::removeDatabase: connection 'thumbnailDatabase-361739520' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'thumbnailDatabase-361739520', old connection removed.
[18044] QSqlDatabasePrivate::removeDatabase: connection 'thumbnailDatabase-361739520' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'thumbnailDatabase-361739520', old connection removed.
[18044] QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-316072896' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'digikamDatabase-316072896', old connection removed.
[18044] QSqlQuery::prepare: database not open
[18044] QSqlDatabasePrivate::removeDatabase: connection 'thumbnailDatabase-361739520' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'thumbnailDatabase-361739520', old connection removed.
[18044] QSqlQuery::prepare: database not open
[18044] QSqlDatabasePrivate::removeDatabase: connection 'thumbnailDatabase-361739520' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'thumbnailDatabase-361739520', old connection removed.
[18044] QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-144326576' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'digikamDatabase-144326576', old connection removed.
[18044] QSqlQuery::prepare: database not open
[18044] QSqlQuery::prepare: database not open
[18044] QSqlDatabasePrivate::removeDatabase: connection 'thumbnailDatabase-330469376' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'thumbnailDatabase-330469376', old connection removed.
[18044] QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-140721152591200' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'digikamDatabase-140721152591200', old connection removed.
[18044] QSqlDatabasePrivate::removeDatabase: connection 'thumbnailDatabase-330469376' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'thumbnailDatabase-330469376', old connection removed.
[18044] QSqlDatabasePrivate::removeDatabase: connection 'digikamDatabase-144326576' is still in use, all queries will cease to work.
[18044] QSqlDatabasePrivate::addDatabase: duplicate connection name 'digikamDatabase-144326576', old connection removed.
[18044] QSqlQuery::prepare: database not open
etc. etc.
Comment 5 Steve Franks 2022-04-10 10:52:32 UTC
I'm using Mariadb 10.5.
Could this be caused by the laptop closing down too soon after digikam was quit? Debugview seemed to show that all activity had ended, but could MariaDB still be finishing processing?

I've restored old digikam files, but that didn't work. Are there any other files, which need to be saved to make a complete, usable, backup?

At present digikam is not usable. The process display shows Thumbnails and Finding New Items, but neither shows any sign of progress.
Comment 6 Maik Qualmann 2022-04-10 11:07:16 UTC
The log contains many error messages, unfortunately it is not from the start of digiKam. There is no longer a connection to MariaDB. I see these messages in the log: -->McAfee® Total Protection<--
The cause can be the AntiVirus program or a defective database that is causing MariaDB to crash. We've seen it more often now under Windows.

Maik
Comment 7 Maik Qualmann 2022-04-10 11:11:48 UTC
With an external MySQL server (should) be shut down cleanly by the system.
With an internal digiKam MySQL server, digiKam does this.
Are you using an external or internal MySQL server setting under digiKam?

Maik
Comment 8 Steve Franks 2022-04-10 14:36:53 UTC
Created attachment 148087 [details]
Debugview log file

Connecting to MariaDB with HeidiSQL there is no digikam data.
I can confirm that "Advanced digital photo management application" continues to run after digikam is closed.
Digikam behaves as normal until I select an album and Refresh it. The Find New Items starts, but progress bar doesn't seem to move.
Comment 9 Steve Franks 2022-04-10 17:12:51 UTC
(In reply to Maik Qualmann from comment #7)
> With an external MySQL server (should) be shut down cleanly by the system.
> With an internal digiKam MySQL server, digiKam does this.
> Are you using an external or internal MySQL server setting under digiKam?
> 
> Maik

Internal Server. I think that you're right about the database being corrupted. I read a Mariadb web page about InnoDB Recovery, but don't understand it. It mentions "mysqlcheck --all-databases" for example, but that isn't recognised as a Windows command. MariaDB and MySql don't seem to be executable either. HeidiSQL only shows default MariaDB tables.
The main problem that I would like to solve is:- How do I reset MariaDB, so that it will work with a backup of the Digikam database?
I will try deleting
Comment 10 Steve Franks 2022-04-10 17:17:30 UTC
Created attachment 148091 [details]
Debugview Log and MySQL.err

This should be a complete log from before starting digikam to after I forced the process to end.
I ran Maria DB with the innodb_force_recovery Environment Variable set to 2, to see if that would fix the error.
Next I will remove ib*.* files from Digikam\.mysql.digikam\db_data.
Comment 11 caulier.gilles 2022-04-10 17:27:58 UTC
Steve,

I currently rebuild the Windows bundle from scratch, with Qt 5.15.3. With this version all patch to support recent Mysql/Mariadb in sql plugin are included and this must fix at least the communication problem with your database.

The compilation run since 3 hours now and all progress well. I hope to provide a new 7.7.0 pre-release Windows installer late evening.

Note: if your datbase is corrupted, this new release will not fix your problem. You will needs to restore a previous version of the database before to run digiKam. 

Best

Gilles Caulier
Comment 12 Maik Qualmann 2022-04-10 17:44:07 UTC
Another thing, libjpeg generates a lot of debug messages, which greatly slows down digiKam on Windows and unnecessarily increases logs. Change the Qt-Debug environment variable QT_LOGGING_RULES to the following:

"digikam.*=true;digikam.dimg.jpeg=false"

Maik
Comment 13 Steve Franks 2022-04-11 07:32:19 UTC
(In reply to Maik Qualmann from comment #12)
> Another thing, libjpeg generates a lot of debug messages, which greatly
> slows down digiKam on Windows and unnecessarily increases logs. Change the
> Qt-Debug environment variable QT_LOGGING_RULES to the following:
> 
> "digikam.*=true;digikam.dimg.jpeg=false"
> 
> Maik

Thank you, I will do that.
Comment 14 caulier.gilles 2023-04-19 05:58:16 UTC
Hi Steve,

Any feedback here ?

Gilles Caulier
Comment 15 Steve Franks 2023-04-19 06:27:51 UTC
Created attachment 158205 [details]
attachment-3852984-0.html

I will try to repeat the situation and let you know ,
Steve

On Wed, 19 Apr 2023 at 06:58, <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=452441
>
> --- Comment #14 from caulier.gilles@gmail.com ---
> Hi Steve,
>
> Any feedback here ?
>
> Gilles Caulier
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
Comment 16 caulier.gilles 2023-10-15 09:51:05 UTC
@Steve Franks,

This problem still reproducible with the new digiKam 8.2.0 pre-release Windows
installer available at usual place:

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

This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110.

Thanks in advance

Gilles Caulier
Comment 17 Steve Franks 2023-11-12 10:03:42 UTC
Created attachment 163070 [details]
attachment-2957188-0.html

The bug has been cleared in digikam 8.2.0 for Windows.
Thanks
Steve

On Sun, 15 Oct 2023 at 10:51, <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=452441
>
> --- Comment #16 from caulier.gilles@gmail.com ---
> @Steve Franks,
>
> This problem still reproducible with the new digiKam 8.2.0 pre-release
> Windows
> installer available at usual place:
>
> https://files.kde.org/digikam/
>
> This new bundle is based on last Qt framework 5.15.11 and KDE framework
> 5.110.
>
> Thanks in advance
>
> Gilles Caulier
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.
> You reported the bug.