Bug 466798 - Deleting SQLite source and clearing recent list crashes on launch
Summary: Deleting SQLite source and clearing recent list crashes on launch
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: database (show other bugs)
Version: 5.1.3
Platform: Other Other
: NOR critical
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-03 23:02 UTC by Drew
Modified: 2023-03-03 23:55 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Drew 2023-03-03 23:02:39 UTC
SUMMARY: I wanted to start fresh with a new source so I deleted the SQLite file I was using and also cleared the Recent sources list in the File menu and now on launch it throws an error with the storage manager component. Clicking OK on error closes KMM.
***
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. Clear recent sources list in File menu
2. Delete the SQLite db file
3. Launch KMM
4. Click close on Currency window (actually selecting US $ also gets the same error)
5. Click OK in Error window and program closes

OBSERVED RESULT
Uncaught error. Please report the details to the developers
Unknown account id 'AStd::Asset' /build/kmymoney/src/kmymoney-5.1.3/kmymoney/mymoney/storage/mymoneystoragemgr.cpp:132

EXPECTED RESULT
Not error out

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Garuda
(available in About System)
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
I tried uninstalling and reinstalling KMyMoney but get the same error.
Comment 1 Jack 2023-03-03 23:28:11 UTC
By default, when you start KMyMoney, it tries to open the last data source it used.  That's likely why it's crashing, although it should certainly be able to recover from that situation.  The way to get going again is to launch from command line, with "kmymoney -n" where the -n tells it not to open any data source.  Then you can create a new data file.   It shouldn't matter in this case, but it's generally a good idea to state with OS/Distribution you are using.
Clearing the recently used file list doesn't really clear it completely, as it always keeps the currently open file on the list when it closes.
Comment 2 Drew 2023-03-03 23:46:08 UTC
Jack - thanks for the quick response and explanation.  It's my first time reporting a bug in the KDE system. :)  Your solution worked great!  Ran KMM through the terminal which got it to launch just fine and I was able to set up a new data source.

Ok to mark as resolved and close.
Comment 3 Jack 2023-03-03 23:55:26 UTC
In general, it's best to start with one of the methods from https://kmymoney.org/support.html when asking for help, unless it really does seem like the program is misbehaving.  I'll have to check the source to see why it crashed in this case, instead of just telling you it didn't know of any data source to use, so I'll wait until I've done that to either close or reword it for that particular problem.