When I try to open a data file in SQLite format it crashes with the following error: Error in function const QMap MyMoneyStorageSql::fetchSchedules(const QStringList&, bool) const : reading Schedules Driver = QSQLITE, Host = localhost, User = robert, Database = /home/robert/Documents/kmymoney/robert.kdbx Driver Error: Database Error No -1: Text: Error type 0 Executed: SELECT id, name, type, typeString, occurence, occurenceMultiplier, occurenceString, paymentType, paymentTypeString, startDate, endDate, fixed, autoEnter, lastPayment, nextPaymentDue, weekendOption, weekendOptionString FROM kmmSchedules ORDER BY id;; Query error No -1: No query Unable to fetch row Error type 1 in file /build/buildd/kmymoney-4.6.1/kmymoney/mymoney/storage/mymoneystoragesql.cpp line 3362 Steps to reproduce: 1.Start KMyMoney 2.Chose File|Open Database from the menu Additional information: This crash happens every time I try to open the file. I'm running Kubuntu 11.10 64 bit updated to KDE 4.8.0. I've been using this SQLite based file for months, but for the last couple of weeks sometimes KDE would crash when I closed it. Not sure it those crashes are tied to this crash. I pulled the SQL string from the error text and used SQLiteman to open the file and executed the SQL without any errors. I even included the double semicolon (";;") in the SQL and it didn't generate an error, but SQLiteman may have auto-corrected the SQL for all I know. I was wondering if the double semicolon was causing a SQL syntax error but apparently not. Here is the back trace: Application: KMyMoney (kmymoney), signal: Aborted [Current thread is 1 (Thread 0x7ff754baf7a0 (LWP 5210))] Thread 2 (Thread 0x7ff73cae2700 (LWP 5211)): #0 0x00007ff74f32b773 in poll () from /lib/x86_64-linux-gnu/libc.so.6 #1 0x00007ff74a823f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007ff74a824429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007ff750e87c06 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #4 0x00007ff750e573e2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #5 0x00007ff750e57637 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #6 0x00007ff750d57067 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #7 0x00007ff750e3717f in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #8 0x00007ff750d5a08b in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4 #9 0x00007ff751fbeefc in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #10 0x00007ff74f33789d in clone () from /lib/x86_64-linux-gnu/libc.so.6 #11 0x0000000000000000 in ?? () Thread 1 (Thread 0x7ff754baf7a0 (LWP 5210)): [KCrash Handler] #6 0x00007ff74f28c3a5 in raise () from /lib/x86_64-linux-gnu/libc.so.6 #7 0x00007ff74f28fb0b in abort () from /lib/x86_64-linux-gnu/libc.so.6 #8 0x00007ff74fb4ad7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #9 0x00007ff74fb48f26 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #10 0x00007ff74fb48f53 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #11 0x00007ff74fb4904e in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #12 0x0000000000456e48 in main (argc=1, argv=0x7fff922b6368) at /build/buildd/kmymoney-4.6.1/kmymoney/main.cpp:185
I think I remember fixing this in the last release cycle. The double semi-colon was the issue. Can you test with 4.6.2 to see if it still occurs?
Spoke too soon... I just duplicated the error.
Git commit 6af4b33df2476f568db852d96b99eb45eaa2e21f by Fernando Vilas. Committed on 03/03/2012 at 05:25. Pushed by fvilas into branch 'master'. Fix crash on opening SQLite database. M +0 -2 kmymoney/mymoney/storage/mymoneystoragesql.cpp http://commits.kde.org/kmymoney/6af4b33df2476f568db852d96b99eb45eaa2e21f
Git commit 227cba74b84c55c3d8677f0c10e3f8e35c84e04e by Thomas Baumgart, on behalf of Fernando Vilas. Committed on 03/03/2012 at 05:25. Pushed by tbaumgart into branch '4.6'. Fix crash on opening SQLite database. (cherry picked from commit 6af4b33df2476f568db852d96b99eb45eaa2e21f) M +0 -2 kmymoney/mymoney/storage/mymoneystoragesql.cpp http://commits.kde.org/kmymoney/227cba74b84c55c3d8677f0c10e3f8e35c84e04e
I downloaded the 4.6.2 source from Sourceforge.net and after jumping through all the hoops and cmake errors (had to install all the needed development tools) I was finally able to build KMyMoney 4.6.2 on my machine. Unfortunately, as you noted, it didn't solve the problem. However, I downloaded the new mymoneystoragesql.cpp file you committed and replaced the one I had and after building the app with the replacement file I'm happy to say that I was able to open my SQLite .kdbx file and catch up on my banking and bill paying. I did a "Save As..." to a .kmy as a precaution and closed the app and was able to reopen it without any issues. The app is even faster, although I'm not sure if that's due to my building it on a 64 bit machine or (more likely) to performance enhancements you guys have made between the 4.5.3 version I had through Kubuntu and the 4.6.2 version. Thanks for getting on top of things and fixing it so quickly! Robert Rathbone