Skip to content

Fix Windows plugin load failure when another ffxiv_dx11.exe is inacce… - #176

Closed
CateDesu wants to merge 1 commit into
marzent:mainfrom
CateDesu:patch-1
Closed

CateDesu wants to merge 1 commit into
marzent:mainfrom
CateDesu:patch-1

Conversation

@CateDesu

Copy link
Copy Markdown

…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

…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
@CateDesu CateDesu closed this by deleting the head repository Oct 17, 2026
@marzent

marzent commented Oct 20, 2026

Copy link
Copy Markdown
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.

@CateDesu

Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IINACT 2.10.3.6 fails to load (Windows)

2 participants