Bug 288279 - Crash at each starting
Summary: Crash at each starting
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.6.1
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-05 18:33 UTC by Nicollivier
Modified: 2011-12-06 17:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicollivier 2011-12-05 18:33:06 UTC
Version:           4.6.1 (using KDE 4.7.3) 
OS:                Linux

I was working on my personal accounts, more specifically on my second budget, and I finished to delete it.
I saved, and I would like to go to my home page to see information coming from my first budget. But KMyMoney crashed.
And now at each starting it crashes with this message:

Unknown account id 'A000189' dans le fichier /build/src/kmymoney-4.6.1/kmymoney/mymoney/storage/mymoneyseqaccessmgr.cpp à la ligne 132

Impossible to do something with. 

Reproducible: Always

Steps to Reproduce:
Happens at each starting.


Expected Results:  
Work properly.
Comment 1 Cristian Oneț 2011-12-05 19:46:13 UTC
To recover your file follow these steps:
1. Start kmymoney with the -n parameter to start without opening your file
2. Go to the 'Home page' settings and uncheck every item. 
3. Stop kmymoney and start it as usual.
4. At this point you should have your file opened
5. Before running a consistency check try to save the file in the anonymous format. 
6. If you can reproduce the crash with the file then attach it to this report or sent it to my by mail so we can fix this bug.

More about the anonymous format http://kmymoney2.sourceforge.net/kde4/online-manual/details.formats.anonymous.html
Comment 2 Nicollivier 2011-12-05 20:14:59 UTC
Thanks a lot I got my file back.

I've just unchecked the budget option.

If I check it again the problem is back. But if I create a new " budget using estimation" (as it was before), It's ok. I can go to my home page with the budget option checked without issue.

The size of the anonymous file is to big to be added here so I'm going to send it to you. Hope it can help you to fix this issue. Anyway Thanks a lot for your great job.
Comment 3 Cristian Oneț 2011-12-05 21:30:17 UTC
I can confirm the invalid budget. Do you have an idea about how did you manage to save the invalid budget?
Comment 4 Cristian Oneț 2011-12-05 22:27:39 UTC
Git commit 2164158e680e9255685c9b61155e27e88accffe7 by Cristian Oneț.
Committed on 05/12/2011 at 23:14.
Pushed by conet into branch '4.6'.

Fix the budgets that somehow still reference invalid accounts.

Add a consistency check for this since it could cause quite a few budget related 'Home page' and 'Report' crashes.
Note that this is not an actual fix for the cause of the problem but it rather fixes the problem once it occurs.

BUG: 288279

M  +28   -0    kmymoney/mymoney/mymoneyfile.cpp

http://commits.kde.org/kmymoney/2164158e680e9255685c9b61155e27e88accffe7
Comment 5 Cristian Oneț 2011-12-05 22:28:22 UTC
Git commit 085723bfcd9fdfd5aca62eefc1a8c74703e62a03 by Cristian Oneț.
Committed on 05/12/2011 at 23:14.
Pushed by conet into branch 'master'.

Fix the budgets that somehow still reference invalid accounts.

Add a consistency check for this since it could cause quite a few budget related 'Home page' and 'Report' crashes.
Note that this is not an actual fix for the cause of the problem but it rather fixes the problem once it occurs.

M  +28   -0    kmymoney/mymoney/mymoneyfile.cpp

http://commits.kde.org/kmymoney/085723bfcd9fdfd5aca62eefc1a8c74703e62a03
Comment 6 Nicollivier 2011-12-06 04:57:54 UTC
invalid budget ?!

... Oh yes my second one, due to the date ?!
Comment 7 Cristian Oneț 2011-12-06 05:52:35 UTC
(In reply to comment #6)
> invalid budget ?!
> 
> ... Oh yes my second one, due to the date ?!

No, because it was still referencing the account with id 'A000189' which was deleted from the file.
Comment 8 Nicollivier 2011-12-06 13:15:31 UTC
Really strange because I did nothing special to save it.
But when I did a consistency test everything was OK. 

I will try to find where exactly is the error.
Comment 9 Cristian Oneț 2011-12-06 13:32:10 UTC
(In reply to comment #8)
> Really strange because I did nothing special to save it.
> But when I did a consistency test everything was OK. 

I was expecting that since I've just added a step in the consistency check to fix these kind of errors.

> I will try to find where exactly is the error.

If you need to look for it that it's probably not worth while to do it. Did you delete categories recently?.

Anyway we've already found a fix and discovered another problem when deleting categories with the help of your file so you've already helped a lot. Thanks for your contribution.
Comment 10 Nicollivier 2011-12-06 17:43:56 UTC
I've created a new budget and now everything is OK.
I'm not really sure but I think effectively I deleted a category last time.

Thanks a lot for your help