Bug 506569

Summary: Missing implementation of update function
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: databaseAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: critical    
Priority: NOR    
Version First Reported In: 5.2.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.2.1
Sentry Crash Report:

Description Thomas Baumgart 2025-07-04 07:44:19 UTC
SUMMARY

With commit a70cb789 a structural change was introduced to the XML backend. At the same time, the version for the DB layout was bumped but the necessary code to do the conversion was not implemented. This results in an endless loop when opening an SQL based data file that was created with earlier versions.

STEPS TO REPRODUCE
1. Create SQL data file with 5.1.3
2. Open that file using 5.2.0

OBSERVED RESULT
After entering the password to open an SQLcipher based data file, an infinite amount of the following messages is displayed in the terminal and the program hangs:

Perform upgrade to db layout version 14
Unknown version number in database - 13


EXPECTED RESULT
Data file is opened and the application is usable.

ADDITIONAL INFORMATION
The function MyMoneyStorageSqlPrivate::upgradeToV14() needs to be created and receive the logic of MyMoneyFile::Private::fixFile_8().
Comment 1 Bug Janitor Service 2025-07-04 12:40:26 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/280
Comment 2 Ralf Habacker 2025-07-04 15:46:51 UTC
Git commit fe163b37b2e3ebb599b74bca21a113dc8135d624 by Ralf Habacker, on behalf of Thomas Baumgart.
Committed on 04/07/2025 at 15:46.
Pushed by habacker into branch '5.2'.

Fix infinite loop when open existing database created with 5.1.3

The configuration of reports needed to be modified in certain
cases. This is done automatically when loading an older
data file, but the implementation was missing for the
database backend. This causes an infinite loop when
opening the database and renders the application useless.

This change provides the necessary implementation.
FIXED-IN: 5.2.1

M  +1    -1    kmymoney/main.cpp
M  +36   -0    kmymoney/plugins/sql/mymoneystoragesql_p.h

https://invent.kde.org/office/kmymoney/-/commit/fe163b37b2e3ebb599b74bca21a113dc8135d624
Comment 3 Thomas Baumgart 2025-07-04 16:37:32 UTC
Git commit ea9c366d297f57b3dc560d0dc538ad776efe6bb4 by Thomas Baumgart, on behalf of Thomas Baumgart.
Committed on 04/07/2025 at 16:34.
Pushed by tbaumgart into branch 'master'.

Fix infinite loop when open existing database created with 5.1.3

The configuration of reports needed to be modified in certain
cases. This is done automatically when loading an older
data file, but the implementation was missing for the
database backend. This causes an infinite loop when
opening the database and renders the application useless.

This change provides the necessary implementation.
FIXED-IN: 5.2.1
(cherry picked from commit fe163b37b2e3ebb599b74bca21a113dc8135d624)

M  +36   -0    kmymoney/plugins/sql/mymoneystoragesql_p.h

https://invent.kde.org/office/kmymoney/-/commit/ea9c366d297f57b3dc560d0dc538ad776efe6bb4
Comment 4 Bug Janitor Service 2025-08-05 13:45:49 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/286