[Kmymoney-devel] Floating point exception, Gnucash importer
Donald Allen
donaldcallen at gmail.com
Wed Mar 21 17:44:29 UTC 2012
On Wed, Mar 21, 2012 at 12:09 PM, Cristian Oneț <onet.cristian at gmail.com> wrote:
> 2012/3/21 Donald Allen <donaldcallen at gmail.com>:
>> On Wed, Mar 21, 2012 at 10:08 AM, Cristian Oneț <onet.cristian at gmail.com> wrote:
>>> 2012/3/21 Donald Allen <donaldcallen at gmail.com>:
>>>> I am a long-time gnucash user, but thought I'd have a look at
>>>> kmymoney. I'm running Arch Linux on an amd64 system with plenty of
>>>> memory and disk-space. I installed kmymoney from the Arch repository
>>>> (v4.6.2), saved a gnucash xml file (I work with the data stored in a
>>>> postgresql db) and tried to import it. During the import kmymoney
>>>> crashed -- floating-point exception. Mindful of Einstein's insanity
>>>> definition (which may not apply to multi-process or multi-threaded
>>>> applications), I tried it again. He was right -- same result. I tried
>>>> to follow the procedure to send a bug report, but it complained that
>>>> the traceback was of no use and threw up its hands. I did some
>>>> googling and found that there have been bugs that produce this
>>>> symptom, one apparently caused by zeros in security prices, leading to
>>>> a div-by-zero error. But from what I read, that error appears to have
>>>> been fixed awhile ago.
>>>>
>>>> I'm happy to submit a bug report, but right now, the extent of what I
>>>> know is "tried to import gnucash file, poof, floating-point
>>>> exception". I can't, or won't, send you my gnucash file for obvious
>>>> reasons. If you have suggestions for how to gather more information
>>>> that might help you debug this, I'm happy to try to get it for you if
>>>> it doesn't involve too much of my time. I am a very experienced
>>>> software developer and manager (now retired), so perhaps we could try
>>>> building kmymoney from source, with symbols, and I could run it under
>>>> gdb and get you a real traceback?
>>>
>>> Hi,
>>>
>>> For now the best information would be a full stacktrace of the crash.
>>> You can build a debug version by passing -DCMAKE_BUILD_TYPE ="Debug"
>>> when configuring, then build, install and reproduce the crash. If the
>>> stacktrace will contain debug information even DrKonqi will let you
>>> report the bug or you can just send it to this list.
>>>
>>> Regards,
>>> Cristian
>>
>> 4.6.2 doesn't build for me, and the errors aren't particularly helpful:
>>
>> [ 3%] Building CXX object
>> libkdchart/src/CMakeFiles/kmm_kdchart.dir/KDChartAbstractProxyModel.cpp.o
>> [ 3%] Building CXX object
>> libkdchart/src/CMakeFiles/kmm_kdchart.dir/KDChartAbstractThreeDAttributes.cpp.o
>> [ 3%] Building CXX object
>> libkdchart/src/CMakeFiles/kmm_kdchart.dir/KDChartAttributesModel.cpp.o
>> [ 3%] Building CXX object
>> libkdchart/src/CMakeFiles/kmm_kdchart.dir/KDChartBackgroundAttributes.cpp.o
>> /tmp/kmymoney-4.6.2/libkdchart/src/KDChartBackgroundAttributes.cpp: In
>> function 'QDebug operator<<(QDebug, const
>> KDChart::BackgroundAttributes&)':
>> /tmp/kmymoney-4.6.2/libkdchart/src/KDChartBackgroundAttributes.cpp:153:26:
>> error: ambiguous overload for 'operator<<' in '(&(& operator<<(QDebug,
>> const QBrush&)((*(const QBrush*)(&
>> KDChart::BackgroundAttributes::brush()
>> const()))).QDebug::operator<<(((const
>> char*)"pixmapmode=")))->QDebug::operator<<(((int)(&
>> ba)->KDChart::BackgroundAttributes::pixmapMode())))->QDebug::operator<<(((const
>> char*)"pixmap=")) << KDChart::BackgroundAttributes::pixmap() const()'
>> /tmp/kmymoney-4.6.2/libkdchart/src/KDChartBackgroundAttributes.cpp:153:26:
>> note: candidates are:
>> /usr/include/QtCore/qvariant.h:606:22: note: QDebug operator<<(QDebug,
>> const QVariant&)
>> /usr/include/QtGui/qbrush.h:171:21: note: QDebug operator<<(QDebug,
>> const QBrush&)
>> make[2]: *** [libkdchart/src/CMakeFiles/kmm_kdchart.dir/KDChartBackgroundAttributes.cpp.o]
>> Error 1
>> make[1]: *** [libkdchart/src/CMakeFiles/kmm_kdchart.dir/all] Error 2
>> make: *** [all] Error 2
>> dca at elektra:/tmp/kmymoney-4.6.2/Debug$
>>
>> The cmake command I used prior to the make was
>>
>> cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Debugfull ..
>>
>> The cmake completed without error.
>>
>> /Don
>
> Please apply this patch [1].
>
> Regards,
> Cristian
>
> https://projects.kde.org/projects/extragear/office/kmymoney/repository/revisions/c736b6f08e77df72d58c5b836b7b04f6098737df
Application: KMyMoney (kmymoney), signal: Floating point exception
Using host libthread_db library "/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f2e7aa19780 (LWP 7548))]
Thread 2 (Thread 0x7f2e6119b700 (LWP 7565)):
#0 0x00007f2e74deb183 in poll () from /lib/libc.so.6
#1 0x00007f2e70281dc8 in ?? () from /usr/lib/libglib-2.0.so.0
#2 0x00007f2e70282289 in g_main_context_iteration () from
/usr/lib/libglib-2.0.so.0
#3 0x00007f2e769a9126 in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib/libQtCore.so.4
#4 0x00007f2e76978e52 in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/libQtCore.so.4
#5 0x00007f2e769790a7 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/libQtCore.so.4
#6 0x00007f2e76879d17 in QThread::exec() () from /usr/lib/libQtCore.so.4
#7 0x00007f2e76958c9f in ?? () from /usr/lib/libQtCore.so.4
#8 0x00007f2e7687cd3b in ?? () from /usr/lib/libQtCore.so.4
#9 0x00007f2e77b07daa in start_thread () from /lib/libpthread.so.0
#10 0x00007f2e74df309d in clone () from /lib/libc.so.6
Thread 1 (Thread 0x7f2e7aa19780 (LWP 7548)):
[KCrash Handler]
#6 0x00007f2e78392b9e in __gmp_exception () from /usr/lib/libgmp.so.10
#7 0x00007f2e78392bce in __gmp_divide_by_zero () from /usr/lib/libgmp.so.10
#8 0x00007f2e783abd46 in __gmpq_div () from /usr/lib/libgmp.so.10
#9 0x00007f2e781809f1 in AlkValue::operator/(AlkValue const&) const
() from /usr/lib/libalkimia.so.4
#10 0x00007f2e7a5a9c2c in MyMoneyMoney::operator/
(this=0x7fff9f125e08, _b=...) at
/tmp/kmymoney-4.6.2/kmymoney/mymoney/mymoneymoney.cpp:291
#11 0x0000000000754e26 in MyMoneyGncReader::convertSplit
(this=0x3393180, gsp=0x1bb83530) at
/tmp/kmymoney-4.6.2/kmymoney/converter/mymoneygncreader.cpp:1679
#12 0x0000000000754135 in MyMoneyGncReader::convertTransaction
(this=0x3393180, gtx=0x1bb974b0) at
/tmp/kmymoney-4.6.2/kmymoney/converter/mymoneygncreader.cpp:1563
#13 0x000000000074cd2d in GncTransaction::terminate (this=0x1bb974b0)
at /tmp/kmymoney-4.6.2/kmymoney/converter/mymoneygncreader.cpp:734
#14 0x000000000074fe8d in XmlReader::endElement (this=0x571b8a0,
elName=...) at /tmp/kmymoney-4.6.2/kmymoney/converter/mymoneygncreader.cpp:1175
#15 0x00007f2e771d7ec6 in ?? () from /usr/lib/libQtXml.so.4
#16 0x00007f2e771e35e0 in ?? () from /usr/lib/libQtXml.so.4
#17 0x00007f2e771e3d80 in ?? () from /usr/lib/libQtXml.so.4
#18 0x00007f2e771e3778 in ?? () from /usr/lib/libQtXml.so.4
#19 0x00007f2e771e3d80 in ?? () from /usr/lib/libQtXml.so.4
#20 0x00007f2e771e3778 in ?? () from /usr/lib/libQtXml.so.4
#21 0x00007f2e771e4960 in ?? () from /usr/lib/libQtXml.so.4
#22 0x00007f2e771e4c8e in QXmlSimpleReader::parse(QXmlInputSource
const*, bool) () from /usr/lib/libQtXml.so.4
#23 0x000000000074f632 in XmlReader::processFile (this=0x571b8a0,
pDevice=0x516f730) at
/tmp/kmymoney-4.6.2/kmymoney/converter/mymoneygncreader.cpp:1069
#24 0x0000000000750d3b in MyMoneyGncReader::readFile (this=0x3393180,
pDevice=0x516f730, storage=0x8137738) at
/tmp/kmymoney-4.6.2/kmymoney/converter/mymoneygncreader.cpp:1275
#25 0x00000000004bdbcc in KMyMoneyView::readFile (this=0x2d3c1f0,
url=...) at /tmp/kmymoney-4.6.2/kmymoney/views/kmymoneyview.cpp:785
#26 0x000000000047a2a5 in KMyMoneyApp::slotGncImport (this=0x2caaa50)
at /tmp/kmymoney-4.6.2/kmymoney/kmymoney.cpp:2190
#27 0x00000000004a2f02 in KMyMoneyApp::qt_static_metacall
(_o=0x2caaa50, _c=QMetaObject::InvokeMetaMethod, _id=35,
_a=0x7fff9f127f70) at
/tmp/kmymoney-4.6.2/Debug/kmymoney/kmymoney.moc:413
#28 0x00007f2e7698df11 in QMetaObject::activate(QObject*, QMetaObject
const*, int, void**) () from /usr/lib/libQtCore.so.4
#29 0x00007f2e75a82412 in QAction::triggered(bool) () from
/usr/lib/libQtGui.so.4
#30 0x00007f2e75a825ff in QAction::activate(QAction::ActionEvent) ()
from /usr/lib/libQtGui.so.4
#31 0x00007f2e75ed0219 in ?? () from /usr/lib/libQtGui.so.4
#32 0x00007f2e75ed6322 in ?? () from /usr/lib/libQtGui.so.4
#33 0x00007f2e7908c1f0 in KMenu::mouseReleaseEvent(QMouseEvent*) ()
from /usr/lib/libkdeui.so.5
#34 0x00007f2e75ad8f64 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#35 0x00007f2e75ed78bb in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#36 0x00007f2e75a888c4 in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () from /usr/lib/libQtGui.so.4
#37 0x00007f2e75a8e013 in QApplication::notify(QObject*, QEvent*) ()
from /usr/lib/libQtGui.so.4
#38 0x00007f2e78fcb556 in KApplication::notify(QObject*, QEvent*) ()
from /usr/lib/libkdeui.so.5
#39 0x00007f2e7697a06c in QCoreApplication::notifyInternal(QObject*,
QEvent*) () from /usr/lib/libQtCore.so.4
#40 0x00007f2e75a89892 in
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*,
QWidget*, QWidget**, QPointer<QWidget>&, bool) () from
/usr/lib/libQtGui.so.4
#41 0x00007f2e75b06251 in ?? () from /usr/lib/libQtGui.so.4
#42 0x00007f2e75b04a4a in QApplication::x11ProcessEvent(_XEvent*) ()
from /usr/lib/libQtGui.so.4
#43 0x00007f2e75b2c302 in ?? () from /usr/lib/libQtGui.so.4
#44 0x00007f2e702818bd in g_main_context_dispatch () from
/usr/lib/libglib-2.0.so.0
#45 0x00007f2e702820b8 in ?? () from /usr/lib/libglib-2.0.so.0
#46 0x00007f2e70282289 in g_main_context_iteration () from
/usr/lib/libglib-2.0.so.0
#47 0x00007f2e769a90bf in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib/libQtCore.so.4
#48 0x00007f2e75b2bf8e in ?? () from /usr/lib/libQtGui.so.4
#49 0x00007f2e76978e52 in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
from /usr/lib/libQtCore.so.4
#50 0x00007f2e769790a7 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/libQtCore.so.4
#51 0x00007f2e7697dc05 in QCoreApplication::exec() () from
/usr/lib/libQtCore.so.4
#52 0x0000000000461f71 in runKMyMoney (a=0x2b82b50, splash=0x2c944a0)
at /tmp/kmymoney-4.6.2/kmymoney/main.cpp:282
#53 0x00000000004609a1 in main (argc=1, argv=0x7fff9f12a468) at
/tmp/kmymoney-4.6.2/kmymoney/main.cpp:181
Looks like a zero-divide error. I'm trying to pick through this with
gdb to print the gnucash transaction. I can't work on this much longer
today as I have other committments. I'll get back if I learn anything
worth reporting.
One other thing -- with the built-from-source version, I get KNotify
crashes, such as when I click File->Import->Gnucash:
Phonon::GStreamer::Backend: Failed to initialize GStreamer
WARNING: Phonon::createPath: Cannot connect Phonon::MediaObject ( no
objectName ) to Phonon::AudioOutput ( no objectName ).
KCrash: Application 'knotify4' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/dca/.kde4/socket-elektra/kdeinit4__0
unnamed app(7692): Communication problem with "knotify" , it probably crashed.
Error message was: "org.freedesktop.DBus.Error.NoReply" : " "Message
did not receive a reply (timeout by message bus)" "
kmymoney(7690)/kdeui (KNotification)
KNotification::slotReceivedIdError: Error while contacting notify
daemon "Message did not receive a reply (timeout by message bus)"
kmymoney(7690)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
dca at elektra:/tmp/kmymoney-4.6.2/Debug$ QSocketNotifier: Invalid socket
10 and type 'Read', disabling...
/Don
More information about the KMyMoney-devel
mailing list