https://bugs.winehq.org/show_bug.cgi?id=39348
Bug ID: 39348 Summary: Multiple games hang on exit when CSMT enabled Product: Wine-staging Version: unspecified Hardware: x86 URL: http://www.fileplanet.com/191497/190000/fileinfo/Nikop ol:-Secrets-of-the-Immortals-Demo OS: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: gyebro69@gmail.com CC: michael@fds-team.de, sebastian@fds-team.de, stefan@codeweavers.com Distribution: ---
Created attachment 52444 --> https://bugs.winehq.org/attachment.cgi?id=52444 winedbg bt all
I have some games that freeze on exit when CSMT is enabled.The game executable remains in memory and constantly uses 100% cpu after exiting the game. Most of the games with this problem are older titles, using Directx 6-8, some of them are newer ones, built on DX9. With disabled CSMT those games always quit properly. Plain terminal output doesn't show anything related. Reproduced with nvidia binary driver 340.93 and nouveau/mesa git.
Two examples:
1. Freespace 2 demo (DX7, 60M): http://www.fileplanet.com/126954/120000/fileinfo/Freespace-2-Demo- (in the launcher select <Detect Available cards>, then select a video mode with 3D support, start the game. In the main menu press <Esc> a couple times to quit the demo).
2. Nikopol demo (DX9, 355M): http://www.fileplanet.com/191497/190000/fileinfo/Nikopol:-Secrets-of-the-Imm...
wine-1.7.51-225-g3966aff Fedora 22 32-bit OpenGL vendor string: nouveau OpenGL renderer string: Gallium 0.4 on NV92 OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.1.0-devel
https://bugs.winehq.org/show_bug.cgi?id=39348
--- Comment #1 from Stefan Dösinger stefan@codeweavers.com --- I'm aware of this problem, and it's a tough one to fix. The problem is that ddraw.dll tries to destroy ddraw objects on DLL unload, mainly to get the screen resolution restored if the game doesn't properly take care of that itself. However, by the time PROCESS_DETACH is handled, the worker thread is long dead and the main thread waits forever for commands to be executed.
Removing those cleanup calls is easy, but it'll mean that the screen resolution in the affected games won't be restored. To properly fix this we'll need a proper screen resolution restore fix either in the X server itself, window manager or maybe explorer.exe.
My suggested workaround for wine-staging is to keep CSMT off for ddraw. There are more problems with it (e.g. still using excessive sync due to improperly handled operations, not working if the game uses ddraw from inside DllMain), and since the games are old the positive impact of CSMT will be limited anyway.
https://bugs.winehq.org/show_bug.cgi?id=39348
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.wine-staging.c | |om/show_bug.cgi?id=43
https://bugs.winehq.org/show_bug.cgi?id=39348
Erich E. Hoover erich.e.hoover@wine-staging.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |erich.e.hoover@wine-staging | |.com
https://bugs.winehq.org/show_bug.cgi?id=39348
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.7.35
https://bugs.winehq.org/show_bug.cgi?id=39348
Felix Yan felixonmars@archlinux.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |felixonmars@archlinux.org
https://bugs.winehq.org/show_bug.cgi?id=39348
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|stefan@codeweavers.com |stefandoesinger@gmx.at
https://bugs.winehq.org/show_bug.cgi?id=39348
--- Comment #2 from Sebastian Lackner sebastian@fds-team.de --- Does this issue still occur with Wine Staging 1.9.10+?
https://bugs.winehq.org/show_bug.cgi?id=39348
--- Comment #3 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Sebastian Lackner from comment #2)
Does this issue still occur with Wine Staging 1.9.10+?
Still present in Wine 1.9.11 (Staging) when CSMT is enabled.
OpenGL vendor string: nouveau OpenGL renderer string: Gallium 0.4 on NV92 OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.3.0-devel OpenGL core profile shading language version string: 3.30
https://bugs.winehq.org/show_bug.cgi?id=39348
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at --- Yeah, there's nothing in the recent CSMT update that would change this. The DirectDraw cleanup on library unload has to go away for this to be fixed.
https://bugs.winehq.org/show_bug.cgi?id=39348
Matt Monroe matt.a.monroe@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |matt.a.monroe@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39348
--- Comment #5 from Sebastian Lackner sebastian@fds-team.de --- This should be fixed in Wine Staging 2.3, could you please retest?
https://bugs.winehq.org/show_bug.cgi?id=39348
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #6 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Sebastian Lackner from comment #5)
This should be fixed in Wine Staging 2.3, could you please retest?
I could only test a few of the games that were affected, all of them exited properly in wine-2.3 (Staging) when CSMT was enabled.
https://bugs.winehq.org/show_bug.cgi?id=39348
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Fixed Staging 3.14