bloxstrap icon indicating copy to clipboard operation
bloxstrap copied to clipboard

[REQ] Automatically delete %temp%/Roblox folder

Open DesMS opened this issue 1 year ago • 34 comments

Acknowledgement of preliminary instructions

  • [X] I have read and acknowledged the preliminary instructions.

What idea do you have?

There is currently a bug with Roblox where it will sometimes fail to start, and will never start up until you delete the %temp%/Roblox folder.

Video of the bug: https://github.com/pizzaboxer/bloxstrap/assets/84988422/55833ca1-0e38-43e6-adcf-659be4960747

With this, there could be a feature to where it automatically deletes the %temp%/Roblox folder every startup, or every time roblox doesn't create a window in enough time.

DesMS avatar Feb 03 '24 03:02 DesMS

no clue how that stops roblox from launching

nice desktop btw

Findyourlimit avatar Feb 03 '24 09:02 Findyourlimit

There is currently a bug with Roblox where it will sometimes fail to start, and will never start up until you delete the %temp%/Roblox folder.

...I guess that would explain why doing a disk cleanup (as described in https://github.com/pizzaboxer/bloxstrap/wiki/Roblox-crashes-or-does-not-launch) helps to resolve issues with Roblox not launching? That's interesting.

pizzaboxer avatar Feb 03 '24 12:02 pizzaboxer

Using handle (microsoft.com link), I got this for the normal roblox opening sequence (One that works):

image

Checking on a failed startup, I noticed that the ReShade64.dll is loaded:

image

And that the temp folder isn't even accessed either time roblox is opened (What?)

I do have ReShade installed, but I have it configured for BeamNG.Drive, and not Roblox. I don't know why Roblox would even attempt to load the ReShade dll (Maybe it's some sort of weird way that ReShade checks if the game is to be loaded? And it's interfering with the Roblox anticheat?)

image

DesMS avatar Feb 03 '24 20:02 DesMS

I don't think this is an issue with Windows, it's either an issue with Roblox or ReShade (I'm guessing ReShade, but idk why it would fix it by deleting the Roblox temp folder, as that's not even where ReShade stores it's temporary stuff for programs)

DesMS avatar Feb 03 '24 20:02 DesMS

I do have ReShade installed, but I have it configured for BeamNG.Drive, and not Roblox.

Are you sure that ReShade isn't globally injecting itself into any application?

pizzaboxer avatar Feb 03 '24 21:02 pizzaboxer

Tbh I don't know how ReShade works, I think it launches itself with the Nvidia driver, but, I don't understand why clearing Roblox's temp folder would fix this

DesMS avatar Feb 03 '24 21:02 DesMS

After doing some research, ReShade injects itself into the graphics driver (In this case, Nvidia), and then, whenever a program that uses Vulkan (The mode I chose) launches, it will attempt to inject itself. What is confusing is that clearing the Roblox temp folder fixes this.

I saw online that there was an option to disable global vulkan injection, but reinstalling ReShade, it does not have an option to disable it.

I also saw that in order to disable it globally, you had to go into the registry and goto Vulkan, but there is nothing there relating to ReShade image

DesMS avatar Feb 03 '24 22:02 DesMS

Just created some code that fixes it, https://github.com/pizzaboxer/bloxstrap/pull/1243

DesMS avatar Feb 04 '24 03:02 DesMS

I saw online that there was an option to disable global vulkan injection, but reinstalling ReShade, it does not have an option to disable it.

Have you looked at https://www.pcgamingwiki.com/wiki/ReShade#Vulkan?

pizzaboxer avatar Feb 04 '24 12:02 pizzaboxer

Yup, that was where I got the idea for the pull request image It automatically does this if ReShade is installed [For the pull request] (The other fixes don't work)

DesMS avatar Feb 04 '24 17:02 DesMS

This issue is entirely a Reshade issue, not ours.

bluepilledgreat avatar Feb 04 '24 19:02 bluepilledgreat

Actually, what version of ReShade are you using?

pizzaboxer avatar Feb 04 '24 23:02 pizzaboxer

I'm using ReShade 6.0.1

DesMS avatar Feb 05 '24 01:02 DesMS

Maybe you could just have a dialog box informing the user about why Roblox won't start?

axellse avatar Feb 05 '24 06:02 axellse

I've just realized something: I completely forgot that I had ReShade installed!

firefox_jcYQ8tgOL5

And I was wondering why Roblox with Vulkan wasn't working for me. Sure enough, temporarily renaming the folder in ProgramData makes Roblox launch again. I wonder how many other people this affects too.

I also saw that in order to disable it globally, you had to go into the registry and goto Vulkan, but there is nothing there relating to ReShade

Look in HKEY_LOCAL_MACHINE, not HKEY_CURRENT_USER. It's definitely there.

If I'm going to add a workaround for this, I'm strongly gravitating towards simply altering the registry key instead of renaming the folder. Changing the value of the key from 0 to 1 will disable it. I mean, it would also require admin perms, but it wouldn't be as bad.

pizzaboxer avatar Feb 05 '24 09:02 pizzaboxer

Ah, I'm not the only person experiencing this, I'll check HKEY_LOCAL_MACHINE when I get home, I'll also check if setting it to a 1 will stop ReShade from launching with BeamNG

DesMS avatar Feb 05 '24 14:02 DesMS

Axellse, I think that's a good idea, if Roblox doesn't create a Window in, let's say 30 seconds, it will automatically ask you if you want to enable the ReShade fix (If ReShade is installed on the system)

DesMS avatar Feb 05 '24 14:02 DesMS

Axellse, I think that's a good idea, if Roblox doesn't create a Window in, let's say 30 seconds, it will automatically ask you if you want to enable the ReShade fix (If ReShade is installed on the system)

This is insanely stupid as other stuff can cause crashes.

bluepilledgreat avatar Feb 05 '24 16:02 bluepilledgreat

It's not, I said "If it detects that ReShade is installed", it's not hard to detect for dll injection (You can even do it with cmd), even if you don't want to test for dll injection, you can always check for the ReShade folder in ProgramData.

Also, notice how I said it should ask you if you would like to enable it, not automatically enable it. It's a much better system than just relying on you to know that ReShade is causing the issue

DesMS avatar Feb 05 '24 16:02 DesMS

Using handle (microsoft.com link), I got this for the normal roblox opening sequence (One that works):

image

Checking on a failed startup, I noticed that the ReShade64.dll is loaded:

image

And that the temp folder isn't even accessed either time roblox is opened (What?)

I do have ReShade installed, but I have it configured for BeamNG.Drive, and not Roblox. I don't know why Roblox would even attempt to load the ReShade dll (Maybe it's some sort of weird way that ReShade checks if the game is to be loaded? And it's interfering with the Roblox anticheat?)

image

Here is an example of how to check, using handle.exe [Sysinternals] (How I found out it was ReShade causing the issue)

DesMS avatar Feb 05 '24 16:02 DesMS

image

Changing the key from a 0 to a 1 (In order to disable it) also disables it for BeamNG, and in order to re-enable it, you would likely have to request admin every time (Due to it being in HKEY_LOCAL_MACHINE).

Also, changing Software\Khronos\Vulkan\ImplicitLayers for every user, but keeping it different from the current user isn't ideal either

DesMS avatar Feb 05 '24 23:02 DesMS

I've also tried disabling it through HKEY_CURRENT_USER\Software\Khronos\Vulkan\ImplicitLayers, but adding a new dword-32 key with the name C:\ProgramData\ReShade\ReShade64.json, and setting it to 1, but that didn't work.

Also, this is an issue with ReShade 5.0.0+, not 6.0.0+. They removed the option in favor for "per-game" installation, but that installation is still bugged with it injecting itself into all programs, so this isn't even considered "global installation" to ReShade, but it still injects globally

image image

If it's been known since 5.0.0, and there's been 20 updates since then, so it doesn't look like they're going to fix it

DesMS avatar Feb 07 '24 12:02 DesMS

Also, this is an issue with ReShade 5.0.0+, not 6.0.0+.

Right, that's what I was wondering.

They removed the option in favor for "per-game" installation, but that installation is still bugged with it injecting itself into all programs, so this isn't even considered "global installation" to ReShade, but it still injects globally

In which case, shouldn't you just remove the global injection yourself?

pizzaboxer avatar Feb 07 '24 13:02 pizzaboxer

In which case, shouldn't you just remove the global injection yourself?

When I get home, I'll check the difference between 4.9 and 5.0, and see if disabling global injection in 4.9 does the same thing as 5.0, or if it does something different. I also mean that it's 5.0.0+, not just 6.0.0+ (6.0 is also affected)

DesMS avatar Feb 07 '24 14:02 DesMS

I know what you mean, but my suggestion still stands. If ReShade really isn't supposed to be injecting itself globally anymore, that needs to be brought up on the ReShade forum, and we should put an advisory for that on the Wiki instead of doing what we originally intended to do.

pizzaboxer avatar Feb 07 '24 14:02 pizzaboxer

I'll create a post, but I believe I saw somewhere where he said that the injected dll shouldn't activate a anticheat, due to it not loading anything if it's the wrong game

DesMS avatar Feb 07 '24 15:02 DesMS

injected dll shouldn't activate a anticheat

Injecting any untrustworthy DLLs into the Roblox client will cause an immediate crash

bluepilledgreat avatar Feb 07 '24 15:02 bluepilledgreat

Injecting any untrustworthy DLLs into the Roblox client will cause an immediate crash

We know that's what's causing the crash already, I'm saying that i believe the reason for him having ReShade globally injecting is that it doesn't load anything

DesMS avatar Feb 07 '24 15:02 DesMS

image

DesMS avatar Feb 07 '24 19:02 DesMS

Axellse, I think that's a good idea, if Roblox doesn't create a Window in, let's say 30 seconds, it will automatically ask you if you want to enable the ReShade fix (If ReShade is installed on the system)

my idea is not to ask the user to apply the fix, its just to inform the user why roblox wont start. Also implementing a fix is maybe a bit overkill since this is a pretty specific issue.

axellse avatar Feb 08 '24 19:02 axellse