Repository navigation
Dispose MultiSigScanner file handles instead of closing them raw - #177
Merged
Merged
Conversation
Owner
|
This seems like a wine bug honestly... (also why would a suspend magically cause an invalid handle?) |
SetupCopy closed the file and mapping handles with CloseHandle on DangerousGetHandle, which leaves both SafeHandles undisposed. When the GC later finalizes them, they close the same handle values again. By then those values can belong to another open file, such as FFXIV_ACT_Plugin.dll while FetchDependencies patches it, which then fails with ObjectDisposedException: Cannot access a closed file. Dispose the SafeHandles with using instead.
hareeen
force-pushed
the
u/fix/hook-after-fetch
branch
from
November 23, 2026 15:08
cae0f9c to
a08d962
Compare
Contributor
Author
|
Oh sorry, I dug into this more (with some help from Claude) and my original explanation was wrong.
Wineserver trace ( Fixed it by |
marzent
approved these changes
Nov 26, 2026
marzent
left a comment
Owner
There was a problem hiding this comment.
Yes this does make sense now, thanks for investigating this.
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.
Start the
ZoneDownHookManagertask afterGetFfxivPluginreturns instead of at the top of the plugin constructor.Context:
Installing the hook suspends every other thread, and under Wine a thread suspended mid file I/O resumes with an invalid handle. With a known game version the hook lands before any file I/O starts, but the dynamic fallback sig-scans for a couple hundred milliseconds first and pushes the install right into the extraction window.
Reproduced on a Korean client under Wine.