Playing a mesh animation on a mesh and then swapping the meshasset crashes the game

Describe the bug: Playing a mesh animation on a mesh and then swapping the meshasset crashes the game

How do you cause this bug?

  • Play a mesh animation on a mesh with animations (such as a Door)

self:GetEntity():PlayAnimation(‘opening’)

  • Afterwards, swap the meshasset of said mesh to a mesh without animations (such as an Apple)

self:GetEntity().mesh = self.properties.newMesh

  • The game will crash

Important things to note:

  • I’ve made an animation handle, stopped the handle, and checked IsPlaying() on the handle and it returns false before attempting to change the mashasset

  • The crash still occurs, even when an animation is not actively being played

  • The only solution for now (which isn’t entirely reliable - still has led to some crashes) seems to be setting the meshasset to nil, waiting a frame, and then swapping the meshasset

Which platform: PC

Your Crayta username: Slaying

Game seen in (including “Hub” or “Editor for XYZ”): Editor

How regularly do you see this? (E.g. 2/3 times - please try 3 times if possible): Every time - Has happened a couple dozen times tonight from testing

Time + date seen: 10/28/2022

Version number (found in Help tab in Settings): 0.h2.42.133877

Hi @Slaying,

Could you possibly paste an example script in a comment for me to grab to repro this please?

Thanks!