CurvedAnimations Crashing Studio

I am playing a CurvedAnimation, created in the updated ACE, that is about 5.6 seconds long. This is on a custom bone rig.

Playing this animation crashes studio entirely. It does not go to “unresponsive” - just crashes instantly.

This only happens in this specific situation (files attached as well):

  • Preload animations (PreloadAsync) [not needed but I do this on my end]
  • At least 2 copies of the same rig created after runtime, but at least one of them has to be client-side.
  • Load the animation normally → animator of the AnimationController
  • Play animation (instantly crashes)

I have tested this with 3 separate rigs using 3 separate CurvedAnimations and it happens on all of them without fail. This also crashes a live roblox game, regardless of device.

While this could be user error still, the code does not crash with a normal roblox animation, only a curved animation.

I have attached several files for admins to use.

Expected behavior

The animation should play normally without crashing.

A private message is associated with this bug report

Thanks for your report, we will look into these crashes promptly.

2 Likes

Figured out the problem - posting here for anyone else that might have the same problem in the future but sadly for me it was pretty specific.

I called AnimationClipProvider:GetAnimationClipAsync() so I could get the time length of the animations. I then cached the response and would eventually (within a few frames or less) delete the CurveAnimation this method returned.

local success, response = pcall(function()
	return AnimationClipProvider:GetAnimationClipAsync(assetId)
end)

-- if successful, I cached the response (which is an actual CurveAnimation you can parent to anything in the game)
-- I thought the best thing to do was to eventually delete this CurveAnimation, hopefully to not cause a build up in memory. Do not do this, it crashes the game.

As long as you do not delete the CurveAnimation, everything works fine, no crashes. I have tested this on an empty baseplate, using a custom rig using an AnimationController, with this code. Change assetId to your own CurveAnimation ID and you should get the same results.

local AnimationClipProvider = game:GetService("AnimationClipProvider")
local animationController = script.Parent:WaitForChild("AnimationController")
local animator = animationController:WaitForChild("Animator")

local assetId = ""

local animation = Instance.new("Animation")
animation.AnimationId = assetId

local animationTrack = animator:LoadAnimation(animation)
animationTrack:Play()

local success, response = pcall(function()
	return AnimationClipProvider:GetAnimationClipAsync(assetId)
end)

if response then
	local clip = response
	task.wait(1)
	clip:Destroy()
end

Although, if you task.wait(5) before deleting, it does not crash. 5+ seconds though, anything less crashes. This is specifically for CurveAnimations.

Side note for anyone in the future - this may also be the cause for why an animation will play on the server but not on the client, even if the client is the one that played the animation (specifically on non-humanoid model that the player has networkownership of).

The fact that you are getting crashes is still a big problem. I consider your reply a workaround, not a solution. We’ll follow up with more info as we look into this.

Hello! I was about to post a bug report about this.

Please fix this, it even crashes with linear animations. I’ve been facing these bugs for days and haven’t made any progress with my project yet and let us know when it is fixed.

Thank you!