ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
24.46k stars 1.07k forks source link

Unreal Engine 4.13-4.21 games crash on CPU's with SHA extensions #5830

Open AwesamLinux opened 2 years ago

AwesamLinux commented 2 years ago

System Information

system_info.txt

Symptoms

Some games crash on computers that have CPU's with SHA extensions (Intel 10th gen and newer). On my Intel 12th Gen Alder Lake CPU these games crash on launch or after a few minutes of gameplay. The crashes appear to occur because of this issue:

OpenSSL* 1.0.2 beta (Jun 2014) to OpenSSL 1.0.2k (Jan 2017) contain bugs that either cause a crash or bad SHA (Secure Hash Algorithm) values on processors with the SHA extensions, such as the recently released 10th Generation processor. Both bugs were fixed years ago; however, any application that uses the old version directly, or as one of its dependencies, will fail. Unreal Engine* version 4.13 (Sept 2016) to version 4.21 (Dec 2018) contains the old version of OpenSSL, so any game built using those versions is possibly affected.

Source: https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/openssl-sha-crash-bug-requires-application-update.html

Reproduction

Workaround

Set Steam Launch option: OPENSSL_ia32cap=0x20000000 %command%

That disables the OpenSSL code check for SHA extensions and runs a different code path that does not contain the crashing bug.

Logs of playing games without the workaround (crashing), and playing them successfully with the workaround: Blair Witch (1092660) #3174 Song of Horror (1096570) Call of Cthulhu (399810) Man of Medan (939850) #3024

As tested on 12th Gen Intel(R) Core(TM) i7-12700T: steam-399810-fix.log steam-399810.log steam-939850-fix.log steam-939850.log steam-1092660-fix.log steam-1092660.log steam-1096570-fix.log steam-1096570.log

Summary / thoughts

Sorry if this problem is beyond the scope of Proton, but I wanted to bring awareness to this issue in case it has gone unnoticed. While this bug is not Proton specific it is unlikely that any of the games with the problem will ever be updated. So I was thinking that maybe these games can be made to work out of the box in Proton using the workaround.

Also as there are more games with this problem than the ones I mentioned, perhaps it should be considered to always use the alternate code path on Proton (if there is never any reason not to in games).

gauthi02 commented 8 months ago

Hello, I'm deseperated to play Little Nightmares 1 using ue4, but I get the "UE4-Atlas crash fatal error" before jumping in the main menu. I do have a 12th gen Intel i7-12700F coupled to a RTX 3060 Ti, my PC has 16gB RAM. I've tried every solutions I found on the internet, such as changing the compatibility settings or setting the OPENSSL_ia32cap to the value you said. The last thing I didn't try is this: https://steamcommunity.com/app/424840/discussions/0/1318836262655833334/?l=koreana&ctp=5 , because I don't have an AMD cpu and it is very complicated. Please help me I'm very very disappointed because it's the first time there is no existing solutions online... (I've also tried the steam launch option, tell me if you need any details or crashlogs if existing or anything)

AwesamLinux commented 8 months ago

@gauthi02 Hello! Maybe try forcing the game to use one CPU thread (this used to be necessary with the game on some setups). So to add both workarounds you enter this in the Steam Launch options:

OPENSSL_ia32cap=0x20000000 %command% -onethread

If this does not work, you likely have a different issue that you should report in this thread: https://github.com/ValveSoftware/Proton/issues/1324

(When posting there you should probably also include the Proton log file. If you launch the game once with the launch option PROTON_LOG=1 %command% you will find a steam-424840.log file in your home directory that you can drag and drop)

gauthi02 commented 8 months ago

Ok I've tried but it didn't work, I'm not quiet sure if those steam launch options work with non-steam games? My Game isn't from steam so idk if it works, but regarding the OPENSSL_ia32cap=0x20000000, I tried this using the system variables, which didnt work.... I just figured out the fatal error does copy something in my clipboard, so here it is: " Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000000

LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe USER32.dll USER32.dll LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe LittleNightmares.exe KERNEL32.DLL ntdll.dll ntdll.dll "

(I also tried the proton log thing but didnt find the file, because its not a steam game or idk)