Bug 280740

Summary: KMyMoney crashes when deleting an account
Product: [Applications] kmymoney Reporter: Vale <valdz>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: crash CC: agander93
Priority: NOR    
Version: 4.5.3   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Anonimous

Description Vale 2011-08-24 22:03:01 UTC
Application: kmymoney (4.5.3)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-10-generic i686
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed: KMyMoney crashes when I try to cancel an empty activity account (made with an old version)

The crash can be reproduced every time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Aborted
[Current thread is 1 (Thread 0xb775c930 (LWP 2560))]

Thread 2 (Thread 0xb26e2b70 (LWP 2561)):
#0  0x0026e7a4 in __pthread_mutex_unlock_usercnt () from /lib/i386-linux-gnu/libpthread.so.0
#1  0x0534454c in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0x05693577 in QEventDispatcherGlib::processEvents (this=0x8d4be58, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#3  0x05665289 in QEventLoop::processEvents (this=0xb26e2290, flags=...) at kernel/qeventloop.cpp:149
#4  0x05665522 in QEventLoop::exec (this=0xb26e2290, flags=...) at kernel/qeventloop.cpp:201
#5  0x0556f2a0 in QThread::exec (this=0x8e15bd8) at thread/qthread.cpp:492
#6  0x05646fdb in QInotifyFileSystemWatcherEngine::run (this=0x8e15bd8) at io/qfilesystemwatcher_inotify.cpp:248
#7  0x05571da2 in QThreadPrivate::start (arg=0x8e15bd8) at thread/qthread_unix.cpp:320
#8  0x0026ae99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#9  0x0248673e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb775c930 (LWP 2560)):
[KCrash Handler]
#7  0x00ba4416 in __kernel_vsyscall ()
#8  0x023e0e71 in raise () from /lib/i386-linux-gnu/libc.so.6
#9  0x023e434e in abort () from /lib/i386-linux-gnu/libc.so.6
#10 0x026b90b5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#11 0x026b6fa5 in ?? () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#12 0x026b6fe2 in std::terminate() () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#13 0x026b71ab in __cxa_rethrow () from /usr/lib/i386-linux-gnu/libstdc++.so.6
#14 0x0567c920 in QMetaObject::activate (sender=0x8a1c708, m=0x1ea03f8, local_signal_index=1, argv=0xbfb06bc8) at kernel/qobject.cpp:3297
#15 0x015668d9 in QAction::triggered (this=0x8a1c708, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#16 0x01566b38 in QAction::activate (this=0x8a1c708, event=QAction::Trigger) at kernel/qaction.cpp:1257
#17 0x019fb33d in QMenuPrivate::activateCausedStack (this=0x8b32ca0, causedStack=..., action=0x8a1c708, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:993
#18 0x01a01bfb in QMenuPrivate::activateAction (this=0x8b32ca0, action=0x8a1c708, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:1085
#19 0x01a02a8e in QMenu::mouseReleaseEvent (this=0x8b32c40, e=0xbfb07464) at widgets/qmenu.cpp:2306
#20 0x009d6cf4 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libkdeui.so.5
#21 0x015c613a in QWidget::event (this=0x8b32c40, event=0xbfb07464) at kernel/qwidget.cpp:8259
#22 0x01a02f67 in QMenu::event (this=0x8b32c40, e=0xbfb07464) at widgets/qmenu.cpp:2415
#23 0x0156dd24 in QApplicationPrivate::notify_helper (this=0x89110f0, receiver=0x8b32c40, e=0xbfb07464) at kernel/qapplication.cpp:4462
#24 0x01573201 in QApplication::notify (this=0x890e270, receiver=0x8b32c40, e=0xbfb07464) at kernel/qapplication.cpp:4023
#25 0x008f93ca in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#26 0x056660bb in QCoreApplication::notifyInternal (this=0x890e270, receiver=0x8b32c40, event=0xbfb07464) at kernel/qcoreapplication.cpp:731
#27 0x0156ec3b in sendSpontaneousEvent (receiver=0x8b32c40, event=0xbfb07464, alienWidget=0x0, nativeWidget=0x8b32c40, buttonDown=0x1ebcc60, lastMouseReceiver=..., spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#28 QApplicationPrivate::sendMouseEvent (receiver=0x8b32c40, event=0xbfb07464, alienWidget=0x0, nativeWidget=0x8b32c40, buttonDown=0x1ebcc60, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3120
#29 0x015fa253 in QETWidget::translateMouseEvent (this=0x8b32c40, event=0xbfb0798c) at kernel/qapplication_x11.cpp:4492
#30 0x015f89b5 in QApplication::x11ProcessEvent (this=0x890e270, event=0xbfb0798c) at kernel/qapplication_x11.cpp:3680
#31 0x016245f4 in x11EventSourceDispatch (s=0x89153a8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#32 0x05343aa8 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#33 0x05344270 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#34 0x05344524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#35 0x0569353c in QEventDispatcherGlib::processEvents (this=0x88d5aa8, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#36 0x016241e5 in QGuiEventDispatcherGlib::processEvents (this=0x88d5aa8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#37 0x05665289 in QEventLoop::processEvents (this=0xbfb07c60, flags=...) at kernel/qeventloop.cpp:149
#38 0x05665522 in QEventLoop::exec (this=0xbfb07c60, flags=...) at kernel/qeventloop.cpp:201
#39 0x019ff051 in QMenu::exec (this=0x8b32c40, p=..., action=0x0) at widgets/qmenu.cpp:2059
#40 0x080978b7 in KMyMoneyApp::showContextMenu (this=0x89d7c40, containerName=...) at /build/buildd/kmymoney-4.5.3/kmymoney/kmymoney.cpp:5684
#41 0x08097b40 in KMyMoneyApp::slotShowAccountContextMenu (this=0x89d7c40, obj=...) at /build/buildd/kmymoney-4.5.3/kmymoney/kmymoney.cpp:5723
#42 0x080d59c3 in KMyMoneyApp::qt_metacall (this=0x89d7c40, _c=QMetaObject::InvokeMetaMethod, _id=144, _a=0xbfb08078) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/kmymoney.moc:553
#43 0x0566c6ba in QMetaObject::metacall (object=0x89d7c40, cl=QMetaObject::InvokeMetaMethod, idx=190, argv=0xbfb08078) at kernel/qmetaobject.cpp:237
#44 0x0567c4ff in QMetaObject::activate (sender=0x8cc58e8, m=0x861fc54, local_signal_index=1, argv=0xbfb08078) at kernel/qobject.cpp:3287
#45 0x0812c4f3 in KAccountsView::openContextMenu (this=0x8cc58e8, _t1=...) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/views/kaccountsview.moc:152
#46 0x081317ed in KAccountsView::qt_metacall (this=0x8cc58e8, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbfb081d8) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/views/kaccountsview.moc:115
#47 0x0566c6ba in QMetaObject::metacall (object=0x8cc58e8, cl=QMetaObject::InvokeMetaMethod, idx=28, argv=0xbfb081d8) at kernel/qmetaobject.cpp:237
#48 0x0567c4ff in QMetaObject::activate (sender=0x8cc57d8, m=0x8621214, local_signal_index=1, argv=0xbfb081d8) at kernel/qobject.cpp:3287
#49 0x081e5cd3 in KMyMoneyAccountTreeView::openContextMenu (this=0x8cc57d8, _t1=...) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/widgets/kmymoneyaccounttreeview.moc:119
#50 0x081e668f in KMyMoneyAccountTreeView::customContextMenuRequested (this=0x8cc57d8, pos=...) at /build/buildd/kmymoney-4.5.3/kmymoney/widgets/kmymoneyaccounttreeview.cpp:99
#51 0x081e7945 in KMyMoneyAccountTreeView::qt_metacall (this=0x8cc57d8, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbfb08588) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/widgets/kmymoneyaccounttreeview.moc:99
#52 0x0566c6ba in QMetaObject::metacall (object=0x8cc57d8, cl=QMetaObject::InvokeMetaMethod, idx=96, argv=0xbfb08588) at kernel/qmetaobject.cpp:237
#53 0x0567c4ff in QMetaObject::activate (sender=0x8cc57d8, m=0x1ea13a8, local_signal_index=0, argv=0xbfb08588) at kernel/qobject.cpp:3287
#54 0x015bc183 in QWidget::customContextMenuRequested (this=0x8cc57d8, _t1=...) at .moc/release-shared/moc_qwidget.cpp:360
#55 0x015c6cb9 in QWidget::event (this=0x8cc57d8, event=0xbfb08e4c) at kernel/qwidget.cpp:8429
#56 0x019ba9f3 in QFrame::event (this=0x8cc57d8, e=0xbfb08e4c) at widgets/qframe.cpp:557
#57 0x01a49062 in QAbstractScrollArea::viewportEvent (this=0x8cc57d8, e=0xbfb08e4c) at widgets/qabstractscrollarea.cpp:1043
#58 0x01ae8227 in QAbstractItemView::viewportEvent (this=0x8cc57d8, event=0xbfb08e4c) at itemviews/qabstractitemview.cpp:1628
#59 0x01b2fe83 in QTreeView::viewportEvent (this=0x8cc57d8, event=0xbfb08e4c) at itemviews/qtreeview.cpp:1256
#60 0x01a4b965 in viewportEvent (this=0x8cc5298, o=0x8cc6bf0, e=0xbfb08e4c) at widgets/qabstractscrollarea_p.h:100
#61 QAbstractScrollAreaFilter::eventFilter (this=0x8cc5298, o=0x8cc6bf0, e=0xbfb08e4c) at widgets/qabstractscrollarea_p.h:116
#62 0x0566625a in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=0x89110f0, receiver=0x8cc6bf0, event=0xbfb08e4c) at kernel/qcoreapplication.cpp:846
#63 0x0156dd00 in QApplicationPrivate::notify_helper (this=0x89110f0, receiver=0x8cc6bf0, e=0xbfb08e4c) at kernel/qapplication.cpp:4458
#64 0x01572c62 in QApplication::notify (this=0x890e270, receiver=0x8cc6bf0, e=0xbfb08e4c) at kernel/qapplication.cpp:4102
#65 0x008f93ca in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#66 0x056660bb in QCoreApplication::notifyInternal (this=0x890e270, receiver=0x8cc6bf0, event=0xbfb08e4c) at kernel/qcoreapplication.cpp:731
#67 0x015fa0d3 in sendSpontaneousEvent (this=0x8cc58e8, event=0xbfb0934c) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#68 QETWidget::translateMouseEvent (this=0x8cc58e8, event=0xbfb0934c) at kernel/qapplication_x11.cpp:4563
#69 0x015f89b5 in QApplication::x11ProcessEvent (this=0x890e270, event=0xbfb0934c) at kernel/qapplication_x11.cpp:3680
#70 0x016245f4 in x11EventSourceDispatch (s=0x89153a8, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#71 0x05343aa8 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#72 0x05344270 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#73 0x05344524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#74 0x0569353c in QEventDispatcherGlib::processEvents (this=0x88d5aa8, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#75 0x016241e5 in QGuiEventDispatcherGlib::processEvents (this=0x88d5aa8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#76 0x05665289 in QEventLoop::processEvents (this=0xbfb09614, flags=...) at kernel/qeventloop.cpp:149
#77 0x05665522 in QEventLoop::exec (this=0xbfb09614, flags=...) at kernel/qeventloop.cpp:201
#78 0x05669ecc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#79 0x0156b8e7 in QApplication::exec () at kernel/qapplication.cpp:3736
#80 0x08086c4f in main (argc=) at /build/buildd/kmymoney-4.5.3/kmymoney/main.cpp:260

Possible duplicates by query: bug 277852, bug 277531, bug 276390, bug 274169, bug 270608.

Reported using DrKonqi
Comment 1 Cristian Oneț 2011-08-25 16:36:25 UTC
Could you try this with the latest version (4.6.0) or could you attach an anonymous file to reproduce this? Thanks.
Comment 2 Vale 2011-08-25 18:45:14 UTC
Thank you for your answer. Yes, I can try but I don't know how to make upgrade...
Comment 3 Cristian Oneț 2011-08-25 19:07:58 UTC
Then you could try to crate an anonymous file like described here
http://kmymoney2.sourceforge.net/kde4/online-manual/details.formats.anonymous.html

After you reproduce the bug with that file attach the file with a few instructions on what to do to reproduce the crash. Thanks.
Comment 4 Vale 2011-08-25 21:50:36 UTC
Created attachment 63146 [details]
Anonimous
Comment 5 Vale 2011-08-25 22:03:38 UTC
Sorry but I don't know how I can upgrade my version 4.5.3 to 4.6.0
Anyway I have made an anonymous xml with my file. The crash occur everytime  i try to cancel an empty "Asset account". Thanks.
Comment 6 allan 2011-08-25 23:29:04 UTC
(In reply to comment #5)
> Sorry but I don't know how I can upgrade my version 4.5.3 to 4.6.0

As you are on Ubuntu, all you need to do is add the Claydoh PPA to your sources.  Search for ubuntu Claydoh and you will find the procedure to use, which is fairly straight forward.  If you decide to go that route, first of all deinstall your existing version.
Comment 7 Cristian Oneț 2011-08-26 05:16:43 UTC
With the help of the file you provided I can confirm that the bug is there in the latest version also so there is no need for you to try to upgrade. Now that it's reproducible it shouldn't take long to fix it.
Comment 8 Cristian Oneț 2011-08-26 17:49:06 UTC
SVN commit 1249592 by conet:

BUG: 280740
During the 'Consistency check' check that the child accounts are consistent (the parent they know is the account that contains them in their child list).

 M  +3 -0      mymoneyfile.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1249592
Comment 9 Cristian Oneț 2011-08-26 17:50:10 UTC
SVN commit 1249593 by conet:

BUG: 280740
During the 'Consistency check' check that the child accounts are consistent (the parent they know is the account that contains them in their child list).
Backported to the stable branch.

 M  +3 -0      mymoneyfile.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1249593
Comment 10 Cristian Oneț 2011-08-26 17:53:48 UTC
When the new version comes out you can delete the account after running a consistency check, or saving the file which, in turn, runs the same consistency check.

If you would like a workaround until you get the latest version you'll need to edit the xml file and look for ACCOUNT with id="A000001" and delete 
<SUBACCOUNT id="A000121"/>.