Setting TimePosition on an AnimationTrack throws an error

Reproduction Steps
To reproduce this bug, simply attempt to set the TimePosition property of an AnimationTrack.

Expected Behavior
When setting this property, the animation should’ve jumped to that specific time.

Actual Behavior
Since the latest update, the following error is thrown:

exception while signaling: clampKeyframeTime called but animation asset isn't loaded in animationTrack

Issue Area: Engine
Issue Type: Other
Impact: High
Frequency: Constantly
Date First Experienced: 2021-12-02 18:12:00 (+00:00)

1 Like

I also received this bug about an hour ago after logging onto Studio from about 3 hours prior, however I wasn’t doing anything with animation. I don’t have animations in my game, and this error is breaking my game.

I can also confirm this is happening. This is breaking the loading in sequence for my game.

Also just got this bug. Really annoying

Works for me, but I include a 1 second delay after every LoadAnimation to wait for the priority field to properly populate. It’s possible this is an error/bug of calling the animation too quickly.

Hi, this is the correct solution. A change that just went live introduces a new, faster and more consistent way to load animation asynchroneously in AnimationTrack. The result is that some of the API calls to tracks before they are properly populated should not be done. However, this should just be a warning message and no side-effect instead of crashing your scripts. We have turned off this new codepath for now (which should come into effect quickly after your next reboot) and we will drop the severity of the error reporting in the next release.

4 Likes

Also getting this bug error as soon as I try playing an experience which has animationtrack events in:

exception while signaling: clampKeyframeTime called but animation asset isn't loaded in animationTrack.

It stops all animations playing.

I think it would be a fantastic feature to add if LoadAnimation would trigger an event when the load is complete. Right now, every YouTube tutorial out there recommends calling LoadAnimation right before you need the animation, and playing it immediately.

animator:LoadAnimation(thistrack)
thistrack:Play()

This is the source of the problem/errors. What we need is something like this:

animator:LoadAnimation(thistrack)
thistrack.LoadComplete:Connect(function()
    thistrack:Play()
end

I would much rather have this than my arbitrary wait command.

1 Like

Once this change goes live again, what would be the recommended way to call animations without arbitrary yielding? As far as I know, there isn’t really a

AnimationTrack.Loaded:Wait()

and repeatedly calling Length ~= 0 isn’t really a viable alternative. I’m not really a big fan of it spamming my console with warning messages since I need to see my own debug messages.


Edit: Rethinking again, I suppose we can load all the animations we need beforehand and play them as needed, however, there are many times still where even after loading all of them, we need them to play immediately.

Agreed, we’ll look into adding something to that effect over the next few releases :+1:.

2 Likes

This is how I handle it. As soon as the model is loaded, I load the animations. Then I wait… and then I drop them on the map. You can play the animation immediately, as long as you change what that means.

Does this mean that the current :LoadAnimation() will be deprecated? If a new method which yields until the animation has loaded is added, could we be given time to update our code so that this error (or warning, in the future) is prevented?

Roblox has just updated, and the issue is back with the same severity.

1 Like

Apologies for that, this should be resolved soon.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.