https://bugs.winehq.org/show_bug.cgi?id=48613
Bug ID: 48613 Summary: Zwift: ZwiftApp.exe startup crash on intel graphics hardware Product: Wine Version: 5.1 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: wentam42@gmail.com Distribution: ---
Created attachment 66453 --> https://bugs.winehq.org/attachment.cgi?id=66453 Log of crash with +relay
On some machines, running ZwiftApp.exe (via RunWithProcess as described here: https://bugs.winehq.org/show_bug.cgi?id=46313) results in a page fault not long after launch.
As far as I can tell, this only happens on machines with intel graphics hardware (see bug 46313 for a couple user confirmations).
Included is a log with +relay leading up to the crash. You can use grep -v 'GetLastError' to make it easier to read. As you can see, we're in the middle of a bunch of opengl calls.
One thing that stands out to me are the glDrawElements calls: opengl32.glDrawElements(00000005,000004db,00001403,00000000) ret=1403b751c
This does not seem to be valid usage of glDrawElements -- the last argument is intended to be a pointer to vertex indices: https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glDrawElements.xht...
Repro steps, starting from fresh wineprefix on intel graphics hardware: * winetricks dotnet35sp1 * Download/extract nirsoft RunWithProcess * wine ZwiftLauncher.exe, wait for any updates to finish * wine path/to/RunWithProcess.exe ZwiftLauncher.exe ZwiftApp.exe
https://bugs.winehq.org/show_bug.cgi?id=48613
--- Comment #1 from wentam42@gmail.com --- Created attachment 66454 --> https://bugs.winehq.org/attachment.cgi?id=66454 backtrace of crash
https://bugs.winehq.org/show_bug.cgi?id=48613
--- Comment #2 from wentam42@gmail.com --- One more thing to note. It seems glDrawElements is called this way (with last arg of 00000000) on working hardware as well. GPU is nvidia GTX660. There is no crash on this hardware.
https://bugs.winehq.org/show_bug.cgi?id=48613
wentam42@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://cdn.zwift.com/app/Z | |wiftSetup.exe
https://bugs.winehq.org/show_bug.cgi?id=48613
dapharsyde dapharsyde@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dapharsyde@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=48613
--- Comment #3 from wentam42@gmail.com --- Spent a lot of time with a disassembler and debugger, found the problem, and found a workaround.
Ignore my comments about glDrawElements. That's all good.
Zwift calls wglGetProcAddress("glActiveTextureARB") and gets NULL even though the GL_ARB_multitexture extension should be available according to glxinfo.
WINEDEBUG="+wgl" also gives "926:0138:warn:wgl:wglGetProcAddress Extension GL_ARB_multitexture required for glActiveTextureARB not supported".
Later on, Zwift tries to call the NULL pointer and the game crashes.
I don't know why wine isn't giving it a pointer.
However,setting the MESA_GL_VERSION_OVERRIDE environment variable to "3.1" allows the game to grab a pointer and the game to run.
So, the workaround: * wineserver -k - to make sure we fully reset * export MESA_GL_VERSION_OVERRIDE=3.1
Run the export command in any terminal windows that you will be running wine commands in.
https://bugs.winehq.org/show_bug.cgi?id=48613
Ryan ryanjohngay@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ryanjohngay@gmail.com
--- Comment #4 from Ryan ryanjohngay@gmail.com --- Confirming this bug.
Also confirming that the workaround post in #c3 works.
https://bugs.winehq.org/show_bug.cgi?id=48613
Michel Dagenais michel.dagenais@polymtl.ca changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michel.dagenais@polymtl.ca
--- Comment #5 from Michel Dagenais michel.dagenais@polymtl.ca --- Also confirming this bug and the #C3 workaround. I run Ubuntu 19.10 updated as of 05/04/2020, wine-stable 5.0.0~eoan amd64 ubuntu package from wine-hq. My laptop has Intel graphics, Lenovo X1 Carbon 3rd gen (Intel Core i7-5600U CPU @ 2.60GHz.
https://bugs.winehq.org/show_bug.cgi?id=48613
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #6 from Stefan Dösinger stefan@codeweavers.com --- Does it work with MESA_GL_VERSION_OVERRIDE=4.4COMPAT ?
https://bugs.winehq.org/show_bug.cgi?id=48613
--- Comment #7 from Michel Dagenais michel.dagenais@polymtl.ca --- (In reply to Stefan Dösinger from comment #6)
Does it work with MESA_GL_VERSION_OVERRIDE=4.4COMPAT ?
Yes, that works as well on my system.
https://bugs.winehq.org/show_bug.cgi?id=48613
Danilo Lessa Bernardineli danilo.lessa@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |danilo.lessa@gmail.com
--- Comment #8 from Danilo Lessa Bernardineli danilo.lessa@gmail.com --- (In reply to wentam42 from comment #3)
Spent a lot of time with a disassembler and debugger, found the problem, and found a workaround.
Ignore my comments about glDrawElements. That's all good.
Zwift calls wglGetProcAddress("glActiveTextureARB") and gets NULL even though the GL_ARB_multitexture extension should be available according to glxinfo.
WINEDEBUG="+wgl" also gives "926:0138:warn:wgl:wglGetProcAddress Extension GL_ARB_multitexture required for glActiveTextureARB not supported".
Later on, Zwift tries to call the NULL pointer and the game crashes.
I don't know why wine isn't giving it a pointer.
However,setting the MESA_GL_VERSION_OVERRIDE environment variable to "3.1" allows the game to grab a pointer and the game to run.
So, the workaround:
- wineserver -k - to make sure we fully reset
- export MESA_GL_VERSION_OVERRIDE=3.1
Run the export command in any terminal windows that you will be running wine commands in.
I had to use an different MESA_GL version on my Ubuntu 19.10 / Intel(R) HD Graphics 5300 to work. The following export makes Zwift run normally on my PC:
* export MESA_GL_VERSION_OVERRIDE=4.4COMPACT
https://bugs.winehq.org/show_bug.cgi?id=48613
randomdave@earthlink.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |randomdave@earthlink.net
--- Comment #9 from randomdave@earthlink.net --- export MESA_GL_VERSION_OVERRIDE=4.0 works on an Intel I3-4130T with 4400 graphics.
https://bugs.winehq.org/show_bug.cgi?id=48613
--- Comment #10 from randomdave@earthlink.net --- export MESA_GL_VERSION_OVERRIDE=4.0 also works on an Intel i7-3610QM with HD Graphics 4000