Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.1
-
None
Description
- Compile Qt example widgets/mainwindows/application
- Run application with QT_SCREEN_SCALE_FACTORS="1;8"
- Move main window between screens
- Note memory usage peaks (memory usage jumps from 60mb to 2gb, then back to normal)
See https://www.screencast.com/t/a2jer1VIEQEc
For real applications, it causes a crash, e.g.,
https://bugreports.qt.io/browse/QTBUG-92027
https://bugreports.qt.io/browse/QTBUG-79577
Crash callstack on MacOS:
#3 0x0000000115153218 in qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/global/qlogging.cpp:1907#3 0x0000000115153218 in qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/global/qlogging.cpp:1907#4 0x00000001151556de in QMessageLogger::fatal(char const*, ...) const at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/global/qlogging.cpp:888#5 0x0000000115149bf7 in qt_assert(char const*, char const*, int) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/global/qglobal.cpp:3212#6 0x000000011ad91ab6 in QIOSurfaceGraphicsBuffer::QIOSurfaceGraphicsBuffer(QSize const&, QPixelFormat const&, QCFType<CGColorSpace*>) at /Users/venge/Qt/5.12.5/Src/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm:62#7 0x000000011ad2cb09 in QCALayerBackingStore::GraphicsBuffer::GraphicsBuffer(QSize const&, double, QPixelFormat const&, QCFType<CGColorSpace*>) at /Users/venge/Qt/5.12.5/Src/qtbase/src/plugins/platforms/cocoa/qcocoabackingstore.mm:673#8 0x000000011ad29cdf in QCALayerBackingStore::GraphicsBuffer::GraphicsBuffer(QSize const&, double, QPixelFormat const&, QCFType<CGColorSpace*>) at /Users/venge/Qt/5.12.5/Src/qtbase/src/plugins/platforms/cocoa/qcocoabackingstore.mm:676#9 0x000000011ad290d7 in QCALayerBackingStore::recreateBackBufferIfNeeded() at /Users/venge/Qt/5.12.5/Src/qtbase/src/plugins/platforms/cocoa/qcocoabackingstore.mm:472#10 0x000000011ad269ae in QCALayerBackingStore::beginPaint(QRegion const&) at /Users/venge/Qt/5.12.5/Src/qtbase/src/plugins/platforms/cocoa/qcocoabackingstore.mm:363#11 0x0000000111f6f81f in QBackingStore::beginPaint(QRegion const&) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/painting/qbackingstore.cpp:133#12 0x000000011141e4d2 in QWidgetBackingStore::beginPaint(QRegion&, QWidget*, QBackingStore*, BeginPaintInfo*, bool) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:348#13 0x0000000111425420 in QWidgetBackingStore::doSync() at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1389#14 0x0000000111423b84 in QWidgetBackingStore::sync() at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:1210#15 0x0000000111454d0e in QWidgetPrivate::syncBackingStore() at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidget.cpp:1949#16 0x000000011146a4a4 in QWidget::event(QEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidget.cpp:9266#17 0x000000011160cbfe in QMainWindow::event(QEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/widgets/qmainwindow.cpp:1339#18 0x000000011140c687 in QApplicationPrivate::notify_helper(QObject*, QEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qapplication.cpp:3700#19 0x00000001114119c0 in QApplication::notify(QObject*, QEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qapplication.cpp:3650#20 0x000000010008495c in QtLS::QApp::notify(QObject*, QEvent*) at /Users/venge/studio/ui/QtLSStudioUI/QApp.cpp:116#21 0x000000011544b305 in QCoreApplication::notifyInternal2(QObject*, QEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1088#22 0x000000011544bec8 in QCoreApplication::sendEvent(QObject*, QEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/kernel/qcoreapplication.cpp:1476#23 0x000000011141fa16 in QWidgetBackingStore::sendUpdateRequest(QWidget*, QWidgetBackingStore::UpdateTime) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:509#24 0x0000000111420a29 in QWidgetBackingStore::markDirty(QRect const&, QWidget*, QWidgetBackingStore::UpdateTime, QWidgetBackingStore::BufferState) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidgetbackingstore.cpp:677#25 0x000000011149a398 in QWidgetWindow::repaintWindow() at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidgetwindow.cpp:770#26 0x000000011149a16a in QWidgetWindow::handleScreenChange() at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/kernel/qwidgetwindow.cpp:760#27 0x000000011149a946 in QWidgetWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/widgets/.moc/debug/moc_qwidgetwindow_p.cpp:76#28 0x00000001154a5f31 in QMetaObject::activate(QObject*, int, int, void**) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/kernel/qobject.cpp:3803#29 0x00000001154a53dd in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/corelib/kernel/qobject.cpp:3656#30 0x0000000111d4e69a in QWindow::screenChanged(QScreen*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/.moc/debug/moc_qwindow.cpp:675#31 0x0000000111d4e5aa in QWindowPrivate::emitScreenChangedRecursion(QScreen*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/kernel/qwindow.cpp:484#32 0x0000000111d4e8b2 in QWindowPrivate::setTopLevelScreen(QScreen*, bool) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/kernel/qwindow.cpp:508#33 0x0000000111d40125 in QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/kernel/qguiapplication.cpp:2363#34 0x0000000111d3c608 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/kernel/qguiapplication.cpp:1869#35 0x0000000111d14eec in bool QWindowSystemInterfacePrivate::handleWindowSystemEvent<QWindowSystemInterface::SynchronousDelivery>(QWindowSystemInterfacePrivate::WindowSystemEvent*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:105#36 0x0000000111d1b727 in void QWindowSystemInterface::handleWindowScreenChanged<QWindowSystemInterface::SynchronousDelivery>(QWindow*, QScreen*) at /Users/venge/Qt5.12.5/5.12.5/Src/qtbase/src/gui/kernel/qwindowsysteminterface.cpp:270#37 0x000000011ad38570 in QCocoaWindow::windowDidChangeScreen() at /Users/venge/Qt/5.12.5/Src/qtbase/src/plugins/platforms/cocoa/qcocoawindow.mm:1253