Bug 274656 - KMoney4 crashes trying to open file saved in KMYMoney1
Summary: KMoney4 crashes trying to open file saved in KMYMoney1
Status: RESOLVED DUPLICATE of bug 256282
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 4.5.3
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 04:50 UTC by Wayne Harris
Modified: 2011-06-02 03:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wayne Harris 2011-06-01 04:50:27 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-8-generic i686
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed: I upgraded from Ubuntu 10.04/KMyMoney1 to Ubuntu 11.04/KMyMoney4. When I try to open the kmy file saved in KMyMoney1, KMyMoney4 crashes and gives me the floating point error message. This happens on both my 64-bit PC and 32-bit netbook. KMyMoney has always been a bit funky on Ubuntu/Gnome. In KMyMoney1, hitting the Accounts icon in the left column would cause a crash. But this bug is infinitely worse. I have three and a half years of financial data in that kmy file and am looking forward to a fix.

The crash can be reproduced every time.

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

Thread 3 (Thread 0xb7677b70 (LWP 1775)):
#0  0x0049f416 in __kernel_vsyscall ()
#1  0x02f68f76 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0x06a4484b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x06a341af in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x06a3492b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x01f91304 in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0x06a5d2df in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0x00946e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#8  0x02f7773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 2 (Thread 0xb6cffb70 (LWP 1796)):
#0  0x0094a851 in pthread_mutex_unlock () from /lib/i386-linux-gnu/libpthread.so.0
#1  0x06a32fc2 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#2  0x06a33e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x06a34524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x04ad1577 in QEventDispatcherGlib::processEvents (this=0x9228d58, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#5  0x04aa3289 in QEventLoop::processEvents (this=0xb6cff290, flags=...) at kernel/qeventloop.cpp:149
#6  0x04aa3522 in QEventLoop::exec (this=0xb6cff290, flags=...) at kernel/qeventloop.cpp:201
#7  0x049ad2a0 in QThread::exec (this=0x92230d8) at thread/qthread.cpp:492
#8  0x04a84fdb in QInotifyFileSystemWatcherEngine::run (this=0x92230d8) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x049afda2 in QThreadPrivate::start (arg=0x92230d8) at thread/qthread_unix.cpp:320
#10 0x00946e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#11 0x02f7773e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb78a4930 (LWP 1771)):
[KCrash Handler]
#7  0x00926ce3 in __moddi3 () from /lib/i386-linux-gnu/libgcc_s.so.1
#8  0x001233e1 in MyMoneyMoney::convert (this=0xbf9c8f08, _denom=10000, how=MyMoneyMoney::RndRound) at /build/buildd/kmymoney-4.5.3/kmymoney/mymoney/mymoneymoney.cpp:653
#9  0x084132a9 in AccountsModel::Private::value (this=0x8baaa90, account=..., balance=...) at /build/buildd/kmymoney-4.5.3/kmymoney/models/accountsmodel.cpp:252
#10 0x08413d02 in AccountsModel::Private::setAccountData (this=0x8baaa90, model=0x8baa8f0, index=..., account=...) at /build/buildd/kmymoney-4.5.3/kmymoney/models/accountsmodel.cpp:114
#11 0x08415f8c in AccountsModel::Private::loadInstitution (this=0x8baaa90, model=0x8baa8f0, account=...) at /build/buildd/kmymoney-4.5.3/kmymoney/models/accountsmodel.cpp:360
#12 0x08416fd0 in AccountsModel::Private::loadSubAccounts (this=0x8baaa90, model=0x8baa8f0, accountsItem=0x99306f0, favoriteAccountsItem=0x8f9f2c0, list=...) at /build/buildd/kmymoney-4.5.3/kmymoney/models/accountsmodel.cpp:67
#13 0x0840d5d6 in loadSubAccounts (this=0x8baa8f0) at /build/buildd/kmymoney-4.5.3/kmymoney/models/accountsmodel.cpp:80
#14 AccountsModel::load (this=0x8baa8f0) at /build/buildd/kmymoney-4.5.3/kmymoney/models/accountsmodel.cpp:571
#15 0x08417df3 in Models::dataChanged (this=0x863d574) at /build/buildd/kmymoney-4.5.3/kmymoney/models/models.cpp:79
#16 0x08417fa1 in Models::qt_metacall (this=0x863d574, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0xbf9c9f7c) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/models/moc_models.cpp:73
#17 0x04aaa6ba in QMetaObject::metacall (object=0x863d574, cl=QMetaObject::InvokeMetaMethod, idx=4, argv=0xbf9c9f7c) at kernel/qmetaobject.cpp:237
#18 0x04aba4ff in QMetaObject::activate (sender=0x1b556c, m=0x1b4bec, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3287
#19 0x0014e0c7 in MyMoneyFile::dataChanged (this=0x1b556c) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/mymoney/mymoneyfile.moc:83
#20 0x080fcd29 in forceDataChanged (this=0x8ba6248) at /build/buildd/kmymoney-4.5.3/kmymoney/mymoney/storage/../mymoneyfile.h:1366
#21 KMyMoneyView::initializeStorage (this=0x8ba6248) at /build/buildd/kmymoney-4.5.3/kmymoney/views/kmymoneyview.cpp:992
#22 0x080fe4ab in KMyMoneyView::readFile (this=0x8ba6248, url=...) at /build/buildd/kmymoney-4.5.3/kmymoney/views/kmymoneyview.cpp:805
#23 0x080ca756 in KMyMoneyApp::slotFileOpenRecent (this=0x8a920f0, url=...) at /build/buildd/kmymoney-4.5.3/kmymoney/kmymoney.cpp:1503
#24 0x080cb564 in KMyMoneyApp::slotFileOpen (this=0x8a920f0) at /build/buildd/kmymoney-4.5.3/kmymoney/kmymoney.cpp:1408
#25 0x080d56d1 in KMyMoneyApp::qt_metacall (this=0x8a920f0, _c=QMetaObject::InvokeMetaMethod, _id=110, _a=0xbf9ca958) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/kmymoney.moc:513
#26 0x04aaa6ba in QMetaObject::metacall (object=0x8a920f0, cl=QMetaObject::InvokeMetaMethod, idx=156, argv=0xbf9ca958) at kernel/qmetaobject.cpp:237
#27 0x04aba4ff in QMetaObject::activate (sender=0x8abd208, m=0x77113f8, local_signal_index=1, argv=0xbf9ca958) at kernel/qobject.cpp:3287
#28 0x06dd98d9 in QAction::triggered (this=0x8abd208, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#29 0x06dd9b38 in QAction::activate (this=0x8abd208, event=QAction::Trigger) at kernel/qaction.cpp:1257
#30 0x072b4252 in trigger (this=0x8b307d0) at ../../include/QtGui/../../src/gui/kernel/qaction.h:218
#31 QToolButton::nextCheckState (this=0x8b307d0) at widgets/qtoolbutton.cpp:1147
#32 0x071e30c3 in QAbstractButtonPrivate::click (this=0x8b6b208) at widgets/qabstractbutton.cpp:528
#33 0x071e33be in QAbstractButton::mouseReleaseEvent (this=0x8b307d0, e=0xbf9cb0e4) at widgets/qabstractbutton.cpp:1121
#34 0x072b433c in QToolButton::mouseReleaseEvent (this=0x8b307d0, e=0xbf9cb0e4) at widgets/qtoolbutton.cpp:721
#35 0x06e3913a in QWidget::event (this=0x8b307d0, event=0xbf9cb0e4) at kernel/qwidget.cpp:8259
#36 0x071e240e in QAbstractButton::event (this=0x8b307d0, e=0xbf9cb0e4) at widgets/qabstractbutton.cpp:1080
#37 0x072b5a6a in QToolButton::event (this=0x8b307d0, event=0xbf9cb0e4) at widgets/qtoolbutton.cpp:1163
#38 0x06de0d24 in QApplicationPrivate::notify_helper (this=0x8942af8, receiver=0x8b307d0, e=0xbf9cb0e4) at kernel/qapplication.cpp:4462
#39 0x06de6201 in QApplication::notify (this=0x893f3b8, receiver=0x8b307d0, e=0xbf9cb0e4) at kernel/qapplication.cpp:4023
#40 0x0600c3ca in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#41 0x04aa40bb in QCoreApplication::notifyInternal (this=0x893f3b8, receiver=0x8b307d0, event=0xbf9cb0e4) at kernel/qcoreapplication.cpp:731
#42 0x06de1c3b in sendSpontaneousEvent (receiver=0x8b307d0, event=0xbf9cb0e4, alienWidget=0x8b307d0, nativeWidget=0x8b6aef0, buttonDown=0x772dc60, lastMouseReceiver=..., spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#43 QApplicationPrivate::sendMouseEvent (receiver=0x8b307d0, event=0xbf9cb0e4, alienWidget=0x8b307d0, nativeWidget=0x8b6aef0, buttonDown=0x772dc60, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3120
#44 0x06e6b2bc in QETWidget::translateMouseEvent (this=0x8b6aef0, event=0xbf9cb60c) at kernel/qapplication_x11.cpp:4556
#45 0x06e69746 in QApplication::x11ProcessEvent (this=0x893f3b8, event=0xbf9cb60c) at kernel/qapplication_x11.cpp:3678
#46 0x06e94b84 in x11EventSourceDispatch (s=0x8945968, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#47 0x06a33aa8 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#48 0x06a34270 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#49 0x06a34524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#50 0x04ad153c in QEventDispatcherGlib::processEvents (this=0x8906aa8, flags=...) at kernel/qeventdispatcher_glib.cpp:422
#51 0x06e94775 in QGuiEventDispatcherGlib::processEvents (this=0x8906aa8, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#52 0x04aa3289 in QEventLoop::processEvents (this=0xbf9cb8d4, flags=...) at kernel/qeventloop.cpp:149
#53 0x04aa3522 in QEventLoop::exec (this=0xbf9cb8d4, flags=...) at kernel/qeventloop.cpp:201
#54 0x04aa7ecc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#55 0x06dde8e7 in QApplication::exec () at kernel/qapplication.cpp:3736
#56 0x08086c4f in main (argc=) at /build/buildd/kmymoney-4.5.3/kmymoney/main.cpp:260

Possible duplicates by query: bug 264313, bug 264312.

Reported using DrKonqi
Comment 1 Cristian Oneț 2011-06-01 06:39:20 UTC
The crash you have reported is caused by inconsistent data in your file namely a price with value zero. There are several ways to fix this.
1. If you still have version 1.x open the file and run a consistency check
2. If you don't have version 1.x anymore you'll have to manually remove the zero price from your file, please make a backup first, then:
  2a. in a terminal type 'zcat your_file.kmy > editable_file.xml'
  2b. open editable_file.xml with your favorite text editor
  2c. Locate the PRICE element which have an attribute price="0" or 0/something
  2d. Remove all prices fitting the above condition (make sure to preserve the xml file structure)
  2e. Open the resulting file with the new version of kmymoney and save it after that
Comment 2 Wayne Harris 2011-06-01 13:43:03 UTC
Thank you, Cristian!

On Wed, 2011-06-01 at 06:39 +0200, Cristian Onet wrote:
> https://bugs.kde.org/show_bug.cgi?id=274656
> 
> 
> 
> 
> 
> --- Comment #1 from Cristian Onet <onet cristian gmail com>  2011-06-01 06:39:20 ---
> The crash you have reported is caused by inconsistent data in your file namely
> a price with value zero. There are several ways to fix this.
> 1. If you still have version 1.x open the file and run a consistency check
> 2. If you don't have version 1.x anymore you'll have to manually remove the
> zero price from your file, please make a backup first, then:
>   2a. in a terminal type 'zcat your_file.kmy > editable_file.xml'
>   2b. open editable_file.xml with your favorite text editor
>   2c. Locate the PRICE element which have an attribute price="0" or 0/something
>   2d. Remove all prices fitting the above condition (make sure to preserve the
> xml file structure)
>   2e. Open the resulting file with the new version of kmymoney and save it
> after that
>
Comment 3 Cristian Oneț 2011-06-01 14:20:03 UTC
Does that mean that the problems was solved? Did you, by any chance, imported data from GnuCash in the past?
Comment 4 Wayne Harris 2011-06-01 19:02:18 UTC
Have not solved the problem but am confident I will be able to with the
info you gave me. This file was in fact ported over from GnuCash circa
2006.

On Wed, 2011-06-01 at 14:20 +0200, Cristian Onet wrote:
> https://bugs.kde.org/show_bug.cgi?id=274656
> 
> 
> 
> 
> 
> --- Comment #3 from Cristian Onet <onet cristian gmail com>  2011-06-01 14:20:03 ---
> Does that mean that the problems was solved? Did you, by any chance, imported
> data from GnuCash in the past?
>
Comment 5 Cristian Oneț 2011-06-01 22:22:39 UTC

*** This bug has been marked as a duplicate of bug 256282 ***
Comment 6 Wayne Harris 2011-06-02 03:37:41 UTC
Cristian, converting the kmy file to xml and then finding and removing
the line beginning "PRICE price="0" solved my problem. Thank you.

On Wed, 2011-06-01 at 14:20 +0200, Cristian Onet wrote:
> https://bugs.kde.org/show_bug.cgi?id=274656
> 
> 
> 
> 
> 
> --- Comment #3 from Cristian Onet <onet cristian gmail com>  2011-06-01 14:20:03 ---
> Does that mean that the problems was solved? Did you, by any chance, imported
> data from GnuCash in the past?
>