Repository navigation
Conversation
…ssible Fixes #175 and likely #131 which had the same error. ## Root cause ProcessManager.Verify calls ReadProcesses.Read64 which lists every ffxiv_dx11 process on the system and reads StartTime and MainWindowTitle on each one. That happens outside the per process try/catch so if any game process is inaccessible the whole enumeration throws Win32Exception 5 Access is denied. This happens when a second client runs as admin or under another user or when a zombie game process is left over. Read64 then returns an empty list Verify fails and the plugin does not load with the error Game offsets could not be found. The enumeration code is the same across recent FFXIV_ACT_Plugin releases so it only depends on what processes exist on the machine. That is why reinstalling does not help. ## Fix IINACT always runs inside the game process so listing system processes is not needed. Replace the Read64 body with `return new List<int> { Process.GetCurrentProcess().Id };` following the same pattern already used for ScanMemory.Run ReadMemory and SignatureManager.RefreshVtable. Notes - the GetMethod lookup uses MemoryReader.ReadProcesses::Read64 so it does not match the IReadProcesses interface member - Read64 has try/catch regions so ExceptionHandlers must be cleared before rewriting the body - the List and Process references are taken from the original IL so they keep the right assembly scopes ## Testing Ran the real GetFfxivPlugin against the ravahn 3.0.2.8 release zip - patched Read64 returns the current process id when invoked at runtime - no Process.GetProcessesByName calls remain in the patched assembly - all existing patches are unchanged - Read64 is only called from ProcessManager.Verify
Owner
|
Sorry for not getting back to this earlier, but in general this is a FFXIV_ACT_Plugin bug, and I usually try to keep the modifications there minimal... I'll think about this change though, it seems unobtrusive; although IMHO it is a pretty niche use case. |
Author
|
No worries, I figured you just didn't see it or something. I only did it because someone in the discord kept getting it and I thought I'd figure it out for him. ❤️ :3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ssible
Fixes #175 and likely #131 which had the same error.
Root cause
ProcessManager.Verify calls ReadProcesses.Read64 which lists every ffxiv_dx11 process on the system and reads StartTime and MainWindowTitle on each one. That happens outside the per process try/catch so if any game process is inaccessible the whole enumeration throws Win32Exception 5 Access is denied. This happens when a second client runs as admin or under another user or when a zombie game process is left over. Read64 then returns an empty list Verify fails and the plugin does not load with the error Game offsets could not be found.
The enumeration code is the same across recent FFXIV_ACT_Plugin releases so it only depends on what processes exist on the machine. That is why reinstalling does not help.
Fix
IINACT always runs inside the game process so listing system processes is not needed. Replace the Read64 body with
return new List<int> { Process.GetCurrentProcess().Id };following the same pattern already used for ScanMemory.Run ReadMemory and SignatureManager.RefreshVtable.
Notes
Testing
Ran the real GetFfxivPlugin against the ravahn 3.0.2.8 release zip