[Bug 39563] New: Oddworld: Stranger's Wrath HD crashes when starting a new game
https://bugs.winehq.org/show_bug.cgi?id=39563 Bug ID: 39563 Summary: Oddworld: Stranger's Wrath HD crashes when starting a new game Product: Wine Version: 1.7.54 Hardware: x86 URL: http://store.steampowered.com/app/15750 OS: Linux Status: NEW Keywords: regression Severity: normal Priority: P2 Component: opengl Assignee: wine-bugs(a)winehq.org Reporter: gyebro69(a)gmail.com CC: alexhenrie24(a)gmail.com Regression SHA1: b4eb8e846b7e9f06e76c8c9edfe1a5cdc774321c Distribution: --- Created attachment 52711 --> https://bugs.winehq.org/attachment.cgi?id=52711 +wgl,+opengl debug log (uncompressed 11 MB) The game loads to the main menu, but it crashes when I start a new game or load a previously saved game. The intro video plays fine and the crash happens when the 3D world is about to appear. Tested with the Steam version, plain terminal output doesn't show anything interesting. I can't show you the backtrace because winedbg doesn't produce any. There's no demo version available. Must be related to certain graphical options that can be toggled on/off in the launcher. I found that the crash happens when at least these 3 options are enabled in the launcher: instant rendering, water reflection, vegetation. The game creates a log file on each start, the file contains which opengl extensions are supported by the card/driver. The following extension is marked as not supported when running the game in current git: glVertexAttribDivisor ->FAIL Reverting the following commit fixes the crash for me (and the mentioned extension appears as supported in the log file): commit b4eb8e846b7e9f06e76c8c9edfe1a5cdc774321c Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Oct 29 21:30:19 2015 -0600 opengl32: Check the minor version when determining extension support. I could only test this bug with the open source nouveau driver because the binary driver (340.93) doesn't compile against recent X Server 1.18 on Fedora 23. Fedora 23 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 OpenGL core profile shading language version string: 3.30 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 --- Comment #1 from Alex Henrie <alexhenrie24(a)gmail.com> --- Thank you for the exemplary bug report :-) The output you are seeing is correct; your video card does not support glVertexAttribDivisor. It supports only the OpenGL 3.3 core profile, not the OpenGL 3.3 compatibility profile. You can see more information about what your driver supports by running `glxinfo`. I am not sure why honestly reporting the absence of this extension would cause your game to crash. However, if the game is not too taxing, you might be able to work around this problem with `LIBGL_ALWAYS_SOFTWARE=1 wine my-game.exe`. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Sebastian Lackner <sebastian(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian(a)fds-team.de --- Comment #2 from Sebastian Lackner <sebastian(a)fds-team.de> --- I would guess this is similar to bug 38480. Does the following patch help? https://github.com/wine-compholio/wine-staging/blob/master/patches/opengl32-... Technically its a bug in Mesa, but imho we could easily fix it / workaround it on our side. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 --- Comment #3 from Alex Henrie <alexhenrie24(a)gmail.com> --- Interesting. Béla, could you save the output of `glxinfo` on your computer and upload it as an attachment here? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 --- Comment #4 from Béla Gyebrószki <gyebro69(a)gmail.com> --- Created attachment 52719 --> https://bugs.winehq.org/attachment.cgi?id=52719 glxinfo (nouveau) (In reply to Alex Henrie from comment #1)
I am not sure why honestly reporting the absence of this extension would cause your game to crash. However, if the game is not too taxing, you might be able to work around this problem with `LIBGL_ALWAYS_SOFTWARE=1 wine my-game.exe`.
The game crashes in the same way with the software renderer too. (In reply to Sebastian Lackner from comment #2)
I would guess this is similar to bug 38480. Does the following patch help?
https://github.com/wine-compholio/wine-staging/blob/master/patches/opengl32- Revert_Disable_Ext/0001-Revert-opengl32-Return-a-NULL-pointer-for-functions-. patch
Technically its a bug in Mesa, but imho we could easily fix it / workaround it on our side.
The patch indeed makes the crash go away. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matteo.mystral(a)gmail.com --- Comment #5 from Alex Henrie <alexhenrie24(a)gmail.com> --- Thanks Béla. My best guess at the moment is that your game requires glVertexAttribDivisor (part of OpenGL 3.3) and will not accept glVertexAttribDivisorARB (part of GL_ARB_instanced_arrays). Mesa reports the OpenGL version as 3.0 + GL_ARB_instanced_arrays, so Wine thinks that it doesn't have glVertexAttribDivisor even though Mesa quietly provides it anyway. So...why are we trying to parse the extension string at all? If the driver exposes a function, shouldn't we just use it? Do we even need to print a warning? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thunderbird2k(a)gmail.com --- Comment #6 from Alex Henrie <alexhenrie24(a)gmail.com> --- Never mind, I found my answer in the source code for is_extension_supported <https://source.winehq.org/git/wine.git/blob/cbaab82d086e36dacaa22c6adf80f9114bb820fb:/dlls/opengl32/wgl.c#l802>: /* We use the GetProcAddress function from the display driver to retrieve function pointers * for OpenGL and WGL extensions. In case of winex11.drv the OpenGL extension lookup is done * using glXGetProcAddress. This function is quite unreliable in the sense that its specs don't * require the function to return NULL when an extension isn't found. For this reason we check * if the OpenGL extension required for the function we are looking up is supported. */ This is corroborated by the GLX 1.4 specification <https://www.opengl.org/registry/doc/glx1.4.pdf#page=41>: A non-NULL return value for glXGetProcAddress does not guarantee that an extension function is actually supported at runtime. The client must also query glGetString(GL_EXTENSIONS) or glXQueryExtensionsString to determine if an extension is supported by a particular context. The documentation at <https://www.opengl.org/wiki/Load_OpenGL_Functions> makes it sound like calling a function without checking the current context's extension string can cause a program crash, so reverting bfd4836867d6d90eaeae6ccbc02e37678b59b8f1 would probably just trade one set of program crashes for another. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 --- Comment #7 from Alex Henrie <alexhenrie24(a)gmail.com> --- Béla, can you try `MESA_GL_VERSION_OVERRIDE=3.3COMPAT wine my-game.exe`? I chatted with the Mesa developers on IRC and they said that the compatibility context specifications are not clear enough to support compatibility contexts for OpenGL 3.1 and later. In fact, AMD and Nvidia have conflicting implementations, and OSX does not provide 3.x compatibility contexts at all. So, as far as I can tell, there is no bug in Wine and there is no bug in Mesa. The only way your game is going to work is if you either use a proprietary driver or make Mesa pretend that it supports a 3.3 compatibility context. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Béla Gyebrószki <gyebro69(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression | Regression SHA1|b4eb8e846b7e9f06e76c8c9edfe | |1a5cdc774321c | --- Comment #8 from Béla Gyebrószki <gyebro69(a)gmail.com> --- (In reply to Alex Henrie from comment #7)
Béla, can you try `MESA_GL_VERSION_OVERRIDE=3.3COMPAT wine my-game.exe`?
I chatted with the Mesa developers on IRC and they said that the compatibility context specifications are not clear enough to support compatibility contexts for OpenGL 3.1 and later. In fact, AMD and Nvidia have conflicting implementations, and OSX does not provide 3.x compatibility contexts at all.
So, as far as I can tell, there is no bug in Wine and there is no bug in Mesa. The only way your game is going to work is if you either use a proprietary driver or make Mesa pretend that it supports a 3.3 compatibility context.
Alex, thank you for investigating further the problem, starting the game with MESA_GL_VERSION_OVERRIDE=3.3COMPAT works around the crash. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Béla Gyebrószki <gyebro69(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #9 from Béla Gyebrószki <gyebro69(a)gmail.com> --- I guess this is a WONTFIX bug then :( -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 --- Comment #10 from Matteo Bruni <matteo.mystral(a)gmail.com> --- FWIW, I'd argue this is a game bug, it should use glVertexAttribDivisorARB if the OpenGL version is < 3.3. Does disabling GL_ARB_instanced_arrays via the DisabledExtensions registry key make any difference? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 --- Comment #11 from Béla Gyebrószki <gyebro69(a)gmail.com> --- (In reply to Matteo Bruni from comment #10)
FWIW, I'd argue this is a game bug, it should use glVertexAttribDivisorARB if the OpenGL version is < 3.3.
Does disabling GL_ARB_instanced_arrays via the DisabledExtensions registry key make any difference?
With 'GL_ARB_instanced_arrays' disabled the game doesn't crash (some rendering issues do arise when the extension is disabled though). -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WONTFIX |NOTOURBUG --- Comment #12 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Béla Gyebrószki from comment #11)
(In reply to Matteo Bruni from comment #10)
FWIW, I'd argue this is a game bug, it should use glVertexAttribDivisorARB if the OpenGL version is < 3.3.
Does disabling GL_ARB_instanced_arrays via the DisabledExtensions registry key make any difference?
With 'GL_ARB_instanced_arrays' disabled the game doesn't crash (some rendering issues do arise when the extension is disabled though).
Okay, that really means it's the game's fault: it handles the case where the extension is not supported almost fine (modulo those rendering issues, but that's a different bug), it also works fine if the driver exposes glVertexAttribDivisor but it fails if only the ARB extension function is present. In theory it would make sense to report the bug to the game devs, although I don't know whether they still support the game. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Saulius K. <saulius2(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Alex Henrie <alexhenrie24(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |f915f9db4cc11d58006efaa9b54 | |710020ca1f9d3 See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=38480, | |https://bugs.winehq.org/sho | |w_bug.cgi?id=39769 Resolution|NOTOURBUG |FIXED Target Milestone|--- |1.8.0 Regression SHA1| |b4eb8e846b7e9f06e76c8c9edfe | |1a5cdc774321c --- Comment #13 from Alex Henrie <alexhenrie24(a)gmail.com> --- In the end it was decided to forward the missing glVertexAttribDivisor to glVertexAttribDivisorARB, so this bug should be definitively fixed as of Wine 1.8.0. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=39563 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #14 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.9.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org