Bug 255135 - Kmymoney crashes during budget report displaying
Summary: Kmymoney crashes during budget report displaying
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 269637 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-24 20:15 UTC by Fabio Puddu
Modified: 2012-01-06 09:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kmy file reproducing the bug (4.74 KB, application/octet-stream)
2010-12-16 00:39 UTC, Fabio Puddu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Puddu 2010-10-24 20:15:11 UTC
Application: kmymoney (4.5.0)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-22-generic x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
Steps to reproduce:
1) create a file with subcategories and add fictional expenses
2) create a budget for the year, select the category containing the subcategories and tick "Include Subaccounts"
3) save the budget and the file
4)select the "Budget vs. Actual This Year" to display (or probably any of the "Budgeting" reports)
Kmymoney crashes
5)On reopening the kmy file the tick from "Include subaccounts" has vanished

The crash can be reproduced every time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Floating point exception
[Current thread is 1 (Thread 0x7fb1d223b760 (LWP 14510))]

Thread 2 (Thread 0x7fb1b8cc2710 (LWP 14511)):
#0  0x00007fb1ccc071d3 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fb1c7d62009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007fb1c7d6245c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007fb1cda5f1e6 in QEventDispatcherGlib::processEvents (this=0x2aea900, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:417
#4  0x00007fb1cda31a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007fb1cda31dec in QEventLoop::exec (this=0x7fb1b8cc1db0, flags=) at kernel/qeventloop.cpp:201
#6  0x00007fb1cd93c2fd in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:490
#7  0x00007fb1cda115f8 in QInotifyFileSystemWatcherEngine::run (this=0x2ac6770) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fb1cd93f27e in QThreadPrivate::start (arg=0x2ac6770) at thread/qthread_unix.cpp:266
#9  0x00007fb1cf863971 in start_thread (arg=<value optimized out>) at pthread_create.c:304
#10 0x00007fb1ccc1391d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fb1d223b760 (LWP 14510)):
[KCrash Handler]
#6  0x00007fb1d1dce720 in MyMoneyMoney::getLcd (this=0x7fffea26e990, b=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/mymoney/mymoneymoney.cpp:567
#7  0x00007fb1d1dcea1d in MyMoneyMoney::operator+ (this=<value optimized out>, _b=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/mymoney/mymoneymoney.cpp:431
#8  0x00000000005a4fa1 in operator+= (this=0x514aa10, value=...) at /build/buildd/kmymoney-4.5/obj-x86_64-linux-gnu/kmymoney/mymoneymoney.h:606
#9  reports::PivotCell::operator+= (this=0x514aa10, value=...) at /build/buildd/kmymoney-4.5/kmymoney/reports/pivotgrid.cpp:59
#10 0x000000000057fcd9 in reports::PivotTable::assignCell(QString const&, reports::ReportAccount const&, int, MyMoneyMoney, bool, bool) ()
#11 0x00000000005768f4 in reports::PivotTable::calculateBudgetMapping (this=0x4c10310) at /build/buildd/kmymoney-4.5/kmymoney/reports/pivottable.cpp:902
#12 0x000000000057ad9f in reports::PivotTable::init (this=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/reports/pivottable.cpp:169
#13 0x000000000057b567 in reports::PivotTable::PivotTable (this=0x4c10310, _config_f=...) at /build/buildd/kmymoney-4.5/kmymoney/reports/pivottable.cpp:94
#14 0x00000000004e09a1 in KReportsView::KReportTab::updateReport (this=0x392ef10) at /build/buildd/kmymoney-4.5/kmymoney/views/kreportsview.cpp:180
#15 0x00000000004e0ac2 in KReportsView::KReportTab::showEvent (this=0x7fffea26e990, event=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/views/kreportsview.cpp:158
#16 0x00007fb1ce43ec79 in QWidget::event (this=0x392ef10, event=0x7fffea270290) at kernel/qwidget.cpp:8394
#17 0x00007fb1ce3e8fdc in QApplicationPrivate::notify_helper (this=0x2450be0, receiver=0x392ef10, e=0x7fffea270290) at kernel/qapplication.cpp:4396
#18 0x00007fb1ce3eeaed in QApplication::notify (this=0x2450ae0, receiver=0x392ef10, e=0x7fffea270290) at kernel/qapplication.cpp:4277
#19 0x00007fb1d0867156 in KApplication::notify (this=0x2450ae0, receiver=0x392ef10, event=0x7fffea270290) at ../../kdeui/kernel/kapplication.cpp:310
#20 0x00007fb1cda32cdc in QCoreApplication::notifyInternal (this=0x2450ae0, receiver=0x392ef10, event=0x7fffea270290) at kernel/qcoreapplication.cpp:732
#21 0x00007fb1ce442f4a in sendEvent (this=0x39ca250) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#22 QWidgetPrivate::show_helper (this=0x39ca250) at kernel/qwidget.cpp:7367
#23 0x00007fb1ce44469a in QWidget::setVisible (this=0x392ef10, visible=<value optimized out>) at kernel/qwidget.cpp:7589
#24 0x00007fb1ce42886e in show (this=0x2d21dd0, index=1) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:487
#25 QStackedLayout::setCurrentIndex (this=0x2d21dd0, index=1) at kernel/qstackedlayout.cpp:311
#26 0x00007fb1ce87c2a3 in QTabWidgetPrivate::_q_showTab (this=0x2d217c0, index=1) at widgets/qtabwidget.cpp:734
#27 0x00007fb1ce87c560 in QTabWidget::qt_metacall (this=0x2d21570, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffea270550) at .moc/release-shared/moc_qtabwidget.cpp:142
#28 0x00007fb1d09679c5 in KTabWidget::qt_metacall (this=0x7fffea26e990, _c=QMetaObject::ReadProperty, _id=0, _a=0x0) at ./ktabwidget.moc:128
#29 0x00007fb1cda4ab27 in QMetaObject::activate (sender=0x2d230d0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3280
#30 0x00007fb1ce870d2e in QTabBar::currentChanged (this=0x7fffea26e990, _t1=1) at .moc/release-shared/moc_qtabbar.cpp:201
#31 0x00000000004ec8cc in KReportsView::qt_metacall (this=0x2cfc540, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffea270690) at /build/buildd/kmymoney-4.5/obj-x86_64-linux-gnu/kmymoney/views/kreportsview.moc:119
#32 0x00007fb1cda4ab27 in QMetaObject::activate (sender=0x2d22d30, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3280
#33 0x00007fb1ce9b4670 in QTreeWidget::itemDoubleClicked (this=0x7fffea26e990, _t1=0x40b0820, _t2=0) at .moc/release-shared/moc_qtreewidget.cpp:214
#34 0x00007fb1ce9bb95b in QTreeWidget::qt_metacall (this=0x2d22d30, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffea2707d0) at .moc/release-shared/moc_qtreewidget.cpp:151
#35 0x00007fb1cda4ab27 in QMetaObject::activate (sender=0x2d22d30, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3280
#36 0x00007fb1ce933735 in QAbstractItemView::doubleClicked (this=0x7fffea26e990, _t1=<value optimized out>) at .moc/release-shared/moc_qabstractitemview.cpp:338
#37 0x00007fb1ce983c4b in QTreeView::mouseDoubleClickEvent (this=0x2d22d30, event=0x7fffea271570) at itemviews/qtreeview.cpp:1861
#38 0x00007fb1ce43ec92 in QWidget::event (this=0x2d22d30, event=0x7fffea271570) at kernel/qwidget.cpp:8191
#39 0x00007fb1ce80a5e6 in QFrame::event (this=0x2d22d30, e=0x7fffea271570) at widgets/qframe.cpp:557
#40 0x00007fb1ce943a8b in QAbstractItemView::viewportEvent (this=0x2d22d30, event=0x7fffea271570) at itemviews/qabstractitemview.cpp:1619
#41 0x00007fb1ce981d65 in QTreeView::viewportEvent (this=0x2d22d30, event=0x7fffea271570) at itemviews/qtreeview.cpp:1256
#42 0x00007fb1cda32507 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x2d22470, event=0x7fffea271570) at kernel/qcoreapplication.cpp:847
#43 0x00007fb1ce3e8fac in QApplicationPrivate::notify_helper (this=0x2450be0, receiver=0x2d22470, e=0x7fffea271570) at kernel/qapplication.cpp:4392
#44 0x00007fb1ce3ef30e in QApplication::notify (this=0x2450ae0, receiver=0x2d22470, e=0x7fffea271570) at kernel/qapplication.cpp:3959
#45 0x00007fb1d0867156 in KApplication::notify (this=0x2450ae0, receiver=0x2d22470, event=0x7fffea271570) at ../../kdeui/kernel/kapplication.cpp:310
#46 0x00007fb1cda32cdc in QCoreApplication::notifyInternal (this=0x2450ae0, receiver=0x2d22470, event=0x7fffea271570) at kernel/qcoreapplication.cpp:732
#47 0x00007fb1ce3eddbe in sendEvent (receiver=0x2d22470, event=0x7fffea271570, alienWidget=0x2d22470, nativeWidget=0x2cfc540, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#48 QApplicationPrivate::sendMouseEvent (receiver=0x2d22470, event=0x7fffea271570, alienWidget=0x2d22470, nativeWidget=0x2cfc540, buttonDown=<value optimized out>, lastMouseReceiver=<value optimized out>, spontaneous=true) at kernel/qapplication.cpp:3058
#49 0x00007fb1ce471345 in QETWidget::translateMouseEvent (this=0x2cfc540, event=<value optimized out>) at kernel/qapplication_x11.cpp:4403
#50 0x00007fb1ce46fc5c in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffea271e90) at kernel/qapplication_x11.cpp:3536
#51 0x00007fb1ce49c0e2 in x11EventSourceDispatch (s=0x24549d0, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#52 0x00007fb1c7d5e342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#53 0x00007fb1c7d622a8 in ?? () from /lib/libglib-2.0.so.0
#54 0x00007fb1c7d6245c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#55 0x00007fb1cda5f193 in QEventDispatcherGlib::processEvents (this=0x242fe90, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#56 0x00007fb1ce49ba4e in QGuiEventDispatcherGlib::processEvents (this=0x7fffea26e990, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#57 0x00007fb1cda31a02 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#58 0x00007fb1cda31dec in QEventLoop::exec (this=0x7fffea2721c0, flags=) at kernel/qeventloop.cpp:201
#59 0x00007fb1cda35ebb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#60 0x0000000000452d58 in main (argc=<value optimized out>, argv=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/main.cpp:260

Reported using DrKonqi
Comment 1 Alvaro Soliverez 2010-11-14 05:04:09 UTC
Please run a consistency check of your file.

That's an option on the Tools menu.
Comment 2 Fabio Puddu 2010-11-16 23:46:05 UTC
The consistency check reports "Finished: data is consistent"
Comment 3 Cristian Oneț 2010-11-17 11:49:24 UTC
Can you attach the anonymous file version to reproduce this? It really speeds up fixing cases like this if we don't need to waste time trying to create the setup to reproduce it. Thanks!
Comment 4 Thomas Baumgart 2010-12-12 10:23:07 UTC
We're still waiting for a demo file. I was also unable to reproduce this problem. There must be something special you are doing that we don't.

Analysis of the BT: the problem is, that there is a denominator of 0 somewhere in the data which triggers getLcd to be invoked. This fails, because it divides by zero in that case.

Either provide a file or check if there is the text "/0" somewhere in a shares or value attribute in your file. Until then, I set the status to wait for info.
Comment 5 Fabio Puddu 2010-12-16 00:39:29 UTC
Created attachment 54813 [details]
kmy file reproducing the bug

Hi guys,
sorry for not having replied more rapidly.
Here is an anonymous file which on my machine reproduces the bug.
You have to go to budget, check "include subacccounts" on expense:"category 1", save the budget, save the file, go to reports, select "Budgeting", "Budgeting vs Actual this year (YTM)" and.... crash. On reopening it seems like the file was never saved, as the "include subaccounts" is not checked.
Hope this will be useful, 
fabio
Comment 6 Thomas Baumgart 2010-12-21 14:18:20 UTC
SVN commit 1208388 by tbaumgart:

Don't allow to select budgets if they are included by a superior account. We still need to add logic to support multiple currencies. I left a TODO mark in the code.

BUG: 255135

 M  +80 -3     kbudgetview.cpp  
 M  +3 -0      kbudgetview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1208388
Comment 7 Thomas Baumgart 2010-12-21 15:34:11 UTC
SVN commit 1208404 by tbaumgart:

Don't allow to select budgets if they are included by a superior account. We still need to add logic to support multiple currencies. I left a TODO mark in the code.

Backported to stable branch

BUG: 255135

 M  +80 -3     kbudgetview.cpp  
 M  +3 -0      kbudgetview.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1208404
Comment 8 Cristian Oneț 2012-01-06 09:49:30 UTC
*** Bug 269637 has been marked as a duplicate of this bug. ***