Bug 306370

Summary: Crash on monthly budget vs actual
Product: [Applications] kmymoney Reporter: adamb <adamkath>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED DUPLICATE    
Severity: crash CC: asoliverez, ostroffjh
Priority: NOR    
Version: 4.6.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description adamb 2012-09-06 21:29:19 UTC
Application: kmymoney (4.6.1)
KDE Platform Version: 4.8.4 (4.8.4)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-29-generic x86_64
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
Click on monthly budget vs actual report and the application immediatly crashs

The crash can be reproduced every time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Aborted
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f2d96c05780 (LWP 11892))]

Thread 3 (Thread 0x7f2d7dce5700 (LWP 11895)):
#0  0x00007f2d912e0b03 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f2d8c950036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f2d8c95049a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f2d7dcea98b in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007f2d8c9719e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f2d93ffee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f2d912ec4bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f2d7d4e4700 (LWP 11896)):
#0  0x00007f2d94005d2d in read () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f2d8c98a8cf in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f2d8c94fba4 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f2d8c94ffd6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f2d8c95049a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f2d843d3406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007f2d8c9719e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007f2d93ffee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007f2d912ec4bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f2d96c05780 (LWP 11892)):
[KCrash Handler]
#6  0x00007f2d91230445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x00007f2d91233bab in abort () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00007f2d91b7e69d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007f2d91b7c846 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007f2d91b7c873 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007f2d91b7c96e in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x0000000000456ed8 in main (argc=1, argv=0x7fff2756c458) at /build/buildd/kmymoney-4.6.1/kmymoney/main.cpp:185

This bug may be a duplicate of or related to bug 299671.

Possible duplicates by query: bug 306368, bug 306332, bug 306265, bug 306240, bug 306239.

Reported using DrKonqi
Comment 1 Alvaro Soliverez 2012-09-06 21:44:00 UTC
Can you produce a more extensive backtrace? It looks similar to an existing bug, but I can't tell because it's very short.
Comment 2 adamb 2012-09-08 02:49:26 UTC
This is the message that is displayed in the dialog box when the crash occurs.
Unknown account id 'A000008' in file /build/buildd/kmymoney-4.6.1/kmymoney/mymoney/storage/mymoneyseqaccessmgr.cpp line 132
Comment 3 adamb 2012-09-08 02:51:11 UTC
back trace with debugging symbols

Thread 3 (Thread 0x7fad989ac700 (LWP 4097)):
#0  0x00007fadabfa7b03 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fada7617036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fada761749a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fad989b198b in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007fada76389e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fadaecc5e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fadabfb34bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fad93fff700 (LWP 4098)):
#0  0x00007fadabfa7b03 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fada7617036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fada761749a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fad9f09a406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fada76389e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fadaecc5e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fadabfb34bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fadb18cc780 (LWP 4095)):
[KCrash Handler]
#6  0x00007fadabef7445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x00007fadabefabab in abort () from /lib/x86_64-linux-gnu/libc.so.6
#8  0x00007fadac84569d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x00007fadac843846 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#10 0x00007fadac843873 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#11 0x00007fadac84396e in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#12 0x0000000000456ed8 in main (argc=1, argv=0x7fffb89cac88) at /build/buildd/kmymoney-4.6.1/kmymoney/main.cpp:185
Comment 4 adamb 2012-09-08 02:55:51 UTC
output when launched from gdb

GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/kmymoney...Reading symbols from /usr/lib/debug/usr/bin/kmymoney...done.
done.
(gdb) run
Starting program: /usr/bin/kmymoney 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffdf094700 (LWP 4250)]
[New Thread 0x7fffde893700 (LWP 4251)]
[New Thread 0x7fffdd422700 (LWP 4252)]
void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Open ledger" under id 48 
kmymoney(4240)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 1 offers for "Print check"
kmymoney(4240)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "KBanking"
kmymoney(4240)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "KMyMoney OFX"
kmymoney(4240)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "csvimport"
kmymoney(4240)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 0 offers for "Reconciliation report"
kmymoney(4240)/kdecore (KPluginInfo) KPluginInfo::kcmServices: found 1 offers for "iCalendar"
KMyMoney printcheck plugin loaded
kmymoney(4240)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
QFSFileEngine::open: No file name specified
7:2012/09/08 12-54-06:aqbanking(4240):started
KMyMoney kbanking plugin loaded
KMyMoney ofximport plugin loaded
KMyMoney csvimport plugin loaded
KMyMoney reconciliation report plugin loaded
KMyMoney iCalendar plugin loaded
reading file
start parsing file
startDocument
reading accounts
reading transactions
reading securities
reading currencies
reading prices
reading reports
endDocument
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::translate: Painter not active
QPainter::setClipRect: Painter not active
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'MyMoneyException*'

Program received signal SIGABRT, Aborted.
0x00007ffff25df445 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb)
Comment 5 Thomas Baumgart 2012-09-08 04:34:13 UTC
Try to run KMyMoney with option --nocatch to get more elaborate information about the exeception. I am not sure if it helps in this scenario.
Comment 6 adamb 2012-09-08 21:19:36 UTC
Running with --nocatch didn't show anything new.

This problem seems to be unique to my data file.

I exported the data to a sqllite database and in the kmmAccounts table the "A000008" record is missing. I'm guessing this is meant to be a list of sequential numbers for each category. I have A00001 through to A000040, and A00008 is missing.
Comment 7 Jack 2012-09-08 21:28:00 UTC
have you run a consistency check?
Comment 8 adamb 2012-09-09 06:35:08 UTC
The consistency check says everything is ok.
Comment 9 Thomas Baumgart 2012-09-09 06:40:45 UTC
Please read http://kmymoney.org/kde4/online-manual/details.formats.compressed.html and decompress your data file. Then use your favorite editor to see where the A000008 reference exists. Please report it back here (maybe with a few lines in front and some behind the actual occurrence so that we can spot the context but make sure to replace any private information with '#' for digits and 'X' for alpha chars).
Comment 10 adamb 2012-09-09 09:22:36 UTC
A000008 & A000014, seemed to be suffering from the same problem


** orig.kmy	2012-09-09 18:32:09.000000000 +1000
--- modified.kmy	2012-09-09 19:11:38.382677111 +1000
***************
*** 1378,1386 ****
     <ACCOUNT budgetsubaccounts="0" id="A000007" budgetlevel="monthly">
      <PERIOD amount="450/1" start="2012-01-01"/>
     </ACCOUNT>
-    <ACCOUNT budgetsubaccounts="0" id="A000008" budgetlevel="monthly">
-     <PERIOD amount="450/1" start="2012-01-01"/>
-    </ACCOUNT>
     <ACCOUNT budgetsubaccounts="0" id="A000010" budgetlevel="monthly">
      <PERIOD amount="120/1" start="2012-01-01"/>
     </ACCOUNT>
--- 1378,1383 ----
***************
*** 1393,1401 ****
     <ACCOUNT budgetsubaccounts="0" id="A000013" budgetlevel="monthbymonth">
      <PERIOD amount="1600/1" start="2012-03-01"/>
     </ACCOUNT>
-    <ACCOUNT budgetsubaccounts="0" id="A000014" budgetlevel="monthly">
-     <PERIOD amount="200/1" start="2012-01-01"/>
-    </ACCOUNT>
     <ACCOUNT budgetsubaccounts="0" id="A000015" budgetlevel="monthbymonth">
      <PERIOD amount="422/1" start="2012-02-01"/>
      <PERIOD amount="422/1" start="2012-05-01"/>
--- 1390,1395 ----
Comment 11 Alvaro Soliverez 2013-02-02 12:34:41 UTC

*** This bug has been marked as a duplicate of bug 290737 ***