CollapseLauncher / Collapse

An Advanced Launcher for miHoYo/HoYoverse Games
MIT License
1.36k stars 64 forks source link

[Bug]: Error when applying GameBoost #414

Closed Caelum008 closed 6 months ago

Caelum008 commented 6 months ago

Affected Version

1.73.4-Pre

Bug Behavior

System.ComponentModel.Win32Exception (0x80004005): There was an error while trying to launch the game!
    Throw: System.ComponentModel.Win32Exception (5): Access is denied.
   at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass)
   at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass)
   at CollapseLauncher.Pages.HomePage.StartGame(Object sender, RoutedEventArgs e)
 ---> System.ComponentModel.Win32Exception (5): Access is denied.
   at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass)
   at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass)
   at CollapseLauncher.Pages.HomePage.StartGame(Object sender, RoutedEventArgs e)

Expected Behavior

Should not be receiving this.

Steps to reproduce

  1. Game repair
  2. Checked for new update

Related Issues

No response

Screenshot(s)

No response

Additional Information

No response

bagusnl commented 6 months ago

Can you send more details like what OS are you using and if its modified in any way (eg. Custom ISO for the like of Tiny11, AtlasOS, etc) ?

And also did you make sure that Collapse run as admin? It should do that in the first place but just making sure because its saying that access to the process is denied likely when the "Bosst game priority" feature is activated

Caelum008 commented 6 months ago

Can you send more details like what OS are you using and if its modified in any way (eg. Custom ISO for the like of Tiny11, AtlasOS, etc) ?

And also did you make sure that Collapse run as admin? It should do that in the first place but just making sure because its saying that access to the process is denied likely when the "Bosst game priority" feature is activated

sorry for the lack of info.

  1. OS is Windows and nope. this is not custom OS. just plain Windows.
  2. yes. Collapse is run as admin.
bagusnl commented 6 months ago

Can I have your system specs? Mainly:

  1. CPU
  2. GPU
  3. RAM
  4. Wheter your Genshin install is on SSD or HDD and the model number for the storage?
Caelum008 commented 6 months ago
  1. CPU: Intel i3 9th Gen
  2. GPU: GeForce 710
  3. RAM: 8GB
  4. Whether your Genshin install is on SSD or HDD and the model number for the storage? - SSD
Caelum008 commented 6 months ago
  1. CPU: Intel i3 9th Gen
  2. GPU: GeForce 710
  3. RAM: 8GB
  4. Whether your Genshin install is on SSD or HDD and the model number for the storage? - SSD

I wasn't receiving this error before the latest update. that's why I reported it.

bagusnl commented 6 months ago

I see, funny thing about that is, we have not changed anything about it for quite awhile xD

Though, my hypothesis is that the priority adjustment failed because it detected the process too early causing it to have "Access denied" because the process had just spawned.

I will try to fix this by adding a 10s delay to the Game Priority Booster and see if this can help with the situation.

lynxxhorizon commented 6 months ago

same issues here, hope it will be fixed soon

bagusnl commented 6 months ago

Current workaround for not getting this error is to disabling "Boost Game Priority" in the Game Settings here: image

I'm currently working on fixing HI3 settings mess so it might take me awhile to get this sorted out

Caelum008 commented 6 months ago

Current workaround for not getting this error is to disabling "Boost Game Priority" in the Game Settings here: image

I'm currently working on fixing HI3 settings mess so it might take me awhile to get this sorted out

noted on this. thank you so much!

bagusnl commented 6 months ago

Heyya~

I have submitted a commit that tries to fix this here https://github.com/CollapseLauncher/Collapse/commit/5148b3e6a6d9a652171b84b4af96347a6c68f1a4 You can download the nightly build here https://nightly.link/CollapseLauncher/Collapse/actions/runs/8158021629 PS. Dont replace your collapse files, just extract everything and run CollapseLauncher.exe directly.

Please re-enable the option and also enable Console in the settings. After pressing "Start Game", observe for anything that has [HomePage::GameBoost_Invoke] on the start of the line, if it has error, please send the entire log here

Caelum008 commented 6 months ago

Hi,

I think it has fixed the issue. I'm no longer receiving the error when Boost Priority is on for Genshin when I opened Collapse from the extracted files.

bagusnl commented 6 months ago

Alrighty, thanks for the confirmation! We will push the fix on next update schedule~