Bug 221572 - crash after opening and on saving older kmymoney data file containing custom report
Summary: crash after opening and on saving older kmymoney data file containing custom ...
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 303558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-06 21:17 UTC by Thomas Bettler
Modified: 2014-11-05 11:40 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Konsole output from opening file and then closing (34.94 KB, text/plain)
2010-05-03 10:24 UTC, John Hudson
Details
Console output from opening, adding a payee, adding a transaction and closing (61.91 KB, text/plain)
2010-05-03 10:25 UTC, John Hudson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bettler 2010-01-06 21:17:31 UTC
Application that crashed: kmymoney
Version of the application: 3.95.0-svn20090511
KDE Version: 4.3.4 (KDE 4.3.4)
Qt Version: 4.6.0
Operating System: Linux 2.6.32-gentoo-r1 i686

What I was doing when the application crashed:
I have a file containing a cutom report.
On opening and saving again kmymoney4 crashes. (see attached dump)

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

Thread 3 (Thread 0xafbd8b90 (LWP 8865)):
#0  0xb780b424 in __kernel_vsyscall ()
#1  0xb65c0fa2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb5c36a91 in QWaitConditionPrivate::wait (this=0x91cdf34, mutex=0x91cdf30, time=30000) at thread/qwaitcondition_unix.cpp:85
#3  QWaitCondition::wait (this=0x91cdf34, mutex=0x91cdf30, time=30000) at thread/qwaitcondition_unix.cpp:159
#4  0xb5c2b478 in QThreadPoolThread::run (this=0x90887f8) at concurrent/qthreadpool.cpp:140
#5  0xb5c35aa0 in QThreadPrivate::start (arg=0x90887f8) at thread/qthread_unix.cpp:244
#6  0xb65bd15f in start_thread () from /lib/libpthread.so.0
#7  0xb5128c0e in clone () from /lib/libc.so.6

Thread 2 (Thread 0xaf1ffb90 (LWP 8883)):
#0  0xb780b424 in __kernel_vsyscall ()
#1  0xb65c0fa2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb5c36a91 in QWaitConditionPrivate::wait (this=0x91cdf34, mutex=0x91cdf30, time=30000) at thread/qwaitcondition_unix.cpp:85
#3  QWaitCondition::wait (this=0x91cdf34, mutex=0x91cdf30, time=30000) at thread/qwaitcondition_unix.cpp:159
#4  0xb5c2b478 in QThreadPoolThread::run (this=0x91cfc50) at concurrent/qthreadpool.cpp:140
#5  0xb5c35aa0 in QThreadPrivate::start (arg=0x91cfc50) at thread/qthread_unix.cpp:244
#6  0xb65bd15f in start_thread () from /lib/libpthread.so.0
#7  0xb5128c0e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb4824700 (LWP 8862)):
[KCrash Handler]
#6  0xb780b424 in __kernel_vsyscall ()
#7  0xb5084660 in raise () from /lib/libc.so.6
#8  0xb5085e98 in abort () from /lib/libc.so.6
#9  0xb5c2c959 in qt_message_output (msgType=QtFatalMsg, buf=0xad0fee50 "ASSERT failure in QList<T>::operator[]: \"index out of range\", file /usr/include/qt4/QtCore/qlist.h, line 443")
    at global/qglobal.cpp:2226
#10 0xb5c2caf2 in qt_message (msgType=QtFatalMsg, msg=0xb5da9c10 "ASSERT failure in %s: \"%s\", file %s, line %d", ap=0xbf8bed64 "\030u~\267\005u~\267\304t~\267\273\001") at global/qglobal.cpp:2272
#11 0xb5c2cbfd in qFatal (msg=0xb5da9c10 "ASSERT failure in %s: \"%s\", file %s, line %d") at global/qglobal.cpp:2455
#12 0xb5c2cc3e in qt_assert_x (where=0xb77e7518 "QList<T>::operator[]", what=0xb77e7505 "index out of range", file=0xb77e74c4 "/usr/include/qt4/QtCore/qlist.h", line=443) at global/qglobal.cpp:1997
#13 0xb77bf5bd in QList<QString>::operator[] (this=0xb7809bc0, i=-1256611520) at /usr/include/qt4/QtCore/qlist.h:443
#14 0xb77b8221 in MyMoneyReport::write (this=0xad0fcff8, e=..., doc=0xaf2059d8, anonymous=false)
    at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0/kmymoney/mymoney/mymoneyreport.cpp:350
#15 0xb77ba07d in MyMoneyReport::writeXML (this=0x0, document=..., parent=...) at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0/kmymoney/mymoney/mymoneyreport.cpp:777
#16 0x08379b66 in MyMoneyStorageXML::writeReports (this=0x8f6c008, parent=...) at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0/kmymoney/mymoney/storage/mymoneystoragexml.cpp:753
#17 0x0837c8a7 in MyMoneyStorageXML::writeFile (this=0x8f6c008, qf=0x9b24dc8, storage=0xbf8bf1c0)
    at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0/kmymoney/mymoney/storage/mymoneystoragexml.cpp:489
#18 0x080e5daf in KMyMoneyView::saveToLocalFile (this=0x8d2e0e0, localFile=..., pWriter=0x8f6c008, plaintext=false, keyList=...)
    at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0/kmymoney/views/kmymoneyview.cpp:1061
#19 0x080e7296 in KMyMoneyView::saveFile (this=0x8d2e0e0, url=..., keyList=...) at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0/kmymoney/views/kmymoneyview.cpp:1134
#20 0x080b6a82 in KMyMoney2App::slotFileSaveAs (this=0x8c5b578) at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0/kmymoney/kmymoney.cpp:1646
#21 0x080c7266 in KMyMoney2App::qt_metacall (this=0x8c5b578, _c=QMetaObject::InvokeMetaMethod, _id=107, _a=0xbf8bfaa0)
    at /var/tmp/portage/app-office/kmymoney-3.95.0/work/kmymoney-3.95.0_build/kmymoney/kmymoney.moc:494
#22 0xb5d445e7 in QMetaObject::metacall (object=0x8c5b578, cl=QMetaObject::InvokeMetaMethod, idx=153, argv=0xbf8bfaa0) at kernel/qmetaobject.cpp:237
#23 0xb5d52b35 in QMetaObject::activate (sender=0x8c8de80, m=0xb5bb1078, local_signal_index=1, argv=0xbf8bfaa0) at kernel/qobject.cpp:3286
#24 0xb53e3799 in QAction::triggered (this=0x8c8de80, _t1=false) at .moc/debug-shared/moc_qaction.cpp:263
#25 0xb53e483c in QAction::activate (this=0x8c8de80, event=QAction::Trigger) at kernel/qaction.cpp:1245
#26 0xb585c4ed in QMenuPrivate::activateCausedStack (this=0x8d0a588, causedStack=..., action=0x8c8de80, action_e=QAction::Trigger, self=true) at widgets/qmenu.cpp:994
#27 0xb586346a in QMenuPrivate::activateAction (this=0x8d0a588, action=0x8c8de80, action_e=QAction::Trigger, self=<value optimized out>) at widgets/qmenu.cpp:1086
#28 0xb5863e9a in QMenu::mouseReleaseEvent (this=0x8d0a568, e=0xbf8c048c) at widgets/qmenu.cpp:2307
#29 0xb6c43a4a in KMenu::mouseReleaseEvent (this=0x8d0a568, e=0xbf8c048c) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/kdeui/widgets/kmenu.cpp:456
#30 0xb5449258 in QWidget::event (this=0x8d0a568, event=0xbf8c048c) at kernel/qwidget.cpp:7974
#31 0xb5864382 in QMenu::event (this=0x8d0a568, e=0xbf8c048c) at widgets/qmenu.cpp:2406
#32 0xb53ea32c in QApplicationPrivate::notify_helper (this=0x8bb7310, receiver=0x8d0a568, e=0xbf8c048c) at kernel/qapplication.cpp:4242
#33 0xb53f2894 in QApplication::notify (this=0x8bb71e8, receiver=0x8d0a568, e=0xbf8c048c) at kernel/qapplication.cpp:3822
#34 0xb6b788c1 in KApplication::notify (this=0x8bb71e8, receiver=0x8d0a568, event=0xbf8c048c) at /var/tmp/portage/kde-base/kdelibs-4.3.4/work/kdelibs-4.3.4/kdeui/kernel/kapplication.cpp:302
#35 0xb5d3dec8 in QCoreApplication::notifyInternal (this=0x8bb71e8, receiver=0x8d0a568, event=0xbf8c048c) at kernel/qcoreapplication.cpp:704
#36 0xb53f562a in QCoreApplication::sendEvent (receiver=0x8d0a568, event=0xbf8c048c, alienWidget=0x0, nativeWidget=0x8d0a568, buttonDown=0xb5bcc080, lastMouseReceiver=..., spontaneous=true)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#37 QApplicationPrivate::sendMouseEvent (receiver=0x8d0a568, event=0xbf8c048c, alienWidget=0x0, nativeWidget=0x8d0a568, buttonDown=0xb5bcc080, lastMouseReceiver=..., spontaneous=true)
    at kernel/qapplication.cpp:2956
#38 0xb546fd85 in QETWidget::translateMouseEvent (this=0x8d0a568, event=0xbf8c08fc) at kernel/qapplication_x11.cpp:4302
#39 0xb546ef7d in QApplication::x11ProcessEvent (this=0x8bb71e8, event=0xbf8c08fc) at kernel/qapplication_x11.cpp:3379
#40 0xb54981dc in x11EventSourceDispatch (s=0x8bba540, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#41 0xb4f9e54e in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#42 0x08bb9694 in ?? ()
#43 0x08bba540 in ?? ()
#44 0xb50363b8 in ?? () from /usr/lib/libglib-2.0.so.0
#45 0xb50363e0 in ?? () from /usr/lib/libglib-2.0.so.0
#46 0xb5497e60 in QGuiEventDispatcherGlibPrivate (this=0x0) at kernel/qguieventdispatcher_glib.cpp:181
#47 0x00000000 in ?? ()

Reported using DrKonqi
Comment 1 Thomas Baumgart 2010-01-07 16:50:25 UTC
Can you send us the output of the following command:

  zgrep charttype your-kmymoney-file-name-here

or in case you use GPG encryption:

  gpg -d your-kmymoney-file-name-here | grep charttype

The problem you reported is somehow linked to a chart type which is out of bounds (frames #12-#14 of your backtrace)
Comment 2 Thomas Bettler 2010-01-10 17:20:07 UTC
output as requested:

 <REPORTS count="1">
  <REPORT includesprice="0" includesactuals="0" columnsaredays="0" includestransfers="0" loans="0" id="R000001" comment="Custom Report" columntype="months" rowtype="expenseincome" name="Income and Expenses Last Month (Customized)" chartgridlines="1" includesaverageprice="0" includesmovingaverage="0" chartbydefault="0" datelock="lastmonth" investments="0" charttype="none" favorite="1" showrowtotals="1" chartdatalabels="1" convertcurrency="1" chartlinewidth="2" detail="all" includeschedules="0" tax="0" group="Income and Expenses" includesforecast="0" includeunused="0" type="pivottable 1.15">
   <ACCOUNTGROUP group="expense"/>
   <ACCOUNTGROUP group="income"/>
  </REPORT>
 </REPORTS>
Comment 3 KMyMoney Devel Mailing List 2010-01-18 11:37:09 UTC
The charttype is none, which shouldn't happen in this case. Weird thing is, reports are not loaded on startup, so it shouldn't crash.

Can you try starting with kmymoney -n and then disabling all components in the Home Page (Go to Configure KMyMoney -> Home)
Comment 4 KMyMoney Devel Mailing List 2010-02-04 10:48:30 UTC
Can you confirm if this still happens with the latest SVN?
Comment 5 Thomas Bettler 2010-02-10 21:31:48 UTC
Sorry for not being able to respond for this time. My system is currently down while waiting for migration, but the new hardware hasn't arrived yet.
I will be able to respond in a few weeks. Sorry for having to wait until then.
Comment 6 Thomas Baumgart 2010-03-20 16:56:11 UTC
This is just a reminder. Did you have a chance to see if it still fails with a current SVN version?
Comment 7 John Hudson 2010-05-01 07:45:57 UTC
KDE4.3.5 KMyMoney 3.97.2 OpenSUSE

After entering bug 235880 re automatic entry of scheduled transactions, I tried to re-open KMyMoney and it froze twice at 'Loading reports.' I have plenty of custom reports but it did not freeze after I installed it last night, only after the first transactions had been entered this morning.
Comment 8 Thomas Baumgart 2010-05-01 09:58:52 UTC
SVN commit 1121414 by tbaumgart:

Avoid crash in case of a weird chart type setting.

Please start the application from the console and monitor the output while running this version against a file that caused the crash for the first time. I am interested in the console output during read and write operations.

BUG: 221572

 M  +8 -3      mymoneyreport.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1121414
Comment 9 John Hudson 2010-05-03 10:24:27 UTC
Created attachment 43182 [details]
Konsole output from opening file and then closing
Comment 10 John Hudson 2010-05-03 10:25:38 UTC
Created attachment 43183 [details]
Console output from opening, adding a payee, adding a transaction and closing
Comment 11 Thomas Baumgart 2010-05-03 10:52:52 UTC
Does it still fail? I don't see any of the debug messages I put into the latest SVN which should trigger in case of problems. Can you comment on the behavior of the application (crash/lockup/etc) while creating those two console traces a bit? TIA.
Comment 12 John Hudson 2010-05-03 12:09:26 UTC
No, KMyMoney did not fail in any way on these two occasions when I used a copy of the accounts file I had backed up on a different computer. The behaviour was completely different from when I ran it on my main computer with the original file. The only thing I did not do this time was try to open a custom report on the backup computer. In theory both computers are running exactly the same versions of openSUSE and KDE though my backup has fewer programs installed; so there may have been a conflict with something else on my main computer which is not present on the backup.
Comment 13 Cristian Oneț 2014-11-05 11:40:17 UTC
*** Bug 303558 has been marked as a duplicate of this bug. ***