<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>Hello,<br><br></div>I believe I may have found a bug in the current 4.6.4 release in regards to SQL database feature.<br><br></div>I am currently using a .kmy file and tried to migrate to a remote MySQL database.  The application is crashing severely when I hit the OK button of the database creation window.<br>

<br></div>Steps to reproduce:<br></div>1- Close current kmy file<br></div>2-File -> Open database<br></div>3-Database type: QMYSQL - MYSQL<br></div>4-DB name: kmymoney (identical to the DB on the remote server)<br></div>
5-hostname: IP of the remote server<br></div>6-username:  username that has full rights on dtaabase kmymoney on the remote SQL server<br></div>7-password: password of the user above<br></div>8-Click OK<br><br></div>I get an error popup saying:<br>
<br>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin:0px;text-indent:0px">Cannot open database sql://remoteuser@serverip/kmymoney?driver=QMYSQL&secure=yes</p>
<p style="margin:0px;text-indent:0px">Details:</p><p style="margin:0px;text-indent:0px">
</p><p style="margin:0px;text-indent:0px">Error in function int MyMoneyStorageSql::upgradeDb() : Error retrieving file info(version)</p>
<p style="margin:0px;text-indent:0px">Driver = QMYSQL, Host = serverip, User = remoteuser, Database = kmymoney</p>
<p style="margin:0px;text-indent:0px">Driver Error: </p>
<p style="margin:0px;text-indent:0px">Database Error No -1: </p>
<p style="margin:0px;text-indent:0px">Text:  </p>
<p style="margin:0px;text-indent:0px">Error type 0</p>
<p style="margin:0px;text-indent:0px">Executed: SELECT version FROM kmmFileInfo;</p>
<p style="margin:0px;text-indent:0px">Query error No -1:  </p>
<p style="margin:0px;text-indent:0px">Error type 0</p><br></div>Then I click OK and it crashes.<br><br></div>Backtrace:<br><br>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style="margin:0px;text-indent:0px">Application: KMyMoney (kmymoney), signal: Segmentation fault</p>
<p style="margin:0px;text-indent:0px">[Current thread is 1 (Thread 0x7f2150ba2780 (LWP 15838))]</p>

<p style="margin:0px;text-indent:0px">Thread 2 (Thread 0x7f214268e700 (LWP 15839)):</p>
<p style="margin:0px;text-indent:0px">#0  0x00007f214b3968b3 in poll () from /lib64/libc.so.6</p>
<p style="margin:0px;text-indent:0px">#1  0x00007f214540ce34 in ?? () from /usr/lib64/libglib-2.0.so.0</p>
<p style="margin:0px;text-indent:0px">#2  0x00007f214540d742 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0</p>
<p style="margin:0px;text-indent:0px">#3  0x00007f2142bb7e64 in ?? () from /usr/lib64/libgio-2.0.so.0</p>
<p style="margin:0px;text-indent:0px">#4  0x00007f2145434126 in ?? () from /usr/lib64/libglib-2.0.so.0</p>
<p style="margin:0px;text-indent:0px">#5  0x00007f214dfe3d6b in start_thread () from /lib64/libpthread.so.0</p>
<p style="margin:0px;text-indent:0px">#6  0x00007f214b3a0abd in clone () from /lib64/libc.so.6</p>

<p style="margin:0px;text-indent:0px">Thread 1 (Thread 0x7f2150ba2780 (LWP 15838)):</p>
<p style="margin:0px;text-indent:0px">[KCrash Handler]</p>
<p style="margin:0px;text-indent:0px">#6  0x0000000000809d6a in MyMoneyStorageSql::writeFileInfo (this=0x1357b50) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/mymoney/storage/mymoneystoragesql.cpp:2356</p>
<p style="margin:0px;text-indent:0px">#7  0x000000000080b8c7 in MyMoneyStorageSql::close (this=0x1357b50, logoff=<value optimized out>) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/mymoney/storage/mymoneystoragesql.cpp:229</p>

<p style="margin:0px;text-indent:0px">#8  0x000000000083da91 in ~MyMoneyStorageSql (this=<value optimized out>, __in_chrg=<value optimized out>) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/mymoney/storage/mymoneystoragesql.h:141</p>

<p style="margin:0px;text-indent:0px">#9  MyMoneyStorageSql::~MyMoneyStorageSql (this=<value optimized out>, __in_chrg=<value optimized out>) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/mymoney/storage/mymoneystoragesql.h:142</p>

<p style="margin:0px;text-indent:0px">#10 0x00000000004c798d in ~KSharedPtr (this=0xe26840, url=<value optimized out>) at /usr/include/ksharedptr.h:90</p>
<p style="margin:0px;text-indent:0px">#11 KMyMoneyView::openDatabase (this=0xe26840, url=<value optimized out>) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/views/kmymoneyview.cpp:884</p>
<p style="margin:0px;text-indent:0px">#12 0x00000000004c81df in KMyMoneyView::readFile (this=0xe26840, url=<value optimized out>) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/views/kmymoneyview.cpp:643</p>
<p style="margin:0px;text-indent:0px">#13 0x0000000000497b0e in KMyMoneyApp::slotFileOpenRecent (this=0xc8a690, url=...) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/kmymoney.cpp:1529</p>
<p style="margin:0px;text-indent:0px">#14 0x000000000049851f in KMyMoneyApp::slotOpenDatabase (this=0xc8a690) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/kmymoney.cpp:1444</p>
<p style="margin:0px;text-indent:0px">#15 0x00000000004a1dff in KMyMoneyApp::qt_metacall (this=0xc8a690, _c=QMetaObject::InvokeMetaMethod, _id=112, _a=0x7fffbe2f8d40) at /home/louis-philippe/kmymoney-4.6.4/build/kmymoney/kmymoney.moc:515</p>

<p style="margin:0px;text-indent:0px">#16 0x00007f214cecf60f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt/lib/libQtCore.so.4</p>
<p style="margin:0px;text-indent:0px">#17 0x00007f214bfe9092 in QAction::triggered(bool) () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#18 0x00007f214bfe928a in QAction::activate(QAction::ActionEvent) () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#19 0x00007f214c41f423 in ?? () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#20 0x00007f214c4253ba in ?? () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#21 0x00007f214f2bb76d in KMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libkdeui.so.5</p>
<p style="margin:0px;text-indent:0px">#22 0x00007f214c040df8 in QWidget::event(QEvent*) () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#23 0x00007f214c4265ab in QMenu::event(QEvent*) () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#24 0x00007f214bfef724 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#25 0x00007f214bff4a3c in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#26 0x00007f214f1eabf6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5</p>
<p style="margin:0px;text-indent:0px">#27 0x00007f214ceba1ac in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt/lib/libQtCore.so.4</p>
<p style="margin:0px;text-indent:0px">#28 0x00007f214bff0735 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt/lib/libQtGui.so.4</p>

<p style="margin:0px;text-indent:0px">#29 0x00007f214c06e18c in ?? () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#30 0x00007f214c06c649 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#31 0x00007f214c093af2 in ?? () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#32 0x00007f214540c8f3 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0</p>
<p style="margin:0px;text-indent:0px">#33 0x00007f214540d0d0 in ?? () from /usr/lib64/libglib-2.0.so.0</p>
<p style="margin:0px;text-indent:0px">#34 0x00007f214540d36d in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0</p>
<p style="margin:0px;text-indent:0px">#35 0x00007f214cee51ff in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt/lib/libQtCore.so.4</p>
<p style="margin:0px;text-indent:0px">#36 0x00007f214c09379e in ?? () from /usr/lib64/qt/lib/libQtGui.so.4</p>
<p style="margin:0px;text-indent:0px">#37 0x00007f214ceb9562 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt/lib/libQtCore.so.4</p>
<p style="margin:0px;text-indent:0px">#38 0x00007f214ceb97ac in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt/lib/libQtCore.so.4</p>
<p style="margin:0px;text-indent:0px">#39 0x00007f214cebdc4b in QCoreApplication::exec() () from /usr/lib64/qt/lib/libQtCore.so.4</p>
<p style="margin:0px;text-indent:0px">#40 0x000000000045948a in runKMyMoney (splash=<value optimized out>, a=<value optimized out>) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/main.cpp:282</p>
<p style="margin:0px;text-indent:0px">#41 0x000000000045b353 in main (argc=1, argv=0x7fffbe2fb298) at /home/louis-philippe/kmymoney-4.6.4/kmymoney/main.cpp:181</p><br><div>I hope this helps...<br>Thanks!<br></div></div>