Crash on Mac when using QOpenGlWidget in 6.5.3
-
Hi all
We have an application which uses a QMDIArea in which a QOpenGLWidget is shown. This works flawlessly on Windows and have done so on Mac as well until we upgraded from 5.15 to 6.5.3. It still works as expected on Windows but on Mac we now get some Seqfaults in QWidget::hide() if e.g. another application is moved over our QOpenGLWidget or if we resize our application.
I haven't been able to find any bug reports about this, but if we upgrade to 6.7.2 it works again.This is the stack dump we get:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 QtWidgets 0x10b50d974 QWidget::hide() + 4 1 QtWidgets 0x10b65aaaf 0x10b4b0000 + 1747631 2 QtWidgets 0x10b65a4d9 0x10b4b0000 + 1746137 3 QtWidgets 0x10b4ef9ad QLayoutPrivate::doResize() + 205 4 QtWidgets 0x10b4f005a QLayout::activate() + 1338 5 QtWidgets 0x10b4bef88 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 216 6 QtWidgets 0x10b4bfdcc QApplication::notify(QObject*, QEvent*) + 508 7 QtCore 0x10bb29a1a QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170 8 QtCore 0x10bb2abec QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1468 9 libqcocoa.dylib 0x109852cd6 0x10983b000 + 97494 10 libqcocoa.dylib 0x10985370d 0x10983b000 + 100109 11 CoreFoundation 0x7ff80ee31087 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 12 CoreFoundation 0x7ff80ee31029 __CFRunLoopDoSource0 + 157 13 CoreFoundation 0x7ff80ee30df4 __CFRunLoopDoSources0 + 215 14 CoreFoundation 0x7ff80ee2fa71 __CFRunLoopRun + 919 15 CoreFoundation 0x7ff80ee2f112 CFRunLoopRunSpecific + 557 16 HIToolbox 0x7ff819848a09 RunCurrentEventLoopInMode + 292 17 HIToolbox 0x7ff819848816 ReceiveNextEventCommon + 665 18 HIToolbox 0x7ff819848561 _BlockUntilNextEventMatchingListInModeWithFilter + 66 19 AppKit 0x7ff81249fc61 _DPSNextEvent + 880 20 AppKit 0x7ff812db3dc0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1273 21 AppKit 0x7ff812491075 -[NSApplication run] + 603 22 libqcocoa.dylib 0x109852127 0x10983b000 + 94503 23 QtCore 0x10bb33486 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 486 24 QtCore 0x10bb2a007 QCoreApplication::exec() + 119 25 <OurApp> 0x1095352bb main + 2395 26 dyld 0x7ff80e9c8366 start + 1942If we change style to Fusion it seems to works as well.
We have tried with an empty QOpenGLWidget but that gives us the same result.I'm running out of ideas what to try now. Of course we could just update to 6.7.2 but the customer would rather stay on the LTS version and also I would personally very much like to know the root course
-
Sounds like a fun bisecting exercise :-)
I fail to reproduce it, by just showing and hiding an emptyQOpenGLWidget.
git blame src/openglwidgets/qopenglwidget.cppdidn't surface anything suspicious - which doesn't mean much because styles seem to play a role as well.
Can you boil the code down to a minimal reproducer?