Summary: | KMyMoney crashes upon loading exported file from Skrooge | ||
---|---|---|---|
Product: | [Applications] kmymoney | Reporter: | Vit Pelcak <vit> |
Component: | general | Assignee: | Vit Pelcak <vit> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | stephane, tbaumgart |
Priority: | NOR | ||
Version: | SVN | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | testing exported file from Skrooge |
Description
Vit Pelcak
2010-10-03 09:49:23 UTC
Could you please reproduce this with a Skrooge test file since it could be a problem in their export procedure (that they don't generate a valid kmymoney file) and please attach it to this bug. Created attachment 53405 [details]
testing exported file from Skrooge
I cannot reproduce this problem with Skrooge empty file.
I have created file which is not empty and crashes KMyMoney.
Backtrace:
Application: KMyMoney (kmymoney), signal: Aborted
[Current thread is 1 (Thread 0x7f1c526fc760 (LWP 4771))]
Thread 3 (Thread 0x7f1c38c41710 (LWP 4772)):
#0 0x00007f1c4d0c21d3 in poll () from /lib/libc.so.6
#1 0x00007f1c4821d009 in ?? () from /lib/libglib-2.0.so.0
#2 0x00007f1c4821d45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3 0x00007f1c4df1a1e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4 0x00007f1c4deeca02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5 0x00007f1c4deecdec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6 0x00007f1c4ddf72fd in QThread::exec() () from /usr/lib/libQtCore.so.4
#7 0x00007f1c4decc5f8 in ?? () from /usr/lib/libQtCore.so.4
#8 0x00007f1c4ddfa27e in ?? () from /usr/lib/libQtCore.so.4
#9 0x00007f1c4fd20971 in start_thread () from /lib/libpthread.so.0
#10 0x00007f1c4d0ce91d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()
Thread 2 (Thread 0x7f1c30bdd710 (LWP 4773)):
#0 0x00007f1c4fd24e09 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1 0x00007f1c4ddfada2 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQtCore.so.4
#2 0x00007f1c4ddefda2 in ?? () from /usr/lib/libQtCore.so.4
#3 0x00007f1c4ddfa27e in ?? () from /usr/lib/libQtCore.so.4
#4 0x00007f1c4fd20971 in start_thread () from /lib/libpthread.so.0
#5 0x00007f1c4d0ce91d in clone () from /lib/libc.so.6
#6 0x0000000000000000 in ?? ()
Thread 1 (Thread 0x7f1c526fc760 (LWP 4771)):
[KCrash Handler]
#6 0x00007f1c4d01bba5 in raise () from /lib/libc.so.6
#7 0x00007f1c4d01f6b0 in abort () from /lib/libc.so.6
#8 0x00007f1c4d8bf6bd in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#9 0x00007f1c4d8bd906 in ?? () from /usr/lib/libstdc++.so.6
#10 0x00007f1c4d8bc8d9 in ?? () from /usr/lib/libstdc++.so.6
#11 0x00007f1c4d8bd1f5 in __gxx_personality_v0 () from /usr/lib/libstdc++.so.6
#12 0x00007f1c4d37a49b in ?? () from /lib/libgcc_s.so.1
#13 0x00007f1c4d37a72d in _Unwind_RaiseException () from /lib/libgcc_s.so.1
#14 0x00007f1c4d8bda31 in __cxa_throw () from /usr/lib/libstdc++.so.6
#15 0x00007f1c522c564c in MyMoneyFile::checkTransaction (this=<value optimized out>, txt=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/mymoney/mymoneyfile.cpp:148
#16 0x00007f1c522c5790 in MyMoneyFile::rollbackTransaction (this=0x12a3) at /build/buildd/kmymoney-4.5/kmymoney/mymoney/mymoneyfile.cpp:166
#17 0x00007f1c522c57c6 in MyMoneyFileTransaction::rollback (this=0x7ffff77ecff0) at /build/buildd/kmymoney-4.5/kmymoney/mymoney/mymoneyfile.cpp:2415
#18 0x00000000004ce97c in KMyMoneyView::readFile (this=0x239cc80, url=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/views/kmymoneyview.cpp:803
#19 0x0000000000496299 in KMyMoneyApp::slotFileOpenRecent (this=<value optimized out>, url=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/kmymoney.cpp:1502
#20 0x0000000000497198 in KMyMoneyApp::slotFileOpen (this=0x20d4fd0) at /build/buildd/kmymoney-4.5/kmymoney/kmymoney.cpp:1407
#21 0x000000000049e71d in KMyMoneyApp::qt_metacall (this=0x20d4fd0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7ffff77edcd0) at /build/buildd/kmymoney-4.5/obj-x86_64-linux-gnu/kmymoney/kmymoney.moc:513
#22 0x00007f1c4df05b27 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#23 0x00007f1c4e89c852 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4
#24 0x00007f1c4e89df5b in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4
#25 0x00007f1c4ec7d57a in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007f1c4ec7d82c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#27 0x00007f1c4ed4d52a in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#28 0x00007f1c4e8fa04e in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#29 0x00007f1c4e8a3fdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#30 0x00007f1c4e8aa30e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#31 0x00007f1c50d25526 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#32 0x00007f1c4deedcdc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#33 0x00007f1c4e8a8dbe in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#34 0x00007f1c4e92c345 in ?? () from /usr/lib/libQtGui.so.4
#35 0x00007f1c4e92ac5c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#36 0x00007f1c4e9570e2 in ?? () from /usr/lib/libQtGui.so.4
#37 0x00007f1c48219342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#38 0x00007f1c4821d2a8 in ?? () from /lib/libglib-2.0.so.0
#39 0x00007f1c4821d45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#40 0x00007f1c4df1a193 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#41 0x00007f1c4e956a4e in ?? () from /usr/lib/libQtGui.so.4
#42 0x00007f1c4deeca02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#43 0x00007f1c4deecdec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#44 0x00007f1c4def0ebb in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#45 0x0000000000452d58 in main (argc=<value optimized out>, argv=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/main.cpp:260
Maybe it could be bug in Skrooge export, however KMyMoney shouldn't just crash anyway.
The cause of this problem in fact is the false generation of the KMyMoney file by Skrooge. The ACCOUNT entries are malformed. They show <ACCOUNT currency="Kč" description="" number="" parentaccount="" opened="" type="9" lastmodified="" id="AStd::Asset" lastreconciled="" name="Asset" institution=""> whereas they need to show <ACCOUNT currency="CZK" description="" number="" parentaccount="" opened="" type="9" lastmodified="" id="AStd::Asset" lastreconciled="" name="Asset" institution=""> Hint for the skrooge devs: Use the currency's ID rather than the symbol to craft the account entries. The resp. currency entry shows: <CURRENCY saf="100" symbol="Kč" type="3" id="CZK" name="Česká koruna (CZK)" ppu="100" scf="100"/> I move this entry over to Skrooge. Once fixed, please send it back to KMyMoney4 so that we can work on eliminating the crash in case of a broken file. This problem is already corrected with current SVN version of Skrooge If this was corrected in Skrooge do we need something else to do on our side? Maybe when openning any kmymoney file we should handle the thrown KMyMoneyException with an invalid file message? If there's nothing else to do then please closed this bug. Yes, please. Add some notification about corrupted file. No program should crush like that, IMHO. Thank you. SVN commit 1206653 by tbaumgart: Improve handling if a file is loaded with an invalid base currency assignment BUG: 253099 M +16 -2 dialogs/kcurrencyeditdlg.cpp M +56 -10 views/kmymoneyview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1206653 |