Bug 274308 - Crash on entering opening balance for new account
Summary: Crash on entering opening balance for new account
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 274159 274637 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-05-27 22:48 UTC by allan
Modified: 2011-05-31 21:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description allan 2011-05-27 22:48:05 UTC
Application: kmymoney (4.5.90-svn1233773)
KDE Platform Version: 4.6.00 (4.6.0) "release 6" (Compiled from sources)
Qt Version: 4.7.1
Operating System: Linux 2.6.37.1-1.2-desktop x86_64
Distribution: "openSUSE 11.4 (x86_64)"

-- Information about the crash:
- What I was doing when the application crashed:

Investigating the referred bug.

Confirmed that qif import is not involved, as suspected.  If a new checking account is opened, and an opening balance is entered in the wizard, on closing the wizard, KMM crashes every time at the same place as originally reported, line 887 in accountsmodel.cpp.

The crash can be reproduced every time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Segmentation fault
[KCrash Handler]
#6  InstitutionsModel::slotObjectModified (this=0x1002360, objType=<value optimized out>, obj=0x2216660) at /home/aga/CSV/kmymoney/kmymoney/models/accountsmodel.cpp:887
#7  0x0000000000790449 in InstitutionsModel::qt_metacall (this=0x1002360, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff5a952f00) at /home/aga/CSV/kmymoney/build/kmymoney/models/accountsmodel.moc:177
#8  0x00007f39eaa89def in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#9  0x00007f39ee2ef18a in MyMoneyFile::objectModified (this=<value optimized out>, _t1=MyMoneyFile::notifyAccount, _t2=0x2216660) at /home/aga/CSV/kmymoney/build/kmymoney/mymoney/mymoneyfile.moc:120
#10 0x00007f39ee2f8f49 in MyMoneyFile::commitTransaction (this=0x7f39ee55b550) at /home/aga/CSV/kmymoney/kmymoney/mymoney/mymoneyfile.cpp:391
#11 0x00007f39ee2f93e5 in MyMoneyFileTransaction::commit (this=0x7fff5a9535d0) at /home/aga/CSV/kmymoney/kmymoney/mymoney/mymoneyfile.cpp:2744
#12 0x000000000047b98b in KMyMoneyApp::slotAccountNew (this=0xc8a830, account=...) at /home/aga/CSV/kmymoney/kmymoney/kmymoney.cpp:3086
#13 0x000000000047bf4e in KMyMoneyApp::slotAccountNew (this=0xc8a830) at /home/aga/CSV/kmymoney/kmymoney/kmymoney.cpp:3029
#14 0x00000000004a13b1 in KMyMoneyApp::qt_metacall (this=0xc8a830, _c=QMetaObject::InvokeMetaMethod, _id=176, _a=0x7fff5a953c20) at /home/aga/CSV/kmymoney/build/kmymoney/kmymoney.moc:585
#15 0x00007f39eaa89def in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4
#16 0x00007f39e9bc2982 in QAction::triggered(bool) () from /usr/lib64/libQtGui.so.4
#17 0x00007f39e9bc2b7a in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQtGui.so.4
#18 0x00007f39e9ff8e63 in ?? () from /usr/lib64/libQtGui.so.4
#19 0x00007f39e9ffee7a in ?? () from /usr/lib64/libQtGui.so.4
#20 0x00007f39ecc92b1d in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libkdeui.so.5
#21 0x00007f39e9c1a538 in QWidget::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#22 0x00007f39ea00006b in QMenu::event(QEvent*) () from /usr/lib64/libQtGui.so.4
#23 0x00007f39e9bc8d14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#24 0x00007f39e9bd1aac in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#25 0x00007f39eccc49e6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#26 0x00007f39eaa74bfc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#27 0x00007f39e9bc9d25 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQtGui.so.4
#28 0x00007f39e9c48054 in ?? () from /usr/lib64/libQtGui.so.4
#29 0x00007f39e9c464c9 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/libQtGui.so.4
#30 0x00007f39e9c6e0f2 in ?? () from /usr/lib64/libQtGui.so.4
#31 0x00007f39e3a87bd3 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0
#32 0x00007f39e3a883b0 in ?? () from /lib64/libglib-2.0.so.0
#33 0x00007f39e3a88650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0
#34 0x00007f39eaa9f91f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#35 0x00007f39e9c6dd8e in ?? () from /usr/lib64/libQtGui.so.4
#36 0x00007f39eaa74052 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#37 0x00007f39eaa74265 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#38 0x00007f39eaa786ab in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#39 0x0000000000459f5a in runKMyMoney (a=<value optimized out>, splash=<value optimized out>) at /home/aga/CSV/kmymoney/kmymoney/main.cpp:282
#40 0x000000000045bd9e in main (argc=1, argv=0x7fff5a9561c8) at /home/aga/CSV/kmymoney/kmymoney/main.cpp:181

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

Possible duplicates by query: bug 274159, bug 268953.

Reported using DrKonqi
Comment 1 allan 2011-05-28 13:43:06 UTC
The crash appears to be caused because,
in kmymoney/models/accountsmodel.cpp line 886 -
QStandardItem *accountItem = d->itemFromAccountId(this, account->id());

the item is not found, but the pointer is used.

I've inserted a return if there is a null pointer, and this avoids the crash.  The manually entered new account with opening balance can now be created, and the failing qif can now be imported.

However, as I'm not au fait with this area, I would appreciate comments.
Comment 2 Cristian Oneț 2011-05-28 14:54:03 UTC
I will come up with a proper fix for this.
Comment 3 Cristian Oneț 2011-05-28 15:05:16 UTC
*** Bug 274159 has been marked as a duplicate of this bug. ***
Comment 4 Cristian Oneț 2011-05-28 15:12:09 UTC
SVN commit 1233902 by conet:

BUG: 274308
Crash when the balance of an equity account was changed since equity accounts are not represented in the institutions model.

 M  +2 -2      accountsmodel.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1233902
Comment 5 Cristian Oneț 2011-05-31 21:41:55 UTC
*** Bug 274637 has been marked as a duplicate of this bug. ***