Bug 273770 - Crash on Gnucash import
Summary: Crash on Gnucash import
Status: RESOLVED FIXED
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-05-21 05:32 UTC by toquehead
Modified: 2011-05-22 20:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description toquehead 2011-05-21 05:32:11 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:
Attempting to import a gnucash file (10MB), it dies right after finishing the configuration and starting the import. I have no 0 prices. I have Ubuntu 11.04 running inside VMWare Player 3.1.4 running on Windows 7 SP1.

The crash can be reproduced every time.

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

Thread 3 (Thread 0xb75ecb70 (LWP 2595)):
#0  0x007be416 in __kernel_vsyscall ()
#1  0x087c2f76 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0x027f584b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x027e51af in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x027e592b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x01f70304 in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0x0280e2df in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0x001e3e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#8  0x087d173e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 2 (Thread 0xb24aeb70 (LWP 2603)):
#0  0x09dbfe8e in ?? () from /usr/lib/libQtCore.so.4
#1  0x09ee0ff5 in ?? () from /usr/lib/libQtCore.so.4
#2  0x027e3fd4 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0x027e4e63 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0x027e5524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0x09ee1577 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x09eb3289 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#7  0x09eb3522 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#8  0x09dbd2a0 in QThread::exec() () from /usr/lib/libQtCore.so.4
#9  0x09e94fdb in ?? () from /usr/lib/libQtCore.so.4
#10 0x09dbfda2 in ?? () from /usr/lib/libQtCore.so.4
#11 0x001e3e99 in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#12 0x087d173e in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb7818930 (LWP 2593)):
[KCrash Handler]
#7  0x007be416 in __kernel_vsyscall ()
#8  0x0872be71 in raise () from /lib/i386-linux-gnu/libc.so.6
#9  0x0872f34e in abort () from /lib/i386-linux-gnu/libc.so.6
#10 0x09db53ba in qt_message_output(QtMsgType, char const*) () from /usr/lib/libQtCore.so.4
#11 0x09db5581 in ?? () from /usr/lib/libQtCore.so.4
#12 0x09db5689 in qFatal(char const*, ...) () from /usr/lib/libQtCore.so.4
#13 0x083bdec6 in MyMoneyGncReader::readFile (this=0xa9d64f0, pDevice=0xa299788, storage=0xa92c714) at /build/buildd/kmymoney-4.5.3/kmymoney/converter/mymoneygncreader.cpp:1278
#14 0x080ff7e5 in KMyMoneyView::readFile (this=0xa2a1670, url=...) at /build/buildd/kmymoney-4.5.3/kmymoney/views/kmymoneyview.cpp:738
#15 0x080bcc42 in KMyMoneyApp::slotGncImport (this=0xa1a3558) at /build/buildd/kmymoney-4.5.3/kmymoney/kmymoney.cpp:2195
#16 0x080d5140 in KMyMoneyApp::qt_metacall (this=0xa1a3558, _c=QMetaObject::InvokeMetaMethod, _id=35, _a=0xbfe7f468) at /build/buildd/kmymoney-4.5.3/obj-i686-linux-gnu/kmymoney/kmymoney.moc:438
#17 0x09eba6ba in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#18 0x09eca4ff in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#19 0x0699c8d9 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#20 0x0699cb38 in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#21 0x06e2e8ad in ?? () from /usr/lib/libQtGui.so.4
#22 0x06e3516b in ?? () from /usr/lib/libQtGui.so.4
#23 0x06e35ffe in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#24 0x0064dcf4 in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libkdeui.so.5
#25 0x069fc13a in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#26 0x06e364d7 in QMenu::event(QEvent*) () from /usr/lib/libQtGui.so.4
#27 0x069a3d24 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#28 0x069a9201 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#29 0x005703ca in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#30 0x09eb40bb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#31 0x069a4c3b in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#32 0x06a2e4c3 in ?? () from /usr/lib/libQtGui.so.4
#33 0x06a2c746 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#34 0x06a57b84 in ?? () from /usr/lib/libQtGui.so.4
#35 0x027e4aa8 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#36 0x027e5270 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#37 0x027e5524 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#38 0x09ee153c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#39 0x06a57775 in ?? () from /usr/lib/libQtGui.so.4
#40 0x09eb3289 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#41 0x09eb3522 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#42 0x09eb7ecc in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#43 0x069a18e7 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#44 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 toquehead 2011-05-21 05:36:56 UTC
Before attempting the import, I did a "Check & Repair All" in Gnucash. The error message reported is:

Import failed:

Input file cannot be parsed; may be corrupt
error triggered by consumer
Comment 2 toquehead 2011-05-22 18:10:50 UTC
The gnucash file I was importing was on a Windows drive accessed via a VMWare "Shared Folder". When I copied the file to my Ubuntu home dir the import completed OK.

An easy workaround, but perhaps there should be some error handling upon failure to read the import file. I did also note the gnucash import crashed if my gnucash file was compressed.
Comment 3 Cristian Oneț 2011-05-22 20:20:10 UTC
SVN commit 1233113 by conet:

BUG: 273770

Replace all usage of qFatal with qWarning in KMyMoney. I mean I've heard of assertive programming but this pushes it over the edge. qFatal('Can't open file') - I prefer letting the user know that there was an error and keep running to bringing down the whole application (it provides a feeling of instability) over a file open failure.

If I went too far with this change sorry but I prefer discussing re-adding the qFatal calls on a point-by-point basis. In most cases it's a shortcut for poor error handling.


 M  +13 -13    converter/mymoneygncreader.cpp  
 M  +1 -1      converter/webpricequote.cpp  
 M  +1 -1      mymoney/mymoneyfile.cpp  
 M  +1 -1      mymoney/mymoneytransactionfilter.cpp  
 M  +1 -1      mymoney/storage/mymoneydbdriver.cpp  
 M  +2 -2      mymoney/storage/mymoneystoragesql.cpp  
 M  +1 -1      views/kscheduledview.cpp  
 M  +1 -1      wizards/newloanwizard/keditloanwizard.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1233113