Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt 5.12 crashing intermittently on Mac - update
AndyBrice last edited by
The crash always happens here:
0 org.qt-project.QtCore 0x000000010d138fe8 QMetaObject::cast(QObject*) const + 24 1 org.qt-project.QtWidgets 0x000000010c47674b QWidget::isActiveWindow() const + 283 2 org.qt-project.QtWidgets 0x000000010c486aad QWidget::initPainter(QPainter*) const + 45 3 org.qt-project.QtGui 0x000000010cc508dd QPainter::begin(QPaintDevice*) + 781 4 org.qt-project.QtGui 0x000000010cc505c2 QPainter::QPainter(QPaintDevice*) + 242 5 org.qt-project.QtWidgets 0x000000010c479937 QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const
It happened in Qt 5.12.0 to 5.12.2. Updating to Qt 5.12.3 and 5.12.4 didn't fix it.
The crash didn't happen in Qt 5.11.0, but that has other issues and I wanted to upgrade to a newer version.
On the couple of time I managed to get it to happen it seems that a QEvent was being passed to QMainWindow::event() of type QEvent::UpdateRequest with a null QEvent::d member. Presumably that null was causing the crash when it was cast further down.
I couldn't reproduce the crash reliably until I saw that this bug fix in 5.12.5:
To reproduce the crash:
-open a modal dialog
-open another modal dialog from the first modal dialog
-close the second modal dialog
-close the first modal dialog using the small red close button at the top of the window (not one of the buttons at the bottom)
This causes a crash with the stack trace above. Upgrading to 5.12.5 fixes it.
The bug fix says it is a regression since 5.12.4. But I was having this crash back to Qt 5.12.0. So I don't know if there are other ways to cause a crash with the same track trace that won't be fixed by the new Qt version. I will have to see if I get further reports of crashes from users with the same stack trace.
I hope this information might be useful to someone else.
If anyone has any further information on this issue, please let me know.