Summary: | KMyMoney Gnucash Import Crash | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | bryanm01 |
Component: | general | Assignee: | KMyMoney Devel Mailing List <kmymoney-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | agander93, onet.cristian, raimondo.ariu |
Priority: | NOR | ||
Version: | 4.6.1 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kmymoney/a313812d0408c3dbe661fff8c3930269b1d4fdba | Version Fixed In: | |
Sentry Crash Report: |
Description
bryanm01
2013-02-06 04:29:53 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. What about my data file should I check? Could you try this with 4.6.3? I remember fixing this in some version but I'm not sure which one. 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. (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.}}} 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 (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. (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. 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?
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. (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. 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. Can this now be closed? 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 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 *** Bug 333057 has been marked as a duplicate of this bug. *** |