tags:

views:

70

answers:

1

Hello all,

I am coding an application on Mac OS X / QT. I have a thread with an event loop. In this thread I make Mysql queries each tick (called by a qtimer).

Randomly my application crashs with the following backtrace:

0 0x00e27acd in QMutex::lock ()

1 0x00f5842d in QMetaObjectPrivate::connect ()

2 0x00f5897f in QObject::connect ()

3 0x0134c230 in QMYSQLResult::QMYSQLResult ()

4 0x0134c2d9 in QMYSQLDriver::createResult ()

5 0x0006daae in QSqlDatabase::exec ()

What can be the problem ?

A: 

You should ensure that you setup the MySQL connection from the same thread as you perform the MySQL queries from.

Ton van den Heuvel