Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.1
-
None
-
Windows 10 1909
Nvidia driver 451.67
Alienware m15 r3 laptop (gtx2080super Max Q, 32go ram, core i710750H, full hd 144hz screen)
Two other full hd hdmi 60hz screens connected.
Description
Starting or moving a Qt3DWindow out of the primary screen lock on swapbuffers. Moving on another screen does not always instantaneously lock.
Does not happen with GLFW sample.
Simple code to reproduce:
QApplication * app = new QApplication(argc, argv); Qt3DExtras::Qt3DWindow * view = new Qt3DExtras::Qt3DWindow(); view->show(); app->exec();
Render thread call stack :
1 NtUserEnumDisplayMonitors win32u 0x7ffc6f5e19e4 2 Direct3DCreate9Ex d3d9 0x7ffc63fbf29c 3 GetHotPatchInfo NahimicOSD 0x7ffc5d9eef5b 4 GetHotPatchInfo NahimicOSD 0x7ffc5d9ed755 5 GetHotPatchInfo NahimicOSD 0x7ffc5d9ead52 6 SwapBuffers gdi32full 0x7ffc6ffe5c7e 7 QWindowsOpengl32DLL::swapBuffers qwindowsglcontext.cpp 210 0x7ffc0db34977 8 QWindowsGLContext::swapBuffers qwindowsglcontext.cpp 1298 0x7ffc0db363a1 9 QOpenGLContext::swapBuffers qopenglcontext.cpp 1121 0x7ffc0f800ff0 10 Qt3DRender::Render::OpenGL::SubmissionContext::endDrawing submissioncontext.cpp 491 0x7ffc0d774ea8 11 Qt3DRender::Render::OpenGL::Renderer::doRender renderer.cpp 841 0x7ffc0d6734e0 12 Qt3DRender::Render::OpenGL::Renderer::render renderer.cpp 710 0x7ffc0d672f1f 13 Qt3DRender::Render::RenderThread::run renderthread.cpp 87 0x7ffc1516a47c 14 QThreadPrivate::start qthread_win.cpp 405 0x7ffc0eb03a2c 15 BaseThreadInitThunk KERNEL32 0x7ffc71217c24 16 RtlUserThreadStart ntdll 0x7ffc7224cea1
Main thread call stack:
1 NtWaitForSingleObject ntdll 0x7ffc7227c144
2 WaitForSingleObjectEx KERNELBASE 0x7ffc6f181e93
3 QWaitConditionPrivate::wait qwaitcondition_win.cpp 117 0x7ffc0eb1b35e
4 QWaitCondition::wait qwaitcondition_win.cpp 178 0x7ffc0eb1ae2d
5 QWaitCondition::wait qwaitcondition_win.cpp 189 0x7ffc0eb1ad5f
6 QSemaphore::acquire qsemaphore.cpp 332 0x7ffc0eb0eba2
7 Qt3DRender::Render::VSyncFrameAdvanceService::waitForNextFrame vsyncframeadvanceservice.cpp 85 0x7ffc15468eb6
8 Qt3DCore::QAspectManager::processFrame qaspectmanager.cpp 487 0x7ffc160978da
9 <lambda_bd0817f8236cece733c4dcdb58b7c037>::operator() qaspectmanager.cpp 179 0x7ffc1609a446
10 QtPrivate::FunctorCall<QtPrivate::IndexesList<>,QtPrivate::List<>,void,<lambda_bd0817f8236cece733c4dcdb58b7c037>>::call qobjectdefs_impl.h 146 0x7ffc1609adc8
11 QtPrivate::Functor<<lambda_bd0817f8236cece733c4dcdb58b7c037>,0>::call<QtPrivate::List<>,void> qobjectdefs_impl.h 257 0x7ffc16099622
12 QtPrivate::QFunctorSlotObject<<lambda_bd0817f8236cece733c4dcdb58b7c037>,0,QtPrivate::List<>,void>::impl qobjectdefs_impl.h 449 0x7ffc1609b8f7
13 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 398 0x7ffc0ef168c2
14 doActivate<0> qobject.cpp 3886 0x7ffc0ef71ec4
15 QMetaObject::activate qobject.cpp 3947 0x7ffc0ef5e747
16 QAbstractAnimation::finished moc_qabstractanimation.cpp 295 0x7ffc0eaa68a0
17 QAbstractAnimationPrivate::setState qabstractanimation.cpp 1025 0x7ffc0eaa78a7
18 QAbstractAnimation::stop qabstractanimation.cpp 1382 0x7ffc0eaa6bb1
19 QAbstractAnimation::setCurrentTime qabstractanimation.cpp 1337 0x7ffc0eaa6e52
20 QAnimationTimer::updateAnimationsTime qabstractanimation.cpp 609 0x7ffc0eaaca15
21 QUnifiedTimer::updateAnimationTimers qabstractanimation.cpp 325 0x7ffc0eaaa2db
22 QAnimationDriver::advanceAnimation qabstractanimation.cpp 824 0x7ffc0eaa7447
23 QAnimationDriver::advance qabstractanimation.cpp 837 0x7ffc0eaa728a
24 QDefaultAnimationDriver::timerEvent qabstractanimation.cpp 936 0x7ffc0eaa7c2d
25 QObject::event qobject.cpp 1292 0x7ffc0ef60013
26 QApplicationPrivate::notify_helper qapplication.cpp 3630 0x7ffc10602a77
27 QApplication::notify qapplication.cpp 2970 0x7ffc105fccf8
28 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1063 0x7ffc0eefc0a8
29 QCoreApplication::sendEvent qcoreapplication.cpp 1459 0x7ffc0eefa0d2
30 QEventDispatcherWin32Private::sendTimerEvent qeventdispatcher_win.cpp 442 0x7ffc0efd6194
31 QEventDispatcherWin32::event qeventdispatcher_win.cpp 1067 0x7ffc0efd5678
32 QApplicationPrivate::notify_helper qapplication.cpp 3630 0x7ffc10602a77
33 QApplication::notify qapplication.cpp 2970 0x7ffc105fccf8
34 QCoreApplication::notifyInternal2 qcoreapplication.cpp 1063 0x7ffc0eefc0a8
35 QCoreApplication::sendEvent qcoreapplication.cpp 1459 0x7ffc0eefa0d2
36 QCoreApplicationPrivate::sendPostedEvents qcoreapplication.cpp 1817 0x7ffc0eefe08f
37 QEventDispatcherWin32::sendPostedEvents qeventdispatcher_win.cpp 1082 0x7ffc0efd57b2
38 QWindowsGuiEventDispatcher::sendPostedEvents qwindowsguieventdispatcher.cpp 81 0x7ffc0db7bfe4
39 qt_internal_proc qeventdispatcher_win.cpp 268 0x7ffc0efd3470
40 CallWindowProcW USER32 0x7ffc71b05c1d
41 DispatchMessageW USER32 0x7ffc71b057ec
42 IsWindowVisible USER32 0x7ffc71b11f83
43 KiUserCallbackDispatcher ntdll 0x7ffc7227fe34
44 NtUserMessageCall win32u 0x7ffc6f5e1184
45 GetWindowTextW USER32 0x7ffc71b0437a
46 MapWindowPoints USER32 0x7ffc71b03b0f
47 IsCompositionActive UxTheme 0x7ffc6cb1984e
48 Ordinal96 UxTheme 0x7ffc6cb325f2
49 IsCompositionActive UxTheme 0x7ffc6cb1c50f
50 IsCompositionActive UxTheme 0x7ffc6cb1bff1
51 GetWindowTextW USER32 0x7ffc71b0404f
52 qWindowsWndProc qwindowscontext.cpp 1693 0x7ffc0da9c302
53 CallWindowProcW USER32 0x7ffc71b05c1d
54 CallWindowProcW USER32 0x7ffc71b058ee
55 glPushClientAttrib OPENGL32 0x7ffc45353919
56 CallWindowProcW USER32 0x7ffc71b05c1d
57 DispatchMessageW USER32 0x7ffc71b057ec
58 IsWindowVisible USER32 0x7ffc71b11f83
59 KiUserCallbackDispatcher ntdll 0x7ffc7227fe34
60 NtUserMessageCall win32u 0x7ffc6f5e1184
61 GetWindowTextW USER32 0x7ffc71b0437a
62 MapWindowPoints USER32 0x7ffc71b03b0f
63 IsCompositionActive UxTheme 0x7ffc6cb1984e
64 Ordinal96 UxTheme 0x7ffc6cb32547
65 IsCompositionActive UxTheme 0x7ffc6cb1c50f
66 IsCompositionActive UxTheme 0x7ffc6cb1bff1
67 GetWindowTextW USER32 0x7ffc71b0404f
68 qWindowsWndProc qwindowscontext.cpp 1693 0x7ffc0da9c302
69 CallWindowProcW USER32 0x7ffc71b05c1d
70 CallWindowProcW USER32 0x7ffc71b058ee
71 glPushClientAttrib OPENGL32 0x7ffc45353919
72 CallWindowProcW USER32 0x7ffc71b05c1d
73 DispatchMessageW USER32 0x7ffc71b05612
74 QEventDispatcherWin32::processEvents qeventdispatcher_win.cpp 608 0x7ffc0efd3cef
75 QWindowsGuiEventDispatcher::processEvents qwindowsguieventdispatcher.cpp 73 0x7ffc0db7bfa4
76 QEventLoop::processEvents qeventloop.cpp 140 0x7ffc0eef67eb
77 QEventLoop::exec qeventloop.cpp 232 0x7ffc0eef6a5d
78 QCoreApplication::exec qcoreapplication.cpp 1371 0x7ffc0eef9e52
79 QGuiApplication::exec qguiapplication.cpp 1868 0x7ffc0f750538
80 QApplication::exec qapplication.cpp 2823 0x7ffc105fc7ba
81 QtUpdate main.cpp 35 0x7ff6977317ad
82 main main.cpp 41 0x7ff6977317f4
83 invoke_main exe_common.inl 79 0x7ff697732094
84 __scrt_common_main_seh exe_common.inl 288 0x7ff697731f3e
85 __scrt_common_main exe_common.inl 331 0x7ff697731dfe
86 mainCRTStartup exe_main.cpp 17 0x7ff697732129
87 BaseThreadInitThunk KERNEL32 0x7ffc71217c24
88 RtlUserThreadStart ntdll 0x7ffc7224cea1
Working GLFW sample :
glfwInit(); GLFWwindow* window = glfwCreateWindow(1024, 768, "OpenGL first program", nullptr, nullptr); glfwMakeContextCurrent(window); while (!glfwWindowShouldClose(window)) { if (glfwGetKey(window, GLFW_KEY_ESCAPE) == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); glClearColor(0.5f, 0.5f, 0.5f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glfwSwapBuffers(window); glfwPollEvents(); } glfwTerminate();
For information the GLFW swapbuffer code :
static void swapBuffersWGL(_GLFWwindow* window){ if (!window->monitor){ if (IsWindowsVistaOrGreater()) { // DWM Composition is always enabled on Win8+ BOOL enabled = IsWindows8OrGreater(); // HACK: Use DwmFlush when desktop composition is enabled if (enabled || (SUCCEEDED(DwmIsCompositionEnabled(&enabled)) && enabled)) { int count = abs(window->context.wgl.interval); while (count--) DwmFlush(); } } } SwapBuffers(window->context.wgl.dc); }