Bug 219739 - Crash opening ledger view when underlying data is deleted
Summary: Crash opening ledger view when underlying data is deleted
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Slackware Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-22 21:25 UTC by Fernando Vilas
Modified: 2009-12-26 16:41 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 Fernando Vilas 2009-12-22 21:25:46 UTC
Version:           svn rev 1064879 (using KDE 4.3.4)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Slackware Packages

Open a ledger from the categories view.
Return to the categories view.
Delete the original category.
Attempt to open the ledger for a different category.
Crash.

The re-opening of the ledger view causes a resize event in the ledger view. That attempts to get the text for the splits in each transaction object. Since the account id is invalid, the storage object (both xml and db) will throw. If this exception is caught and ignored, KPageWidget throws a MyMoneyException. Using gdb, it does not show the source of that exception in the call stack.
Comment 1 Thomas Baumgart 2009-12-24 12:14:46 UTC
The exception is thrown in kmymoney/widgets/transaction.cpp line 1165.
Comment 2 Fernando Vilas 2009-12-26 16:40:09 UTC
SVN commit 1066265 by fvilas:

BUG: 219739 \n Do not crash when the account in the ledger view is deleted and ledger view is refreshed.

 M  +1 -1      mymoney/mymoneyexception.cpp  
 M  +13 -1     widgets/register.cpp  
 M  +13 -7     widgets/selectedtransaction.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1066265
Comment 3 Fernando Vilas 2009-12-26 16:41:59 UTC
That was one. There was another, but the trick of putting a breakpoint in the ctor for MyMoneyException found the other.