Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS graph size estimate plot crash #38

Open
timangus opened this issue Nov 23, 2021 · 0 comments
Open

macOS graph size estimate plot crash #38

timangus opened this issue Nov 23, 2021 · 0 comments

Comments

@timangus
Copy link
Contributor

There is a rare crash that occurs when interacting with the graph size estimate plot, but only on macOS. The crash occurs in QOpenGLContext::makeCurrent:

[ 00 ] QOpenGLContext::makeCurrent(QSurface*)
[ 01 ] reallocateBuffer
[ 02 ] setupPaintBuffers
[ 03 ] replot
[ 04 ] QObject::event(QEvent*)
[ 05 ] event
[ 06 ] QApplicationPrivate::notify_helper(QObject*, QEvent*)
[ 07 ] QApplication::notify(QObject*, QEvent*)
[ 08 ] QCoreApplication::notifyInternal2(QObject*, QEvent*)
[ 09 ] QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*)
[ 10 ] QCocoaEventDispatcherPrivate::processPostedEvents()
[ 11 ] QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*)
[ 12 ] __CFRunLoopDoSource1
[ 13 ] __CFRunLoopDoSource1
[ 14 ] __CFRunLoopServiceMachPort
[ 15 ] __CFRunLoopRun
[ 16 ] CFArrayGetCountOfValue
[ 17 ] RunCurrentEventLoopInMode
[ 18 ] ReceiveNextEventCommon
[ 19 ] _BlockUntilNextEventMatchingListInModeWithFilter
[ 20 ] _DPSNextEvent
[ 21 ] -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
[ 22 ] -[NSApplication _doModalLoop:peek:]
[ 23 ] __33-[NSApplication runModalSession:]_block_invoke_2
[ 24 ] __33-[NSApplication runModalSession:]_block_invoke
[ 25 ] _NSTryRunModal
[ 26 ] -[NSApplication runModalSession:]
[ 27 ] QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
[ 28 ] QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)
[ 29 ] QCoreApplication::exec()
[ 30 ] start
[ 31 ] main
[ 32 ] 0x7fff70d36cc9

With some tedious logging and investigation it looks like the crash is actually in QWindow::surfaceHandle() (presumably inlined into ::makeCurrent). 5d534b7 disables OpenGL acceleration on macOS for QCustomPlotQuickItem based plots, hopefully preventing this crash. A warning is also added that is triggered when building against a newer version of Qt; there is some circumstantial evidence it was a bug in Qt that has subsequently been fixed, so hopefully OpenGL can be re-enabled in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant