Bloodstained: Ritual of the Night

Bloodstained: Ritual of the Night

View Stats:
Devren Dec 2, 2021 @ 2:44pm
1
~1 minute (60 seconds) crash to desktop FIX
Short Version:
Open Command Prompt as Administrator
Type: "setx OPENSSL_ia32cap ~0x20000000" hit enter
Restart your computer
Play the game.
Note: this "This disables the OpenSSL code check for SHA extensions and runs a different code path that does not contain the crashing bug."

Long Verson:
Sorry if someone else figured this out but when I started trying to get my game to work a while back there was no fix posted.
My game was crashing after ~60 seconds no matter what I did. Stay in menus, actually play the game, fight, watch cut scenes, etc... At first I thought it was a firewall issue.
After trying a ton of stuff I finally found this article on Intel's site[www.intel.com].
Apparently Bloodstained is using old code and because of that we have to disable the OpenSSL code check for SHA extensions and run a different code path that does not contain the crashing bug.

It's caused by "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."

So until they update their engine to a more recent version(which will likely never happen) we have to disable the OpenSSL code check for SHA extensions.

I plan to just beat the game and then remove the environmental variable. That said, as mentioned above you need to open command prompt as admin
just type cmd in the windows search bar, right click it, and select run as administrator.
This will open a black box with text in it.
Simply type or copy "setx OPENSSL_ia32cap ~0x20000000" (without the "")
into the command prompt and hit enter.
Restart your computer and the game should work.


Still not working:
If it still doesn't work make sure your C++ redistributible is up to date.
https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170
get whichever one is right for you system.
Restart your computer and try it again.


How to REMOVE the environmental variable after you are done with the game:
You can remove the environmental variable by typing "edit environment variables for your account" in the start menu and hit enter.
Select OPENSSL_ia32cap ~0x20000000 and click delete.
Restart your computer.
Last edited by Devren; Dec 2, 2021 @ 2:50pm
< >
Showing 1-11 of 11 comments
Cynder_s Dec 11, 2021 @ 10:47am 
thanks this worked.:steamthumbsup:
Devren Dec 11, 2021 @ 11:40am 
Glad to hear it!
Kote Dec 22, 2021 @ 5:28pm 
I had this problem and can confirm by doing this indeed fixes the game and thanks for sharing this valuable information.:steamthumbsup:
Devren Dec 22, 2021 @ 6:01pm 
Awesome, I'm glad it worked for you!
Mikeblade Dec 23, 2021 @ 9:00pm 
just got the game and am hoping i don't get this problem because i just like my game to work
Devren Dec 23, 2021 @ 9:46pm 
If you have a 10th or greater generation of Intel processor there is a very good chance you will. (IE 11700k 12700k etc...). If your cpu is older you shouldn't have a problem.
Modewarp Dec 26, 2021 @ 12:46pm 
Has anyone been able to get this variable to apply on runtime via a command line or shortcut rather than having to set the variable to be active all the time?

Does anyone know if this has any security implications for the rest of my system when leaving this active?
Devren Dec 27, 2021 @ 1:55pm 
Question 1:
Shortcuts and scripts can vary significantly depending on the OS you are using, and even on specific machines. I have included a few tutorials below. I wrote a short script and tested it and it should work fine on windows vista-10, but I can't promise it will.

This only sets and blanks the environmental variable without fully removing it. Fully removing it through script may require system specific information depending on your setup and I wanted to make something that should work for pretty much everyone.

Create a batch file and put this inside exactly as it is. One line should start with if and end with the last ). The next line should only have shutdown.exe /r /t 10 on it. You can change the 10 to 00 and it will restart your computer right away. The 10 adds a ten second delay so you can hit cancel. Note that if you cancel the restart you will have to remember to restart your system before the changes will be applied. You can just open notepad and enter the text below as I described and save it as a .bat file. Then you just double click it to run it. (you may need to make it run as admin depending on your system. You can do that by right clicking or following the tutorial below)

if "%OPENSSL_ia32cap%" == "~0x20000000" (setx OPENSSL_ia32cap "") else (setx OPENSSL_ia32cap ~0x20000000)
shutdown.exe /r /t 10

A more detailed example of how to create batch files can be found [url=https://www.windowscentral.com/how-create-and-run-batch-file-windows-10
]here[/url].

A nice tutorial on how to make batch files run as admin on windows 10 without having to accept the prompt every time.. [url=https://fossbytes.com/batch-file-run-as-administrator-windows/
]here[/url]

There is a nice tutorial on setting up batch files (this also has great stuff on automating everything if you have win7) here[stackoverflow.com]

Also a nice tutorial for setting unsetting and removing environmental variables here[www.digitalcitizen.life]. The automated way to remove environmental variables requires the use of either reg editing in cmd or use of Power Shell. I'm not comfortable giving a script that will delete them automatically as they can vary slightly on a per system basis, but the above link does show how to removed them by script in both cmd and powershell.

You can read all about the setx command here[docs.microsoft.com]

Question 2:
I have not been able to find any security implications having it active. But work a rounds come out every day. From my understanding of this, effectively its making your CPU process the security handshake like it is an Intel 9th gen CPU instead of a 10th+ gen.

The developers just need to update to Unreal Engine 4.22 or run the patch provided by Intel and it will fix the problem and we wont need to do anything. I assume they don't want to do that as it costs money and updating from one version of Unreal Engine to another can cause unforeseen issues and other bugs. It can also expose other bugs in your code and might force them to invest a larger amount of time/money then they are willing to.

Intel does recommend that "If you are an end user who has discovered and confirmed this bug, please contact the application developer directly and refer them to this article. If the developer is out of business or unresponsive, please contact an Intel representative so that we can investigate the issue." Further they give the email address gamedev@intel.com, so if this is important to you, you can contact them and see if they will do anything.
Last edited by Devren; Dec 27, 2021 @ 1:58pm
Modewarp Dec 28, 2021 @ 9:01am 
I appreciate the reply. I'm less interested in automating the process of adding and removing the variable and rebooting, and more interested in somehow getting the app to process the variable at runtime, just for that app / thread, so I don't have to globally apply it or reboot every time i turn it off and on. I thought maybe there was a way to run it as a command line switch or something.

Windows 11 pro here btw.
Devren Dec 28, 2021 @ 11:37am 
The above code should (probably) work on 11 too, I just forgot that was out now and didn't test it on it.

Okay so it looks like the solution I originally posted works on windows 7 and under with it sometimes working on 8-10 depending on your setup. (So I removed it.)

I don't have 11 to test with but it looks like you can use powershell to refresh the environment variables.
Website link [thecategorizer.com]
"Open the Windows PowerShell from the Start menu and run it as an administrator."
"$env:Path = [System.Environment]::GetEnvironmentVariable(“Path”,”Machine”)
Again I didn't test this as I don't have win 11 but it may work.

For other versions of Windows OS you can find solutions here.[serverfault.com](no clue if they will work on 11)
Last edited by Devren; Dec 28, 2021 @ 11:59am
TopazMystique Dec 17, 2024 @ 4:19am 
Originally posted by Devren:
Short Version:

How to REMOVE the environmental variable after you are done with the game:
You can remove the environmental variable by typing "edit environment variables for your account" in the start menu and hit enter.
Select OPENSSL_ia32cap ~0x20000000 and click delete.
Restart your computer.
When I do this I get 4 items: OneDrive, Path, TEMP, TMP
Do I delete all 4?
< >
Showing 1-11 of 11 comments
Per page: 1530 50