Since we stop the thread in DllMain, we always haev the loaderlock. Thread shutdown also requires the loader lock, so we will always time out So just wait until all cleanup is done, the thread itself can exit later
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52314 Signed-off-by: Fabian Maurer dark.shadow4@web.de
From: Fabian Maurer dark.shadow4@web.de
Since we stop the thread in DllMain, we always haev the loaderlock. Thread shutdown also requires the loader lock, so we will always time out So just wait until all cleanup is done, the thread itself can exit later
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52314 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/dinput/dinput_main.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index d3db22c70b5..d68c5032ed0 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -1320,6 +1320,7 @@ static DWORD WINAPI dinput_thread_proc( void *params ) done: DestroyWindow( di_em_win ); di_em_win = NULL; + SetEvent(finished_event); return 0; }
@@ -1347,9 +1348,13 @@ static void dinput_thread_start(void)
static void dinput_thread_stop(void) { - PostThreadMessageW( dinput_thread_id, WM_USER + 0x10, 0, 0 ); - if (WaitForSingleObject( dinput_thread, 500 ) == WAIT_TIMEOUT) - WARN("Timeout while waiting for internal thread\n"); + HANDLE finished_event = CreateEventW( NULL, FALSE, FALSE, NULL ); + + PostThreadMessageW( dinput_thread_id, WM_USER + 0x10, 0, (LPARAM)finished_event ); + + WaitForSingleObject( finished_event, INFINITE ); + + CloseHandle( finished_event ); CloseHandle( dinput_thread ); }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=126507
Your paranoid android.
=== debian11 (32 bit report) ===
d3d8: stateblock: Timeout visual: Timeout
d3d9: d3d9ex: Timeout device: Timeout stateblock: Timeout visual: Timeout
d3dcompiler_43: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout
d3dcompiler_46: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout
d3dcompiler_47: asm: Timeout blob: Timeout hlsl_d3d11: Timeout hlsl_d3d9: Timeout reflection: Timeout
d3drm: d3drm: Timeout vector: Timeout
Report validation errors: d3dx10: Timeout
=== debian11 (build log) ===
WineRunWineTest.pl:error: The task timed out