Skip to content

Fix hugely popular crash in RpAnimBlendAllocateData (SA 0x000D5F6F)#4894

Open
Dutchman101 wants to merge 2 commits intomultitheftauto:masterfrom
Dutchman101:animcrashfix
Open

Fix hugely popular crash in RpAnimBlendAllocateData (SA 0x000D5F6F)#4894
Dutchman101 wants to merge 2 commits intomultitheftauto:masterfrom
Dutchman101:animcrashfix

Conversation

@Dutchman101
Copy link
Copy Markdown
Member

This PR fixes all paths i could trace for a very common crash, according to crash stats.
There's not much to say, other than that the pre-existing hook meant to avert this crash wasn't sufficient, but now it is.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code changes here seem to be guarding against m_pModelInfo pointing to invalid data, but do we know why it's invalid in the first place?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(Seems like a use after free or something?)

Comment on lines +2913 to +2918
#define HOOKPOS_CAnimBlendAssocGroup_CreateAssociations 0x4CE2F7
#define HOOKSIZE_CAnimBlendAssocGroup_CreateAssociations 7
#define HOOKCHECK_CAnimBlendAssocGroup_CreateAssociations 0x8B
DWORD RETURN_CAnimBlendAssocGroup_CreateAssociations = 0x4CE2FE;
DWORD RETURN_CAnimBlendAssocGroup_CreateAssociations_Skip = 0x4CE36F;
void _declspec(naked) HOOK_CAnimBlendAssocGroup_CreateAssociations()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please could you write some comments explaining exactly what the hook does?

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