Skip to content

Add a more specific RunFinalizer signature for Summer Vacation! Scramble#199

Merged
ManlyMarco merged 1 commit intoBepInEx:masterfrom
y0soro:add-svs-signature
Jan 11, 2025
Merged

Add a more specific RunFinalizer signature for Summer Vacation! Scramble#199
ManlyMarco merged 1 commit intoBepInEx:masterfrom
y0soro:add-svs-signature

Conversation

@y0soro
Copy link
Copy Markdown
Contributor

@y0soro y0soro commented Jan 8, 2025

The "Test Game" signature is a bit general that it matched MS.Internal.Xml.Cache.XPathDocumentNavigator$$MoveToId in Summer Vacation! Scramble(SVS) assembly, causing NULL finalier access crashes due to HasFinalize not being handled.

The one actually matched RunFinalizer in SVS is "V Rising" signature, though it's listed after the "Test Game" signature.

Although a simple reorder can fix the issue for SVS, both signatures mentioned are quiet general so this could breaks other games relying on this matching order, otherwise the same crash can happen due to hooking on the wrong location.

Thus I instead add a more specific signature that should solely matches RunFinalizer on SVS or other games with similar compilation options before the too general one.


This supersedes #196 and is less aggressive. The added signature is the most specific one so it should not match functions other than RunFinalizer in other games.

Tested working on SVS v1.1.3 and verified that this signature matches RunFinalizer on SVS v1.0.2, v1.1.1 and v1.1.2 assembly.

[Debug :Il2CppInterop] GarbageCollector::RunFinalizer found: 0x633D02E0

The "Test Game" signature is a bit general that it matched `MS.Internal.Xml.Cache.XPathDocumentNavigator$$MoveToId`
in Summer Vacation! Scramble(SVS) assembly, causing NULL finalier access
crashes due to HasFinalize not being handled.

The one actually matched RunFinalizer in SVS is "V Rising" signature,
though it's listed after the "Test Game" signature.

Although a simple reorder can fix the issue for SVS, both signatures
mentioned are quiet general so this could breaks other games relying on
this matching order, otherwise the same crash can happen due to hooking
on the wrong location.

Thus I instead add a more specific signature that should solely matches
RunFinalizer on SVS or other games with similar compilation options
before the too general one.
Copy link
Copy Markdown
Member

@ManlyMarco ManlyMarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#196 already got approved and this is straight up better so should be fine to merge right away.

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.

2 participants