Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.6.0
-
None
-
Windows 7, 8, 10
Description
Stack trace:
Qt5Gui!QRasterPaintEngine::setDC [.\qtbase\src\gui\painting\qpaintengine_raster.cpp @ 3244] qwindows!QWindowsNativeImage::QWindowsNativeImage+0xf7 [.\qtbase\src\plugins\platforms\windows\qwindowsnativeimage.cpp @ 119] qwindows!QWindowsBackingStore::resize+0x284 [.\qtbase\src\plugins\platforms\windows\qwindowsbackingstore.cpp @ 161] Qt5Gui!QBackingStore::resize+0x4d [.\qtbase\src\gui\painting\qbackingstore.cpp @ 215] Qt5Widgets!QWidgetBackingStore::doSync+0x34b [.\qtbase\src\widgets\kernel\qwidgetbackingstore.cpp @ 1178] Qt5Widgets!QWidgetWindow::handleResizeEvent+0x11a [.\qtbase\src\widgets\kernel\qwidgetwindow.cpp @ 705] Qt5Widgets!QWidgetWindow::event+0x1c5 [.\qtbase\src\widgets\kernel\qwidgetwindow.cpp @ 233] Qt5Widgets!QApplicationPrivate::notify_helper+0x112 [.\qtbase\src\widgets\kernel\qapplication.cpp @ 3715] Qt5Widgets!QApplication::notify+0x12f5 [.\qtbase\src\widgets\kernel\qapplication.cpp @ 3452] Qt5Core!QCoreApplication::notifyInternal2+0xb9 [.\qtbase\src\corelib\kernel\qcoreapplication.cpp @ 1015] Qt5Gui!QGuiApplicationPrivate::processGeometryChangeEvent+0x151 [.\qtbase\src\gui\kernel\qguiapplication.cpp @ 2153] Qt5Gui!QWindowSystemInterface::sendWindowSystemEvents+0x9b [.\qtbase\src\gui\kernel\qwindowsysteminterface.cpp @ 651] Qt5Gui!QWindowSystemInterface::flushWindowSystemEvents+0x152 [.\qtbase\src\gui\kernel\qwindowsysteminterface.cpp @ 625] qwindows!QWindowsWindow::handleWindowStateChange+0x4b7 [.\qtbase\src\plugins\platforms\windows\qwindowswindow.cpp @ 1672] qwindows!QWindowsWindow::handleResized+0x62 [.\qtbase\src\plugins\platforms\windows\qwindowswindow.cpp @ 1460] qwindows!QWindowsContext::windowsProc+0x6ce [.\qtbase\src\plugins\platforms\windows\qwindowscontext.cpp @ 1082] qwindows!qWindowsWndProc+0x5b [.\qtbase\src\plugins\platforms\windows\qwindowscontext.cpp @ 1341] user32!UserCallWinProcCheckWow+0x1ad user32!SendMessageWorker+0x682 user32!RealDefWindowProcWorker+0x3c5 user32!RealDefWindowProcW+0x5a uxtheme!_ThemeDefWindowProc+0x278 uxtheme!ThemeDefWindowProcW+0x11 user32!DefWindowProcW+0xe6 uxtheme!OnOwpPreWindowPosChanged+0x4a uxtheme!ThemePreWndProc+0x1b7 user32!UserCallWinProcCheckWow+0x14c user32!DispatchClientMessage+0xe1 user32!_fnINLPWINDOWPOS+0x2d ntdll!KiUserCallbackDispatcherContinue user32!ZwUserSetWindowRgn+0xa user32!RealSetWindowRgn+0x12 uxtheme!ThemeSetWindowRgn+0x208 user32!SetWindowRgn+0xa9 uxtheme!CThemeWnd::_AssignRgn+0x55 uxtheme!CThemeWnd::AssignFrameRgn+0x290 uxtheme!_WindowPosChangedWorker+0x106 uxtheme!OnOwpPostWindowPosChanged+0x28 uxtheme!ThemePostWndProc+0x141 user32!UserCallWinProcCheckWow+0x18e user32!DispatchClientMessage+0xe1 user32!_fnINLPWINDOWPOS+0x2d ntdll!KiUserCallbackDispatcherContinue user32!ZwUserPeekMessage+0xa user32!PeekMessageW+0x105 Qt5Core!QEventDispatcherWin32::processEvents+0x31a [.\qtbase\src\corelib\kernel\qeventdispatcher_win.cpp @ 760] qwindows!QWindowsGuiEventDispatcher::processEvents+0x19 [.\qtbase\src\platformsupport\eventdispatchers\qwindowsguieventdispatcher.cpp @ 69] Qt5Core!QEventLoop::processEvents+0x19 [.\qtbase\src\corelib\kernel\qeventloop.cpp @ 128] Qt5Core!QEventLoop::exec+0x1b3 [.\qtbase\src\corelib\kernel\qeventloop.cpp @ 203] Qt5Core!QCoreApplication::exec+0x147 [.\qtbase\src\corelib\kernel\qcoreapplication.cpp @ 1285] MY_APP!MY_APP_FUNC MY_APP!MY_APP_FUNC MY_APP!MY_APP_FUNC MY_APP!MY_APP_FUNC MY_APP!MY_APP_FUNC kernel32!BaseThreadInitThunk+0xd ntdll!RtlUserThreadStart+0x1d
It crashes in qwindowsnativeimage.cpp, line 118:
m_image = QImage(bits, width, height, format); Q_ASSERT(m_image.paintEngine()->type() == QPaintEngine::Raster); static_cast<QRasterPaintEngine *>(m_image.paintEngine())->setDC(m_hdc);
.paintEngine() is nullptr because m_image is invalid as QImage() ctor didn't create the image because negative height was passed to it.
QWindowSystemInterface::sendWindowSystemEvents tries to send an event (that was presumably originated from WM_SIZE/WM_MOVE) with incorrect set of data: - event 0x00000000557394a0 - [QWindowSystemInterfacePrivate::GeometryChangeEvent] + QWindowSystemInterfacePrivate::WindowSystemEvent + tlw guarded pointer to subclass of QObject of type "QWindow" QPointer<QWindow> + newGeometry { x = -31992, y = -31970, width = 144, height = -11 } QRect + oldGeometry { x = 0, y = 0, width = 0, height = 0 } QRect + __vfptr 0x000007fee29fa100 type GeometryChange (2) QWindowSystemInterfacePrivate::EventType flags 0 int eventAccepted true bool + flags {i=0 } QFlags<enum QEventLoop::ProcessEventsFlag> nevents 1 int
The values in newGeometry rectangle are invalid (height is negative).
Happens quite often to different users on a diverse set of environments. Seems like the trigger is waking up from sleep.
Could be related to QTBUG-24189
Attachments
Issue Links
- relates to
-
QTBUG-24189 Qt application Crashes in QtGui4!QRasterPaintEngine::setDC
- Closed