Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-47452

QSqlDatabase crashes when can't connect

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.5.0
    • Fix Version/s: 5.5.1
    • Component/s: SQL Support
    • Labels:
      None
    • Commits:
      0de6c52bfe2433eca768a5f6fe9d5f08a545c254

      Description

      MySQL - mysql-connector-c-6.1.0
      OS - Windows 7 64, Android 4.2.2

      QSqlDatabase crashes when can't connect

      QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL3");
      db.setHostName("some non existent host");
      db.setPort(3306);
      db.setUserName("root");
      db.setPassword("password");
      db.setDatabaseName("mysql");

      if (!db.open())

      { qDebug() << db.lastError().text(); }
      Thread 2 (Thread 4616.0x4a0):
      #0  0x778e015d in ntdll!ZwWaitForMultipleObjects () from C:\Windows\SysWOW64\ntdll.dll
      No symbol table info available.
      #1  0x778e015d in ntdll!ZwWaitForMultipleObjects () from C:\Windows\SysWOW64\ntdll.dll
      No symbol table info available.
      #2  0x77912f91 in ntdll!RtlMoveMemory () from C:\Windows\SysWOW64\ntdll.dll
      No symbol table info available.
      #3  0x00000001 in ?? ()
      No symbol table info available.
      #4  0x00000001 in ?? ()
      No symbol table info available.
      #5  0x00000000 in ?? ()
      No symbol table info available.
      
      Thread 1 (Thread 4616.0x1378):
      #0  0x540b0563 in ?? () from G:\SOFT\MySQL\mysql-connector-c-6.1.0-win32\lib\libmysql.dll
      No symbol table info available.
      #1  0x540b0799 in ?? () from G:\SOFT\MySQL\mysql-connector-c-6.1.0-win32\lib\libmysql.dll
      No symbol table info available.
      #2  0x540b9aed in mysql_get_server_version () from G:\SOFT\MySQL\mysql-connector-c-6.1.0-win32\lib\libmysql.dll
      No symbol table info available.
      #3  0x00000001 in ?? ()
      No symbol table info available.
      #4  0x0028fc20 in ?? ()
      No symbol table info available.
      #5  0x6794482e in QSqlDatabase::open (this=0x28fdf8) at kernel\qsqldatabase.cpp:835
      No locals.
      #6  0x0040179e in qMain (argc=1, argv=0x3338e0) at ..\untitled24\main.cpp:17
              a = {<QGuiApplication> = {<QCoreApplication> = {<QObject> = {_vptr.QObject = 0xcd7e48 <vtable for QApplication+8>, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x6bb717c0 <qt_meta_stringdata_QObject>, data = 0x6bb718c0 <qt_meta_data_QObject>, static_metacall = 0x6b908eec <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x333978}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x6bc30700 <qt_meta_stringdata_Qt>, data = 0x6bc38e40 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x6bb7134c <QObject::staticMetaObject>, stringdata = 0x6bc45400 <qt_meta_stringdata_QCoreApplication>, data = 0x6bc455c0 <qt_meta_data_QCoreApplication>, static_metacall = 0x6b968828 <QCoreApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, static self = 0x28fdfc}, static staticMetaObject = {d = {superdata = 0x6bc45384 <QCoreApplication::staticMetaObject>, stringdata = 0xa38cdc0 <qt_meta_stringdata_QGuiApplication>, data = 0xa38d1c0 <qt_meta_data_QGuiApplication>, static_metacall = 0x9f5e1c4 <QGuiApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0xa383040 <QGuiApplication::staticMetaObject>, stringdata = 0xbff4c0 <qt_meta_stringdata_QApplication>, data = 0xbff740 <qt_meta_data_QApplication>, static_metacall = 0x7a11d8 <QApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}
              db = {static defaultConnection = 0x679696a5 <_ZStL6ignore+214> "qt_sql_default_connection", d = 0x33e648}
              __PRETTY_FUNCTION__ = "int qMain(int, char**)"
              w = {<QWidget> = {<QObject> = {_vptr.QObject = 0x28fe48, static staticMetaObject = {d = {superdata = 0x0, stringdata = 0x6bb717c0 <qt_meta_stringdata_QObject>, data = 0x6bb718c0 <qt_meta_data_QObject>, static_metacall = 0x6b908eec <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, d_ptr = {d = 0x779371f5 <ntdll!WinSqmSetIfMaxDWORD+49>}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x6bc30700 <qt_meta_stringdata_Qt>, data = 0x6bc38e40 <qt_meta_data_Qt>, static_metacall = 0x0, relatedMetaObjects = 0x0, extradata = 0x0}}}, <QPaintDevice> = {_vptr.QPaintDevice = 0x31b50df, painters = 65534, reserved = 0x778f38aa <ntdll!RtlImageNtHeader+1814>}, static staticMetaObject = {d = {superdata = 0x6bb7134c <QObject::staticMetaObject>, stringdata = 0xc05b00 <qt_meta_stringdata_QWidget>, data = 0xc06580 <qt_meta_data_QWidget>, static_metacall = 0x7dc112 <QWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}, data = 0x778f34a2 <ntdll!RtlImageNtHeader+782>}, static staticMetaObject = {d = {superdata = 0xbfc060 <QWidget::staticMetaObject>, stringdata = 0x4051a4 <qt_meta_stringdata_Widget>, data = 0x4051c0 <qt_meta_data_Widget>, static_metacall = 0x401a34 <Widget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>, relatedMetaObjects = 0x0, extradata = 0x0}}}
      #7  0x00402c90 in WinMain@16 () at qtmain_win.cpp:113
              argc = 1
              argvW = 0x58d970
              argv = 0x3338e0
              exitCode = 92
      #8  0x004033dd in main ()
      No symbol table info available.
      

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                sgaist Samuel Gaist
                Reporter:
                kandrey kandrey
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes