Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
6.5.1
-
Qt 6.5.1
macOS 13.4
Xcode 14.3
Description
Cloned / Separated out from QTBUG-113973 as this issue seems to be separate. In short, it seems like the QQuickWindow ends up calling NSView convertSizeToBacking from the wrong thread.
Please see attached project.
Configure with CMake for Xcode generator, run with Xcode.
API is supposed to be used from main thread only.
Main Thread Checker /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:1925 -[NSView convertSizeToBacking:] must be used from main thread only Thread 26 #0 0x000000010625a98b in QCocoaWindow::devicePixelRatio() const [inlined] at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:1925 #1 0x000000010625a97c in non-virtual thunk to QCocoaWindow::devicePixelRatio() const () #2 0x000000010625a97b in non-virtual thunk to QCocoaWindow::devicePixelRatio() const () #3 0x000000010303dea3 in QWindow::devicePixelRatio() const at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/gui/kernel/qwindow.cpp:1334 #4 0x00000001043af78f in QQuickWindow::effectiveDevicePixelRatio() const [inlined] () #5 0x00000001043af764 in QQuickWindowPrivate::syncSceneGraph() at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtdeclarative/src/quick/items/qquickwindow.cpp:531 #6 0x00000001043af763 in QQuickWindowPrivate::syncSceneGraph() at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtdeclarative/src/quick/items/qquickwindow.cpp:531 #7 0x0000000104539ddf in QSGRenderThread::sync(bool) at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:550 #8 0x000000010453a177 in QSGRenderThread::syncAndRender() at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:688 #9 0x000000010453b1a7 in QSGRenderThread::run() at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtdeclarative/src/quick/scenegraph/qsgthreadedrenderloop.cpp:938 #10 0x000000010664c3a3 in QThreadPrivate::start(void*)::$_0::operator()() const [inlined] at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/corelib/thread/qthread_unix.cpp:321 #11 0x000000010664c2a4 in void (anonymous namespace)::terminate_on_exception<QThreadPrivate::start(void*)::$_0>(QThreadPrivate::start(void*)::$_0&&) [inlined] at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/corelib/thread/qthread_unix.cpp:257 #12 0x000000010664c2a4 in QThreadPrivate::start(void*) at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/corelib/thread/qthread_unix.cpp:280 #13 0x000000010664c2a3 in QThreadPrivate::start(void*) at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/corelib/thread/qthread_unix.cpp:278 #14 0x000000010664c2a3 in QThreadPrivate::start(void*) at /Users/sergei.nevdakh/Qt/6.5.1.universal/qt_src_6.5.1/qtbase/src/corelib/thread/qthread_unix.cpp:278 #15 0x00000001024f955b in _pthread_start ()
Attachments
Issue Links
- clones
-
QTBUG-113973 [macOS] QQuickWebEngineProfile::defaultProfile() in main thread causes runtime warning "This method should not be called on the main thread as it may lead to UI unresponsiveness."
- Closed
- duplicates
-
QTBUG-97518 Mac, Metal RHI - runtime warnings "UI API called from background thread".
- Closed
- is duplicated by
-
QTBUG-117366 macOS: QQuickWindow calls into UI from render thread
- Closed
-
QTBUG-115093 [macOS] [NSView convertSizeToBacking:] must be used from main thread only
- Closed
- relates to
-
QTBUG-64431 Investigate iOS/macOS main thread checker violations
- Open