QThread attempts to lock something when it exits using a QMutexLocker class.
{
QMutexLocker locker
(&d
->mutex
);
// <------ Crashes here! d == 0x0 d->data->quitNow = true;
for (int i = 0; i < d->data->eventLoops.size(); ++i) {
QEventLoop *eventLoop
= d
->data
->eventLoops.
at(i
);
eventLoop->exit(returnCode);
}
}
void QThread::exit(int returnCode)
{
Q_D(QThread);
QMutexLocker locker(&d->mutex); // <------ Crashes here! d == 0x0
d->data->quitNow = true;
for (int i = 0; i < d->data->eventLoops.size(); ++i) {
QEventLoop *eventLoop = d->data->eventLoops.at(i);
eventLoop->exit(returnCode);
}
}
To copy to clipboard, switch view to plain text mode
Just trying to declare the QMutexLocker causes a crash.
This looks like a Qt bug, but I'm not sure.
Any ideas? It looks like "d" might not have been allocated.
Bookmarks