[mythtv] [mythtv-commits] mythtv commit: r16790 - in trunk byjanne
Anduin Withers
awithers at anduin.com
Wed Mar 26 06:03:33 UTC 2008
There is also a Qt 4 bug in the MySQL driver that causes database open
failures to crash (the way we currently use MSqlQuery).
The following code should reproduce it:
#include <QApplication>
#include <QSqlDatabase>
#include <QSqlQuery>
int main(int argc, char *argv[]) {
QApplication qapp(argc, argv);
QSqlDatabase qsdb = QSqlDatabase::addDatabase("QMYSQL", "atest");
qsdb.setHostName("test");
qsdb.setDatabaseName("test");
qsdb.setUserName("test");
qsdb.setPassword("test");
qsdb.open();
QSqlQuery query(qsdb);
}
Backtraces that end in:
#0 0x00002aaaaf7e865d in QMYSQLResult::cleanup (this=0x649c60)
at ../../../sql/drivers/mysql/qsql_mysql.cpp:410
#1 0x00002aaaaf7e89a4 in ~QMYSQLResult (this=0x649c6d)
at ../../../sql/drivers/mysql/qsql_mysql.cpp:381
#2 0x000000339fc10b4e in ~QSqlQuery (this=<value optimized out>)
at kernel/qsqlquery.cpp:249
#3 MSqlQuery::~MSqlQuery
may be suspect.
> mythfrontend -p segfaults
This seems to be the cause.
I've created a Qt 4 bug for this issue. We should find some workaround as
the travel time to a Qt 4 near you probably prohibits anything else.
The actual bug is in QMYSQLResult::cleanup which uses d->mysql even if it
was made invalid in QMYSQLDriver::open.
--
Anduin Withers
More information about the mythtv-dev
mailing list