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

Segmentation fault in QODBCDriver::cleanup()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Need More Info
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 5.13.1
    • Fix Version/s: None
    • Component/s: SQL Support
    • Labels:
      None
    • Platform/s:
      Windows

      Description

      Qt 5.13.1 Windows MinGW 64 bit.

       

      After trying to CREATE TABLE with a user that does not have permission to do so, I catch the error and call exit(), during clean up I get a signal SEGSEGV \ Segmentation fault in 

      QODBCDriver::cleanup - see attached screen dump.

       

      Prior to creating the table(s) I have connected to the DB using (something like) this code:

       

      #define DRIVER_NAME "QODBC"
      
      class CSQL
      {
      public:
          QSqlDatabase mDB;
      };
      
      CSQL::CSQL()
      {
      }
      
      CSQL::~CSQL ()
      {
      }
      
      bool CSQL::Connect (const char *pHostName, const char *pDatabaseName, const char *pUserName, const char *pPassword)
      {
          bool ok;
          QString str;
          Log.Info (CLog::SQL, QString ("CSQL::Connect (%1,%2,...)").arg (pHostName).arg (pDatabaseName));
          // set the default to use for any future open() calls...
          mDB = QSqlDatabase::addDatabase (DRIVER_NAME);
          str = QString ("Driver=%5;SERVER=%1;DATABASE=%2;UID=%3;PWD=%4").arg (pHostName)
                                                                         .arg (pDatabaseName)
                                                                         .arg (pUserName)
                                                                         .arg (pPassword)
                                                                         .arg (SQL_DRIVER_NAME);
           mDB.setDatabaseName (str);// Try to open the database
           if (!mDB.open (pUserName, pPassword))
                ok = false;
           else
                ok = true;
      
          return (ok);
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            mabrand Mark Brand
            Reporter:
            chrisemsen Chris Emsen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes