Deeply-nested custom player geometry causes an assert (and crashes the game)
*Partner Rank:*
2
*Partner Team Reporting:*
Everbloom Studios
*Verification builds:*
1.13.0.4 (Crashes the game)
1.13.0.5 (Silently reverted to default player look)
1.13.0.9 (Crashes the game)
(Can't know for sure if this occurs in 1.13.0.10 because of MCM-804)
(Because of MCM-805, 1.13.0.4 is the best version to test this bug)
*Summary:*
Resource packs that override the player's look will crash the game if the geometry used on the player has deeply-nested bones (around a depth of 13 bones).
(Using a modified version of the example pack from Slack as a reference)
An assert is also shown with the following text:
---------------------------
Assert Failure - ctrl+C to copy this message to the clipboard!
---------------------------
Assertion failed: Max matrix stack size reached, growing here can invalidate all other Matrix Refs. Increase size of MAX_MATRIX_STACK_SIZE. @ MatrixStack::_push
Function: in f:\darwinwork\1\s\handheld\src-deps\renderer\src\matrixstack.cpp @ 62---------------------------
OK
---------------------------
Note that this is not a problem when the same model is applied to a non-player entity.
*Impact:*
We are unable to reliably develop resource packs that override the player, something we were able to do for a few builds now.
*Repro Steps:*
- Create and join the provided world. Look at the player if you can.
*Observed Results:*
When loading the world, the assert above will be shown (if enabled), and the game will crash.
The custom model may be shown for one frame before the game fully closes.
*Expected Results:*
No assert should be shown and the game should not crash. The player should also look like a penguin, with its respective animations.
*Screenshots/Videos attached: Yes/No*
No
*Regression Builds:*
1.13.0.2
*Notes:*
The resource pack is a modified version of the example player-override pack in #partner_announcements in Slack. The modification is in the penguin geometry: 12 bones without any cubes have been added, each is a parent of the previous (and the first is a parent of the body)