Note that there are some explanatory texts on larger screens.

plurals
  1. POWindows hang in WM_WINDOWPOSCHANGED
    text
    copied!<p>I have a DirectX9 application that sporadically runs into a hang in WM_WINDOWPOSCHANGED. The hang occurs only rarely when alt+tabbing into and out of fullscreen exclusive mode.</p> <p>The application is hung because the main window message processing thread is stuck at WaitForSingleObject() in the DefWindowProc handler. Other threads we have created are operating normally.</p> <p>Call Stack on Stuck Main Thread:</p> <pre><code> ntdll.dll!_NtWaitForSingleObject@12() + 0x15 bytes ntdll.dll!_NtWaitForSingleObject@12() + 0x15 bytes kernel32.dll!_WaitForSingleObjectExImplementation@12() + 0x43 bytes kernel32.dll!_WaitForSingleObject@8() + 0x12 bytes d3d9.dll!WindowProc() + 0x27e95 bytes user32.dll!_InternalCallWinProc@20() + 0x23 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_DispatchClientMessage@24() + 0x51 bytes user32.dll!___fnDWORD@4() + 0x2b bytes ntdll.dll!_KiUserCallbackDispatcher@12() + 0x2e bytes user32.dll!_NtUserMessageCall@28() + 0x15 bytes user32.dll!_RealDefWindowProcWorker@24() + 0x26afe bytes user32.dll!_RealDefWindowProcW@16() + 0x2a bytes uxtheme.dll!_ThemeDefWindowProc() + 0x152 bytes uxtheme.dll!_ThemeDefWindowProcW@16() + 0x18 bytes user32.dll!_DefWindowProcW@16() + 0x805 bytes &gt; Player.exe!cnWindowProc(HWND__ * hWnd=0x006507f4, unsigned int message=0x00000047, unsigned int wParam=0x00000000, long lParam=0x0034eea8) Line 502 + 0x18 bytes C++ </code></pre> <p>I am wondering what Windows is waiting for here. DirectX is created and owned by a separate thread, but that thread is not stuck. We seem to be handling things correctly for lost devices (freeing up video memory resources and calling Reset()). </p> <p>If anyone has ideas on why windows is hanging here, I would appreciate it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload