genshin-fps-unlock: AccessViolationException when launching the game on Linux
When using the program (versions 3.0.4 and 3.0.3) on Linux with the game version 4.7, the game launches but the fps cap is not modified (stuck with in-game setting). Before 4.7 it was working fine and I haven’t updated anything else except the game, so that latest update must be the cause of the problem (or maybe it revealed a bug in wine/Linux that wasn’t a problem in the other versions).
It seems that unlockfps_nc.exe gets an exception when it tries to modify the memory to change max fps.
Setting the env variable WINEDEBUG=+seh on the command line shows this exception:
Application: unlockfps_nc.exe
CoreCLR Version: 8.0.224.6711
.NET Version: 8.0.2
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
at unlockfps_nc.Utility.ProcessUtils.PatternScan(IntPtr, System.String)
at unlockfps_nc.Service.ProcessService.SetupData()
at unlockfps_nc.Service.ProcessService+<Worker>d__18.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[unlockfps_nc.Service.ProcessService+<Worker>d__18, unlockfps_nc, Versio"...
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[unlockfps_nc.Service.ProcessService+<Worker>d__18, unlockfps_nc, Versio"...
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[unlockfps_nc.Service.ProcessService+<Worker>d__18, unlockfps_nc, Versio"...
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Runtime.CompilerServices.IAsyncStateMachineBox, Boolean)
at System.Threading.Tasks.Task.RunContinuations(System.Object)
at System.Threading.Tasks.Task`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].TrySetResult(Boolean)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetExistingTaskResult(System.Threading.Tasks.Task`1<Boolean>, Boolean)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].SetResult(Boolean)
at unlockfps_nc.Service.ProcessService+<UpdateRemoteModules>d__22.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[unlockfps_nc.Service.ProcessService+<UpdateRemoteModules>d__22, unlockfps_nc, Version=1.0.0.0,"...
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[unlockfps_nc.Service.ProcessService+<UpdateRemoteModules>d__22, unlockfps_nc, Version=1.0.0.0,"...
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Boolean, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[unlockfps_nc.Service.ProcessService+<UpdateRemoteModules>d__22, unlockfps_nc, Version=1.0.0.0,"...
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Runtime.CompilerServices.IAsyncStateMachineBox, Boolean)
at System.Threading.Tasks.Task.RunContinuations(System.Object)
at System.Threading.Tasks.Task.TrySetResult()
at System.Threading.Tasks.Task+DelayPromise.CompleteTimedOut()
at System.Threading.TimerQueueTimer.Fire(Boolean)
at System.Threading.TimerQueue.FireNextTimers()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
For reference, I installed the game using Heroic Games Launcher, and the game is running using proton-ge
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 22 (8 by maintainers)
will fix
https://github.com/34736384/genshin-fps-unlock/releases/tag/v3.2.0
Since the newest Genshin update, the program is also not working for me (Windows 11). My error code is different though.
“ReadProcessMemory failed with code :299 Only a part of a ReadProcessMemory or WriteProcessMemory request was completed”
Hopefully @34736384 can manage to find a workaround. I remember reading in recent Genshin dev updates that they would be making changes that specifically made it harder for third party tools to work. I guess this is what they were referring to.
Game feels absolutely unplayable for me at 60FPS after being used to 165FPS. Crazy that Hoyoverse have not natively / officially enabled this feature in 2024 (and are instead actively working to disable third party support).