fix(gta-core-five): crmtComposer stack underflow in BlendN child counting#3825
Merged
prikolium-cfx merged 1 commit intocitizenfx:masterfrom Mar 11, 2026
Merged
Conversation
|
@DaniGP17 i have a crash that u need to see, can u contact me on discord? locutor404 |
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.
Goal of this PR
Fix a stack underflow crash in
crmtComposerthat occurs when handlingkNodeBlendN/kNodeMergeN/kNodeAddNnodes with specific child configurations.The crash was caused by incorrect boolean logic when counting active children, which could result in more
PushPair()calls than actual frames present on the composer stack. This led to an underflow access (m_FrameStack[-1]).How is this PR achieving the goal
This PR corrects the boolean condition used when counting active children in the BlendN code path.
The original logic used:
This incorrectly counted silent children, even though silent nodes do not push frames onto the stack during traversal.
The fix changes the logic to:
This ensures that only children that actually contribute frames are counted, keeping the internal composer stack balanced and preventing underflow in PushPair().
This PR applies to the following area(s)
FiveM
Successfully tested on
Game builds: None
Platforms: Windows
Checklist
Fixes issues
fixes #3669