QSqlTableModel::select crash

  • Hello, My code crashes

    CallStack is This

    qsqlite.dll!columnName(sqlite3_stmt * pStmt, int N, const void ()(Mem *) xFunc, int useType)
    qsqlite.dll!QSQLiteResultPrivate::initColumns(bool emptyResultset)
    qsqlite.dll!QSQLiteResultPrivate::fetchNext(QVector<QVariant> & values, int idx, bool initialFetch)
    Qt5Sql.dll!qInit(QSqlQuery * q, const QString & query, QSqlDatabase db)
    Qt5Sql.dll!QSqlQuery::QSqlQuery(const QString & query, QSqlDatabase db)

    I am not sure why the crash occurs. It cannot be reproduced, it is only recorded on the log.

    Please help me

  • @Qt-Jo-Ha
    Nobody can guess your line of code from this stack trace. Something wrong with a non-existent column name, or perhaps a bad query? You need to run your application under debugger to see your own call when it crashes, if you are unable to guess; otherwise look at all your QSqlTableModels' code.

  • I really appreciate your response

    I am looking at the code in more detail

Log in to reply