http://bugs.winehq.org/show_bug.cgi?id=58459
Bug ID: 58459 Summary: Doom 3: BFG Edition fails to start Product: Wine Version: 10.11 Hardware: x86-64 URL: https://store.steampowered.com/app/208200/DOOM_3/ OS: Linux Status: NEW Keywords: regression Severity: normal Priority: P2 Component: win32u Assignee: wine-bugs@winehq.org Reporter: gyebro69@gmail.com CC: rbernon@codeweavers.com Regression SHA1: a897aad823f5ea76949a0171f34984f4ebf1ced1 Distribution: ---
Created attachment 78913 --> http://bugs.winehq.org/attachment.cgi?id=78913 terminal output
Doom 3: BFG Edition crashes immediately on start. Doesn't affect the original Doom 3 version.
Present since commit a897aad823f5ea76949a0171f34984f4ebf1ced1 win32u: Keep track of the most recent window GL drawable.
Starts properly with the previous commit.
OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: NVIDIA GeForce GTX 1660 SUPER/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 575.64.03 X.Org X Server 1.21.1.18
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #1 from Rémi Bernon rbernon@codeweavers.com --- Could you make a WINEDEBUG=+timestamp,+pid,+loaddll,+seh,+wgl,+opengl log?
http://bugs.winehq.org/show_bug.cgi?id=58459
Stian Low wineryyyyy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wineryyyyy@gmail.com
--- Comment #2 from Stian Low wineryyyyy@gmail.com --- Created attachment 78935 --> http://bugs.winehq.org/attachment.cgi?id=78935 bug_58459_doom_bfg.log
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #3 from Stian Low wineryyyyy@gmail.com --- (In reply to Rémi Bernon from comment #1)
Could you make a WINEDEBUG=+timestamp,+pid,+loaddll,+seh,+wgl,+opengl log?
See bug_58459_doom_bfg.log for version wine-10.10-198-ga897aad823f.
Concerning messages:
70849.141:04a0:04a4:warn:wgl:context_set_drawables One of the drawable has been lost, ignoring 70849.141:04a0:04a4:warn:opengl:wrap_wglGetProcAddress No active WGL context found 70849.141:04a0:04a4:warn:seh:dispatch_exception "Couldn't find proc address for: wglGetExtensionsStringARB\n"
This change restores fuctionality but may not be the solution to the latest wgl changes:
modified dlls/win32u/opengl.c @@ -758,7 +758,7 @@ static struct opengl_drawable *get_dc_opengl_drawable( HDC hdc, BOOL read ) DC *dc;
/* get the last used window drawable when reading */ - if ((hwnd = NtUserWindowFromDC( hdc )) && read) return get_window_opengl_drawable( hwnd ); + if ((hwnd = NtUserWindowFromDC( hdc ))/* && read*/) return get_window_opengl_drawable( hwnd );
if ((dc = get_dc_ptr( hdc ))) {
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #4 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 78937 --> http://bugs.winehq.org/attachment.cgi?id=78937 possible fix
Thanks! Does the attached patch help?
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #5 from Béla Gyebrószki gyebro69@gmail.com --- Created attachment 78938 --> http://bugs.winehq.org/attachment.cgi?id=78938 WINEDEBUG=+timestamp,+pid,+loaddll,+seh,+wgl,+opengl log (patch applied)
(In reply to Rémi Bernon from comment #4)
Created attachment 78937 [details] possible fix
Thanks! Does the attached patch help?
The patch doesn't fix the crash for me. This is the log you requested earlier, but now with the patch applied.
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #6 from Stian Low wineryyyyy@gmail.com --- Created attachment 78939 --> http://bugs.winehq.org/attachment.cgi?id=78939 bug_58459_doom_bfg_possible_fix_000.log
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #7 from Stian Low wineryyyyy@gmail.com --- (In reply to Béla Gyebrószki from comment #5)
The patch doesn't fix the crash for me. This is the log you requested earlier, but now with the patch applied.
Doesn't fix for later version wine-10.11-181-g9ffd87ae8f5 either.
See bug_58459_doom_bfg_possible_fix_000.log after possible fix applied.
Concerning messages persist:
84267.743:0020:0024:warn:wgl:context_set_drawables One of the drawable has been lost, ignoring 84267.743:0020:0024:warn:opengl:wrap_wglGetProcAddress No active WGL context found 84267.743:0020:0024:warn:seh:dispatch_exception "Couldn't find proc address for: wglGetExtensionsStringARB\n"
Error seems to occur in a way that possible fix patched block of code is never reached:
IF WARN( "One of the drawable has been lost, ignoring\n" ); THEN <patched code skipped>
http://bugs.winehq.org/show_bug.cgi?id=58459
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #78937|0 |1 is obsolete| |
--- Comment #8 from Rémi Bernon rbernon@codeweavers.com --- Created attachment 78940 --> http://bugs.winehq.org/attachment.cgi?id=78940 possible fix
Hmm... I still think the patch is right in its way, as we shouldn't clear the window drawable just because the current context is deactivated, but it seems that the DC also loses its opengl drawable. Possibly because it's been released then acquired again. What about these patches?
They move the DC drawable release to its destruction (although it then also needs some tweaks with DCE which apparently reuse DCs across windows without cleaning up... though it's not completely clear to me what the logic actually is).
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #9 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Rémi Bernon from comment #8)
Created attachment 78940 [details] possible fix
This works better and fixes the crash, thank you !
http://bugs.winehq.org/show_bug.cgi?id=58459
--- Comment #10 from Stian Low wineryyyyy@gmail.com --- Created attachment 78946 --> http://bugs.winehq.org/attachment.cgi?id=78946 bug_58459_doom_bfg_possible_fix_001.log
(In reply to Béla Gyebrószki from comment #9)
(In reply to Rémi Bernon from comment #8)
Created attachment 78940 [details] possible fix
This works better and fixes the crash, thank you !
Confirming that patch also fixes crash for wine-10.11-217-g3c4cc9d04b6.
See attachment bug_58459_doom_bfg_possible_fix_001.log showing that the last 2 of 3 previous concerning messages no longer appear:
84267.743:0020:0024:warn:opengl:wrap_wglGetProcAddress No active WGL context found 84267.743:0020:0024:warn:seh:dispatch_exception "Couldn't find proc address for: wglGetExtensionsStringARB\n"
The first 1 of 3 previous concerning messages still appears and in even greater numbers now but doesn't seem to be problematic at least for DOOM 3 BFG at this time:
84267.743:0020:0024:warn:wgl:context_set_drawables One of the drawable has been lost, ignoring
http://bugs.winehq.org/show_bug.cgi?id=58459
Rémi Bernon rbernon@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |980a2e3c65bee1422adbe06fead | |768669835e3e1
--- Comment #11 from Rémi Bernon rbernon@codeweavers.com --- This should be fixed after 980a2e3c65bee1422adbe06fead768669835e3e1
http://bugs.winehq.org/show_bug.cgi?id=58459
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 10.13.