Mojira Archive
MCM-1870

Memory Leaks caused by Molang queries within Custom Block "Bone_visibility" definitions.

Partner Rank: High

Verification Builds: 1.21.30 

Regression Builds: Unknown

Summary: When using Molang queries within custom block behaviour definition 'bone_visibility' component, there appears to be a memory leak issue leading to game crashes.

This issue is both compounding and can also just be limited to just one block, the more queries within a single block will lead to a crash faster than if there are just 8+ queries over a larger number of custom blocks. 

The crash can best be tested by adding 50+ queries to a single block, however crashes do still occur eventually if queries are limited to under 10 over a large selection of blocks.

This was discovered due to utilising bone_visibility in a block as a way to add a block animations which couldn't be done if it was split up into permutations.

 

 

Affects currently Live Content: Yes

Impact: If a custom block uses too many molang queries within bone_visibility, the dev version will crash on world load after around 10 seconds.

If the block was removed from the Behaviour pack, the crash would not occur, the block did not need to be placed down in the world for the crash to occur. 

If a player is stacking Add-Ons which are all using custom block bone_visibilty limited to less than 10 Molang queries, this can also lead to instant crashes, or delayed crashes after around 5-10 minutes of playing, dependant on the amount of custom blocks stacked. 

We also had reports that lower end devices would crash upon world load, and specifically Playstation was the most affected.

Repro Steps:

Single block crash

  1. Create a custom block with 60 separate bones.
  2. Define an integer block state
  3. Create 60 Molang queries within the Bone_visibility component using the block state
  4. Duplicate this block 3 times.
  5. Apply the pack to a world, and observe a crash on the dev version in around 10-30 seconds of world load.

Compounding Crash

  1. Apply the following Addons to a world.
    1. Forest Craft Add-On - Float Studios
    2. Furniture Add-On - XP GAMES
  2. Load world and observe game crash on Dev Release version 1.21.30
  3. Separately addons don't cause an instant crash, however will crash after a certain amount of time

Observed Results: Crash occurs.

Expected Results: Utilising Bone_visibility shouldn't lead to game crashes. Compounding use of lower number of queries spread across a large number of blocks is more concerning, as Marketplace Add-On library grows, this could become a much larger issue. 

Screenshots/Videos attached: Yes 

Notes: These crashes have lead to a large number of negative reviews for our latest product, which we have negated by creating permutations for the biggest offenders, however when recreating vanilla blocks, such as fences, stairs, doors, slabs ect.. bone_visibility is vital in their behaviours. 

Unresolved

Float Studios

2024-09-30, 01:22 PM

2024-09-30, 05:25 PM

2

2

1.21

-