Bug 451221 - Cannot start digiKam.
Summary: Cannot start digiKam.
Status: RESOLVED NOT A BUG
Alias: None
Product: digikam
Classification: Applications
Component: Database-Schema (show other bugs)
Version: 7.6.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-07 04:55 UTC by Jan Steinman
Modified: 2022-03-08 07:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.7.0


Attachments
Two dialogs left on the screen upon startup of digikam. (74.19 KB, image/png)
2022-03-07 04:55 UTC, Jan Steinman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Steinman 2022-03-07 04:55:30 UTC
Created attachment 147338 [details]
Two dialogs left on the screen upon startup of digikam.

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
***


STEPS TO REPRODUCE
1. Double-click digicam.app in the Finder.

OBSERVED RESULT
Database (mariadb on localhost) fails to update, according to message, and hangs forever.

EXPECTED RESULT
digikam runs

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

ADDITIONAL INFORMATION
I have not used DigiKam for some time. I upgraded MariaDB from 10.4 to 10.6 (latest). When I attempt to run it, I get the following message: "Failed to update the database schema from version 12 to version 13.
Please read the error messages printed on the console and report this error as a bug at bugs.kde.org."

No error messages appear in the system console. Besides the error dialog, digikam The last thing in MariaDB's error log is: "2022-03-06 19:35:39 135 [Warning] Aborted connection 135 to db: 'DigiKam-Core' user: 'DigiKam' host: 'localhost' (Got an error reading communication packets)"

My max_allowed_packet is set to 499,999,744, because I recently restored an email database that was losing connection until I boosted max_allowed_packet. Should I reduce that number? I have 56GB of RAM on an older MacPro 4,1.

Thank you!
Comment 1 caulier.gilles 2022-03-07 05:02:36 UTC
Which digiKam version did you use exactly ?

Run digiKam from a terminal as explained here :

https://www.digikam.org/contribute/

... report the console trace here...

Gilles Caulier
Comment 2 Maik Qualmann 2022-03-07 06:52:44 UTC
@Gilles, which Qt version are we using for MacOS? Are the patches for MariaDB-10.6.x included?

A change from MariaDB-10.4 to 10.6 is a major update. Did you run "mariadb-upgrade"? Without this upgrade, changes to the table structure will no longer work.

Maik
Comment 3 caulier.gilles 2022-03-07 07:03:09 UTC
Hi,

It's always 5.15.2. I create an issue in Macport to use 5.15 patches collection without favorable feedback, but now, as 5.15.3 is out, it will be upgraded. officially.

https://trac.macports.org/ticket/64518#comment:5

Else, in digiKam PKG, Mariadb version 10.5 is used with Qt5 sql plugin :

https://invent.kde.org/graphics/digikam/-/blob/master/project/bundles/macports/01-build-macports.sh#L304

Gilles
Comment 4 Maik Qualmann 2022-03-07 07:07:12 UTC
Ok, Jan writes that he updated MariaDB himself, so he will use an external MySQL server. Then the reason is clear, MariaDB-10.6 will not work with the current MacOS digiKam version.

Maik
Comment 5 caulier.gilles 2022-03-07 07:08:45 UTC
And of course if i force an upper version of Mariadb with Qt5.15.2, it will not work too... Right ?

Gilles
Comment 6 Maik Qualmann 2022-03-07 07:16:06 UTC
No, that won't work, a clean Qt-5.15.2 does not contain the necessary changes to the SQL driver. 
We have to wait for Qt-5.15.3 for MacOS and Jan has to go back to maximum MariaDB-10.5.x.

Maik
Comment 7 Jan Steinman 2022-03-08 03:46:11 UTC
(In reply to Maik Qualmann from comment #2)
> A change from MariaDB-10.4 to 10.6 is a major update. Did you run
> "mariadb-upgrade"? Without this upgrade, changes to the table structure will
> no longer work.

I used "brew upgrade mariadb", so I can only assume that Homebrew ran the post-upgrade script.

I did notice in my mariadb error log that one field (definer) in both mysql.event and mysql.proc was supposed to be varchar, but was char(141). I manually changed it to varchar, which stopped it from throwing errors, but made no change in digikam's operation.

So for grins, I manually ran mariadb-upgrade, and digikam now reports it has updated to schema version 14, and is now downloading the face engine and red-eye removal engines.

So I think we can mark this as closed! Thank you for your help!
Comment 8 Jan Steinman 2022-03-08 03:50:11 UTC
On Maik Qualmann's suggestion, I manually ran "mariadb-upgrade", and I no longer have this error. Thanks, Maik!