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

Segfault when executing simple query with SQLite3

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.10.1
    • 5.10.0 RC2
    • SQL Support
    • None
    • macOS 10.13.1, QtCreator 4.4.1, compilers from Xcode 9.1, Qt 5.10 RC2
    • 52b85212a2ec8ec5bf187f6cd00b669a45bcf0bd

    Description

      SQLite3 driver in 5.10 RC2 is unusable on macOS. It segfaults on simple query like posted below. (on the line with 'QSqlQuery insertSolution...'). This runs fine on older versions (like 5.9.3).

          QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", "ResultsDB");
          db.setDatabaseName(":memory:");
          if (!db.open()) {
              qDebug() << "Unable to establish a SQLite database connection.";
              return -1;
          }
      
          db.exec("CREATE TABLE IF NOT EXISTS solutions (col1, col2)");
          QSqlQuery insertSolution("INSERT INTO solutions (col1, col2) VALUES (?,?)", db);
      

      Stack trace of crash is:

          1 QVariant::QVariant(QVariant const&)                            0x100306e3d    
          2 QSQLiteResult::exec()                                          0x105b88591    
          3 QSQLiteResult::reset(QString const&)                           0x105b87e1c    
          4 QSqlQuery::exec(QString const&)                                0x1000a76d0    
          5 qInit(QSqlQuery *, QString const&, QSqlDatabase)               0x1000a7007    
          6 QSqlQuery::QSqlQuery(QString const&, QSqlDatabase)             0x1000a705d    
          7 main                                               main.cpp 16 0x10000250e    
          8 start                                                          0x7fff6fcac145 
          9 start                                                          0x7fff6fcac145 
      

       

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-64923
          # Subject Branch Project Status CR V

          Activity

            People

              andysh Andy Shaw
              jcm Jean-Claude Monnin
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes