Bug 314491 - KMyMoney Gnucash Import Crash
Summary: KMyMoney Gnucash Import Crash
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Unclassified
Component: general (show other bugs)
Version: 4.6.1
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 333057 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-06 04:29 UTC by bryanm01
Modified: 2014-04-04 05:36 UTC (History)
3 users (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 bryanm01 2013-02-06 04:29:53 UTC
Application: kmymoney (4.6.1)
KDE Platform Version: 4.8.5 (4.8.5)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-35-generic x86_64
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed: I was attempting to import a gnucash file into kmymoney. The import started but kmymoney crashed shortly thereafter, before the import completed.

The crash can be reproduced every time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Floating point exception
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fea54ed3780 (LWP 3238))]

Thread 4 (Thread 0x7fea3c7e4700 (LWP 3241)):
#0  0x00007fea522cff69 in pthread_mutex_lock () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fea4ac5a5a1 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fea4ac1e337 in g_main_context_release () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fea4ac1efe9 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fea4ac1f49a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fea3c7e998b in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#6  0x00007fea4ac409e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007fea522cde9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8  0x00007fea4f5b9cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fea3bbd8700 (LWP 3242)):
#0  0x00007fea4f5ae303 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fea4ac1f036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fea4ac1f49a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fea42ab9406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fea4ac409e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fea522cde9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007fea4f5b9cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fea3ab72700 (LWP 3269)):
#0  0x00007fff8c7ff8de in ?? ()
#1  0x00007fea4aed015d in clock_gettime () from /lib/x86_64-linux-gnu/librt.so.1
#2  0x00007fea510b4bb4 in do_gettime (frac=0x7fea3ab71b98, sec=0x7fea3ab71b90) at tools/qelapsedtimer_unix.cpp:123
#3  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#4  0x00007fea5118cb8d in QTimerInfoList::updateCurrentTime (this=0x7fea30002660) at kernel/qeventdispatcher_unix.cpp:343
#5  0x00007fea5118cec3 in QTimerInfoList::timerWait (this=0x7fea30002660, tm=...) at kernel/qeventdispatcher_unix.cpp:450
#6  0x00007fea5118b97c in timerSourcePrepareHelper (src=<optimized out>, timeout=0x7fea3ab71c6c) at kernel/qeventdispatcher_glib.cpp:136
#7  0x00007fea5118ba25 in timerSourcePrepare (source=<optimized out>, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#8  0x00007fea4ac1e846 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007fea4ac1ef5b in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#10 0x00007fea4ac1f164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#11 0x00007fea5118c426 in QEventDispatcherGlib::processEvents (this=0x7fea300008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#12 0x00007fea5115bc82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#13 0x00007fea5115bed7 in QEventLoop::exec (this=0x7fea3ab71dd0, flags=...) at kernel/qeventloop.cpp:204
#14 0x00007fea5105afa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#15 0x00007fea5113b9ff in QInotifyFileSystemWatcherEngine::run (this=0x5380db0) at io/qfilesystemwatcher_inotify.cpp:248
#16 0x00007fea5105dfcb in QThreadPrivate::start (arg=0x5380db0) at thread/qthread_unix.cpp:298
#17 0x00007fea522cde9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#18 0x00007fea4f5b9cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#19 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fea54ed3780 (LWP 3238)):
[KCrash Handler]
#6  0x00007fea4f2607be in __gmp_exception () from /usr/lib/x86_64-linux-gnu/libgmp.so.10
#7  0x00007fea4f2607ee in __gmp_divide_by_zero () from /usr/lib/x86_64-linux-gnu/libgmp.so.10
#8  0x00007fea4f27b4a6 in __gmpq_div () from /usr/lib/x86_64-linux-gnu/libgmp.so.10
#9  0x00007fea5293fcf1 in AlkValue::operator/(AlkValue const&) const () from /usr/lib/libalkimia.so.4
#10 0x00007fea54a6b550 in MyMoneyMoney::operator/ (this=<optimized out>, _b=...) at /build/buildd/kmymoney-4.6.1/kmymoney/mymoney/mymoneymoney.cpp:285
#11 0x0000000000750c7e in MyMoneyGncReader::convertSplit (this=0x20a9950, gsp=<optimized out>) at /build/buildd/kmymoney-4.6.1/kmymoney/converter/mymoneygncreader.cpp:1678
#12 0x00000000007518f8 in MyMoneyGncReader::convertTransaction (this=0x20a9950, gtx=0x5528f80) at /build/buildd/kmymoney-4.6.1/kmymoney/converter/mymoneygncreader.cpp:1562
#13 0x0000000000751f2b in GncTransaction::terminate (this=<optimized out>) at /build/buildd/kmymoney-4.6.1/kmymoney/converter/mymoneygncreader.cpp:734
#14 0x00000000007495a5 in XmlReader::endElement (this=0x41f4150, elName=...) at /build/buildd/kmymoney-4.6.1/kmymoney/converter/mymoneygncreader.cpp:1175
#15 0x00007fea519aeed6 in QXmlSimpleReaderPrivate::processElementETagBegin2 (this=0x2485ac0) at sax/qxml.cpp:4068
#16 0x00007fea519ba5f0 in QXmlSimpleReaderPrivate::parseElement (this=0x2485ac0) at sax/qxml.cpp:3884
#17 0x00007fea519bad90 in QXmlSimpleReaderPrivate::parseContent (this=0x2485ac0) at sax/qxml.cpp:4427
#18 0x00007fea519ba788 in QXmlSimpleReaderPrivate::parseElement (this=0x2485ac0) at sax/qxml.cpp:3953
#19 0x00007fea519bad90 in QXmlSimpleReaderPrivate::parseContent (this=0x2485ac0) at sax/qxml.cpp:4427
#20 0x00007fea519ba788 in QXmlSimpleReaderPrivate::parseElement (this=0x2485ac0) at sax/qxml.cpp:3953
#21 0x00007fea519bb970 in QXmlSimpleReaderPrivate::parseBeginOrContinue (this=0x2485ac0, state=<optimized out>, incremental=false) at sax/qxml.cpp:3498
#22 0x00007fea519bbc9e in QXmlSimpleReader::parse (this=<optimized out>, input=0x17a73d0, incremental=false) at sax/qxml.cpp:3440
#23 0x000000000074253b in XmlReader::processFile (this=0x41f4150, pDevice=0x53745c0) at /build/buildd/kmymoney-4.6.1/kmymoney/converter/mymoneygncreader.cpp:1069
#24 0x0000000000759043 in MyMoneyGncReader::readFile (this=0x20a9950, pDevice=0x53745c0, storage=<optimized out>) at /build/buildd/kmymoney-4.6.1/kmymoney/converter/mymoneygncreader.cpp:1274
#25 0x00000000004c3de1 in KMyMoneyView::readFile (this=0x161b8d0, url=...) at /build/buildd/kmymoney-4.6.1/kmymoney/views/kmymoneyview.cpp:785
#26 0x000000000048b6ff in KMyMoneyApp::slotGncImport (this=0x12e8310) at /build/buildd/kmymoney-4.6.1/kmymoney/kmymoney.cpp:2190
#27 0x000000000049af2a in KMyMoneyApp::qt_static_metacall (_o=0x12e8310, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /build/buildd/kmymoney-4.6.1/obj-x86_64-linux-gnu/kmymoney/kmymoney.moc:413
#28 0x00007fea51171281 in QMetaObject::activate (sender=0x13ee300, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff8c69a1e0) at kernel/qobject.cpp:3547
#29 0x00007fea5025c132 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#30 0x00007fea5025c31f in QAction::activate (this=0x13ee300, event=<optimized out>) at kernel/qaction.cpp:1257
#31 0x00007fea51176446 in QObject::event (this=0x13ee300, e=<optimized out>) at kernel/qobject.cpp:1195
#32 0x00007fea5025c3f0 in event (e=<optimized out>, this=<optimized out>) at kernel/qaction.cpp:1187
#33 QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1172
#34 0x00007fea5340ca6a in KAction::event(QEvent*) () from /usr/lib/libkdeui.so.5
#35 0x00007fea50262894 in notify_helper (e=0x1581df0, receiver=0x13ee300, this=0x106bc50) at kernel/qapplication.cpp:4559
#36 QApplicationPrivate::notify_helper (this=0x106bc50, receiver=0x13ee300, e=0x1581df0) at kernel/qapplication.cpp:4531
#37 0x00007fea50267713 in QApplication::notify (this=0x10607b0, receiver=0x13ee300, e=0x1581df0) at kernel/qapplication.cpp:4420
#38 0x00007fea534f53f6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#39 0x00007fea5115ce9c in QCoreApplication::notifyInternal (this=0x10607b0, receiver=0x13ee300, event=0x1581df0) at kernel/qcoreapplication.cpp:876
#40 0x00007fea51160c6a in sendEvent (event=0x1581df0, receiver=0x13ee300) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#41 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x10371f0) at kernel/qcoreapplication.cpp:1500
#42 0x00007fea5118bf93 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#43 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#44 0x00007fea4ac1ed53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007fea4ac1f0a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007fea4ac1f164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007fea5118c3bf in QEventDispatcherGlib::processEvents (this=0x1038ad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#48 0x00007fea5030ad5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#49 0x00007fea5115bc82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#50 0x00007fea5115bed7 in QEventLoop::exec (this=0x7fff8c69ac10, flags=...) at kernel/qeventloop.cpp:204
#51 0x00007fea51160f67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#52 0x0000000000457dcd in runKMyMoney (splash=<optimized out>, a=<optimized out>) at /build/buildd/kmymoney-4.6.1/kmymoney/main.cpp:282
#53 0x00000000004564f3 in main (argc=1, argv=0x7fff8c69b7f8) at /build/buildd/kmymoney-4.6.1/kmymoney/main.cpp:181

Reported using DrKonqi
Comment 1 allan 2013-02-06 10:52:04 UTC
This suggests a problem in your data -
#7  0x00007fea4f2607ee in __gmp_divide_by_zero () from /usr/lib/x86_64-linux-gnu/libgmp.so.10

Could you check your data file, please?

The program crashing on an exception is another issue.
Comment 2 bryanm01 2013-02-06 13:56:19 UTC
What about my data file should I check?
Comment 3 Cristian Oneț 2013-02-06 14:05:46 UTC
Could you try this with 4.6.3? I remember fixing this in some version but I'm not sure which one.
Comment 4 bryanm01 2013-02-06 15:01:12 UTC
I did try an import with 4.6.3, I had to build it myself since there's no Ubuntu-specific package, but it crashed there as well. I'll try it again and post the traceback if it still fails.
Comment 5 allan 2013-02-06 16:51:27 UTC
(In reply to comment #2)
> What about my data file should I check?

{{{ I wrote this earlier, but didn't notice that it didn't get posted because of a reply clash, but it still has some relevance.}}}

(In reply to comment #2)
> What about my data file should I check?
I can't be very specific, I'm afraid.  I suspect that it may relate to an investment item, where an amount has an unexpected value of zero.  If your file is large, that may be a bit difficult to spot.

Are you able to re-import into Gnucash as a test?

So far as getting 4.6.3 is concerned, you are likely to find that in the Claydoh PPA.   {{{This may help you in the future.}}}
Comment 6 bryanm01 2013-02-07 04:15:14 UTC
I tried 4.6.3 and got a similar crash. The backtrace is similar, it still includes the divide by 0. The program crashes before a file is created so I can't re-import into Gnucash, or at least I can't find a file.

Application: KMyMoney (kmymoney), signal: Floating point exception
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6208c2e780 (LWP 11471))]

Thread 4 (Thread 0x7f61f052e700 (LWP 11474)):
#0  0x00007f62032f8303 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f61fe969036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f61fe96949a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f61f053398b in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#4  0x00007f61fe98a9e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6206017e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f6203303cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7f61ef922700 (LWP 11475)):
#0  0x00007f62032f8303 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f61fe969036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f61fe96949a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f61f6803406 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f61fe98a9e5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f6206017e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f6203303cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f61ee8bc700 (LWP 11529)):
#0  0x00007f62032f8303 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f61fe969036 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f61fe969164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f6204ed6426 in QEventDispatcherGlib::processEvents (this=0x7f61e40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007f6204ea5c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f6204ea5ed7 in QEventLoop::exec (this=0x7f61ee8bbdd0, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007f6204da4fa7 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#7  0x00007f6204e859ff in QInotifyFileSystemWatcherEngine::run (this=0x20a8da0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f6204da7fcb in QThreadPrivate::start (arg=0x20a8da0) at thread/qthread_unix.cpp:298
#9  0x00007f6206017e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007f6203303cbd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f6208c2e780 (LWP 11471)):
[KCrash Handler]
#6  0x00007f6202faa7be in __gmp_exception () from /usr/lib/x86_64-linux-gnu/libgmp.so.10
#7  0x00007f6202faa7ee in __gmp_divide_by_zero () from /usr/lib/x86_64-linux-gnu/libgmp.so.10
#8  0x00007f6202fc54a6 in __gmpq_div () from /usr/lib/x86_64-linux-gnu/libgmp.so.10
#9  0x00007f6206689cf1 in AlkValue::operator/(AlkValue const&) const () from /usr/lib/libalkimia.so.4
#10 0x00007f62087c4f20 in MyMoneyMoney::operator/ (this=<optimized out>, _b=...) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/mymoney/mymoneymoney.cpp:291
#11 0x000000000075098e in MyMoneyGncReader::convertSplit (this=0x4e972a0, gsp=<optimized out>) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/converter/mymoneygncreader.cpp:1679
#12 0x0000000000751608 in MyMoneyGncReader::convertTransaction (this=0x4e972a0, gtx=0x51acf80) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/converter/mymoneygncreader.cpp:1563
#13 0x0000000000751c3b in GncTransaction::terminate (this=<optimized out>) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/converter/mymoneygncreader.cpp:734
#14 0x00000000007492b5 in XmlReader::endElement (this=0x771f960, elName=...) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/converter/mymoneygncreader.cpp:1175
#15 0x00007f62056f8ed6 in QXmlSimpleReaderPrivate::processElementETagBegin2 (this=0x67352e0) at sax/qxml.cpp:4068
#16 0x00007f62057045f0 in QXmlSimpleReaderPrivate::parseElement (this=0x67352e0) at sax/qxml.cpp:3884
#17 0x00007f6205704d90 in QXmlSimpleReaderPrivate::parseContent (this=0x67352e0) at sax/qxml.cpp:4427
#18 0x00007f6205704788 in QXmlSimpleReaderPrivate::parseElement (this=0x67352e0) at sax/qxml.cpp:3953
#19 0x00007f6205704d90 in QXmlSimpleReaderPrivate::parseContent (this=0x67352e0) at sax/qxml.cpp:4427
#20 0x00007f6205704788 in QXmlSimpleReaderPrivate::parseElement (this=0x67352e0) at sax/qxml.cpp:3953
#21 0x00007f6205705970 in QXmlSimpleReaderPrivate::parseBeginOrContinue (this=0x67352e0, state=<optimized out>, incremental=false) at sax/qxml.cpp:3498
#22 0x00007f6205705c9e in QXmlSimpleReader::parse (this=<optimized out>, input=0x12de580, incremental=false) at sax/qxml.cpp:3440
#23 0x000000000074224b in XmlReader::processFile (this=0x771f960, pDevice=0x4f13d50) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/converter/mymoneygncreader.cpp:1069
#24 0x0000000000758d6d in MyMoneyGncReader::readFile (this=0x4e972a0, pDevice=0x4f13d50, storage=<optimized out>) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/converter/mymoneygncreader.cpp:1275
#25 0x00000000004c4011 in KMyMoneyView::readFile (this=0x182e970, url=...) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/views/kmymoneyview.cpp:785
#26 0x000000000048bbff in KMyMoneyApp::slotGncImport (this=0x14fd110) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/kmymoney.cpp:2195
#27 0x000000000049b40a in KMyMoneyApp::qt_static_metacall (_o=0x14fd110, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/kmymoney/kmymoney.moc:413
#28 0x00007f6204ebb281 in QMetaObject::activate (sender=0x1601120, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff7a9b7be0) at kernel/qobject.cpp:3547
#29 0x00007f6203fa6132 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#30 0x00007f6203fa631f in QAction::activate (this=0x1601120, event=<optimized out>) at kernel/qaction.cpp:1257
#31 0x00007f6204ec0446 in QObject::event (this=0x1601120, e=<optimized out>) at kernel/qobject.cpp:1195
#32 0x00007f6203fa63f0 in event (e=<optimized out>, this=<optimized out>) at kernel/qaction.cpp:1187
#33 QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1172
#34 0x00007f6207156a6a in KAction::event(QEvent*) () from /usr/lib/libkdeui.so.5
#35 0x00007f6203fac894 in notify_helper (e=0x5ea0e90, receiver=0x1601120, this=0x127ec50) at kernel/qapplication.cpp:4559
#36 QApplicationPrivate::notify_helper (this=0x127ec50, receiver=0x1601120, e=0x5ea0e90) at kernel/qapplication.cpp:4531
#37 0x00007f6203fb1713 in QApplication::notify (this=0x12737b0, receiver=0x1601120, e=0x5ea0e90) at kernel/qapplication.cpp:4420
#38 0x00007f620723f3f6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#39 0x00007f6204ea6e9c in QCoreApplication::notifyInternal (this=0x12737b0, receiver=0x1601120, event=0x5ea0e90) at kernel/qcoreapplication.cpp:876
#40 0x00007f6204eaac6a in sendEvent (event=0x5ea0e90, receiver=0x1601120) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#41 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x124a1f0) at kernel/qcoreapplication.cpp:1500
#42 0x00007f6204ed5f93 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#43 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#44 0x00007f61fe968d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007f61fe9690a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007f61fe969164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f6204ed63bf in QEventDispatcherGlib::processEvents (this=0x124bad0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#48 0x00007f6204054d5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#49 0x00007f6204ea5c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#50 0x00007f6204ea5ed7 in QEventLoop::exec (this=0x7fff7a9b8610, flags=...) at kernel/qeventloop.cpp:204
#51 0x00007f6204eaaf67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#52 0x0000000000457e5d in runKMyMoney (splash=<optimized out>, a=<optimized out>) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/main.cpp:282
#53 0x0000000000456583 in main (argc=1, argv=0x7fff7a9b91f8) at /home/bryan/Downloads/build/kmymoney-4.6.3/kmymoney/main.cpp:181
Comment 7 allan 2013-02-07 10:57:04 UTC
(In reply to comment #6)
> I tried 4.6.3 and got a similar crash. The backtrace is similar, it still
> includes the divide by 0. The program crashes before a file is created so I
> can't re-import into Gnucash, or at least I can't find a file.

What I meant was to try importing the file that Gnucash produced back into Gnucash, to see if it either accepted it or gave a pointer to the problem.

Failing that, I don't know the size of your file or what the content was, but might it be possible to go back to Gnucash and try again, but producing a number of files for importing into KMyMoney.

Otherwise, the only alternative is to try to reproduce the problem using your file, which of course has privacy issues.  It would be wise then for you to edit the file to disguise private data, etc.

Anyway, let's try the other things first.
Comment 8 allan 2013-02-07 11:14:28 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > I tried 4.6.3 and got a similar crash. The backtrace is similar, it still
> > includes the divide by 0. The program crashes before a file is created so I
> > can't re-import into Gnucash, or at least I can't find a file.
> 
> What I meant was to try importing the file that Gnucash produced back into
> Gnucash, to see if it either accepted it or gave a pointer to the problem.
> 
> Failing that, I don't know the size of your file or what the content was,
> but might it be possible to go back to Gnucash and try again, but producing
> a number of files for importing into KMyMoney.
> 
What I meant here was to split your present single file into sections, by exporting separate accounts or groups of accounts, and then import, to try to isolate the issue.

> Anyway, let's try the other things first.
Comment 9 allan 2013-02-07 12:07:48 UTC
Copy of input from Tony Bloomfield.

"Yes, I'm still alive.

[[Good to hear!]]

I'm sending this to the list since I seem to have lost my KDE bugzilla signon; lack of use I guess.

Did the OP try running his file through the GnuCash Check and Repair facility; under the Actions menu IIRC. It sometime picks out problems like this.

> Otherwise, the only alternative is to try to reproduce the problem using your
> file, which of course has privacy issues.

At one time, I developed a GnuCash anonymizer. As I recall, it could be created by compiling the GNC import module stand-alone with an optional compiler flag set; something like GNCANON I think. I used it successfully on my own old GNC files once, but never got round to providing a distribution of it.

[[It's _GNCFILEANON]]

Keep up the good work, guys."

To the OP.-
Can you try running your file through the GnuCash Check and Repair facility; under the Actions menu IIRC. It sometime picks out problems like this.

In the event that we may need to try with your own file, are you able to compile a patched version to be able to produce an anonymized file?
Comment 10 bryanm01 2013-02-10 04:28:52 UTC
So I never got a direct import from Gnucash to Kmymoney but while exploring some of the ideas from this thread I discovered my Gnucash file was being save as a compressed file. After I saved it as an uncompressed file I was able to use the Gnucash to QIF converter and then import into Kmymoney. The new file will new to be massaged a little but it all appears to be there. Thanks to everyone for the help.
Comment 11 allan 2013-02-10 12:03:10 UTC
(In reply to comment #10)
> So I never got a direct import from Gnucash to Kmymoney but while exploring
> some of the ideas from this thread I discovered my Gnucash file was being
> save as a compressed file. After I saved it as an uncompressed file I was
> able to use the Gnucash to QIF converter and then import into Kmymoney. The
> new file will new to be massaged a little but it all appears to be there.
> Thanks to everyone for the help.

Glad you found your way through.  http://wiki.gnucash.org/wiki/FAQ#Q:_How_can_I_export_data.3F has more on exporting.

If you have time, and if you haven't already tried this, could you run KMyMoney from the command line -   kmymoney -n   - then select your original gnucash file and see if any console output sheds any line on your data issue.  I think there was a problem with an investment price or quantity.
Comment 12 allan 2013-02-10 12:17:19 UTC
This is not an area I've entered before but I notice that at line 1679 in mymoneygncreader.cpp 

price = split.value() / split.shares();
#define NEW_DENOM 10000
        if (!split.shares().isZero())  // patch to fix divide by zero?
          newPrice = MyMoneyMoney(price.toDouble(), (signed64)NEW_DENOM);
        if (!newPrice.isZero()) {
          TRY {

It appears to be checking if split.shares()  isZero() after the division/ failure has occurred.
Comment 13 allan 2013-02-23 11:36:46 UTC
Can this now be closed?
Comment 14 Cristian Oneț 2013-08-30 08:52:15 UTC
Git commit 1e329987d4412ae39bea1903acae6b00f96a9ef7 by Cristian Oneț.
Committed on 30/08/2013 at 08:49.
Pushed by conet into branch 'master'.

Fix divide by 0 crash while importing from GnuCash.

M  +10   -11   kmymoney/converter/mymoneygncreader.cpp

http://commits.kde.org/kmymoney/1e329987d4412ae39bea1903acae6b00f96a9ef7
Comment 15 Cristian Oneț 2013-08-30 08:52:58 UTC
Git commit a313812d0408c3dbe661fff8c3930269b1d4fdba by Cristian Oneț.
Committed on 30/08/2013 at 08:49.
Pushed by conet into branch '4.6'.

Fix divide by 0 crash while importing from GnuCash.
(cherry picked from commit 1e329987d4412ae39bea1903acae6b00f96a9ef7)

M  +10   -11   kmymoney/converter/mymoneygncreader.cpp

http://commits.kde.org/kmymoney/a313812d0408c3dbe661fff8c3930269b1d4fdba
Comment 16 Thomas Baumgart 2014-04-04 05:36:29 UTC
*** Bug 333057 has been marked as a duplicate of this bug. ***