Bug 291993

Summary: KMyMoney crashes while editing Categories
Product: [Applications] kmymoney Reporter: John Paul <kde>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED WORKSFORME    
Severity: crash CC: onet.cristian, rmroczk
Priority: NOR    
Version: 4.6.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description John Paul 2012-01-19 21:20:57 UTC
Application: kmymoney (4.6.1)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.8.0
Operating System: Linux 3.1.6-1.fc16.i686.PAE i686
Distribution: "Fedora release 16 (Verne)"

-- Information about the crash:
- What I was doing when the application crashed:
Editing / Deleting / Renaming Categories

In the Categories view, right-clicking and selecting various options. About every 3rd or 4th time I chose "Edit Category..." the program would crash with "Uncaught exception" because "Currency USD was not found in ...mymoneyfile.cpp"

The crash can be reproduced some of the time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Aborted
Using host libthread_db library "/lib/libthread_db.so.1".
[KCrash Handler]
#7  0x00916424 in __kernel_vsyscall ()
#8  0x452e698f in raise () from /lib/libc.so.6
#9  0x452e82d5 in abort () from /lib/libc.so.6
#10 0x45fb474d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#11 0x45fb24c4 in ?? () from /usr/lib/libstdc++.so.6
#12 0x45fb2500 in std::terminate() () from /usr/lib/libstdc++.so.6
#13 0x45fb264f in __cxa_throw () from /usr/lib/libstdc++.so.6
#14 0x080893be in main (argc=1, argv=0xbfa23494) at /usr/src/debug/kmymoney-4.6.1/kmymoney/main.cpp:185

Possible duplicates by query: bug 291979, bug 291975, bug 291964, bug 291961, bug 291935.

Reported using DrKonqi
Comment 1 Cristian OneČ› 2012-01-20 20:43:01 UTC
Is USD your main currency? Could you attach an anonymous file with which you can reproduce this since selecting "Edit Category..." 4 or 5 times here does not cause a crash. Also since this is an uncaught exception you could try running kmymoney with the '--nocatch' option to get more details about the stacktrace when the exception is throw.
Comment 2 Bob Mroczka 2012-02-18 15:38:42 UTC
I just experienced this issue twice.  If I edit the account the currency field is USD but it is grayed out.  The line where the exception is being thrown is on 2381 in kmymoney/mymoney/mymoneyfile.cpp.  I will try to gather a stack trace and follow up.

2372 const MyMoneySecurity& MyMoneyFile::currency(const QString& id) const$
2373 {$
2374   if (id.isEmpty())$
2375     return baseCurrency();$
2376 $
2377   const MyMoneySecurity& curr = d->m_cache.security(id);$
2378   if (curr.id().isEmpty()) {$
2379     QString msg;$
2380     msg = QString("Currency '%1' not found.").arg(id);$
2381     throw new MYMONEYEXCEPTION(msg);$
2382   }$
2383   return curr;$
2384 }$
Comment 3 John Paul 2012-02-19 11:24:15 UTC
Strangely, since this incident, I haven't experienced any crashes in KMyMoney.
Comment 4 Cristian OneČ› 2013-09-17 18:10:49 UTC
Reported to be working.