Bug 325614

Summary: Crash after deleting some business categories
Product: [Applications] kmymoney Reporter: Mal <malrubius.maximus>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED WORKSFORME    
Severity: crash CC: alfa_victor, onet.cristian
Priority: NOR Keywords: triaged
Version: 4.6.3   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Image showing the error message
Backtrace
Deleting just a subcategory allows me to reassign categories to transactions

Description Mal 2013-10-04 07:30:19 UTC
I deleted several business categories from the category menu.
I believe one of these categories was used for an already entered transaction (that was entered as a utility category).
I received this error message, then kmymoney crashed.  Now every time I start kmymoney I receive the error and the crash.
I receive the same error every time I start kmymoney, but I am unable to start the program to reproduce the crash.

Error message:
"Uncaught error....
Unknown account id 'A000135' in file
/build/buildd/kmymoney-4.6.3/kmymoney/mymoney/storage/mymoneyseqaccessmgr.cpp line 132'

Reproducible: Didn't try
Comment 1 Mal 2013-10-04 07:32:05 UTC
Created attachment 82650 [details]
Image showing the error message
Comment 2 Mal 2013-10-04 07:37:54 UTC
Created attachment 82651 [details]
Backtrace
Comment 3 Cristian Oneț 2013-10-04 07:38:53 UTC
First make a copy of your file to have a backup and so we can investigate the cause of this. Then to recover your file (to be able to use it again) do the following.
1. run '$kmymoney -n' this will start it without opening a file
2. goto 'Settings'->'Home' [1] and uncheck everything
3. open you file
4. run consistency check

If the above does not work then
1. zcat you_file.kmy > yourfile.xml
2. open yourfile.xml (using UTF-8 encoding) with a text editor
3. find the reference to 'A000135' and replace it with the ID of an existing category
4. save the file, open it with kmymoney

Note: keep a copy of the faulty file so we can figure out the source of this.

[1] http://kmymoney2.sourceforge.net/kde4/online-manual/details.settings.home.html
Comment 4 Mal 2013-10-04 08:02:43 UTC
I was able to recreate the error by opening up a previous version of the .kmy file.
Then I deleted the Business Category - Utilities.
I got a message asking if I wanted to delete just Utilities or all subcategories as well.
I chose to delete all subcategories and then immediately got the crash.

When I delete just the subcategory Internet, I get a message asking what to do with the transactions.  I chose the non business subcategory and did not get the crash.
Comment 5 Cristian Oneț 2013-10-04 08:09:05 UTC
Could you produce an anonymous file [1] from that previous version, then try to reproduce the crash with the anonymous file and post it as an attachment to this bug report together with the steps to reproduce it (please provide the exact account names in the steps since it is important).

[1] http://kmymoney2.sourceforge.net/kde4/online-manual/details.formats.anonymous.html
Comment 6 Mal 2013-10-04 08:10:21 UTC
Created attachment 82652 [details]
Deleting just a subcategory allows me to reassign categories to transactions
Comment 7 Mal 2013-10-04 08:23:28 UTC
I started a new anonymous kmy file, created what I thought were the problematic transactions, then deleted the Business Utilities category.  Kmymoney reassigned the subcategory Telephone/Internet/Fax to the main Business category after I chose to proceed.  So the crash did not occur.  I will try some more work with the original file (anonymized) to reproduce the error.
Comment 8 Cristian Oneț 2013-10-06 00:02:04 UTC
*** Bug 325680 has been marked as a duplicate of this bug. ***
Comment 9 Cristian Oneț 2014-07-31 08:38:36 UTC
Any success creating that anonymous file?
Comment 10 Andrew Crouthamel 2018-09-25 03:34:39 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Andrew Crouthamel 2018-10-27 04:19:48 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!