Reproduction Steps
First, create an animation for an R15 or Rthro character using the animation editor plugin.
Make the animation about 1/2 of a second long (14 frames is what I did.) Add two animation events, one on the first frame of the animation, and the second on the second frame (see the blue circle in the image.) Make both event names the same. It can be anything. Give them different parameters though. Then, convert the animation to a curves animation by clicking the curve editor in the animation editor (red circle.)
Publish this to Roblox and then play the animation on a character. The game will crash after playing it once or a few times. Maybe a couple dozen. It will happen.
Here’s the animation I used if you just want to import it to your own Animation Editor: CRASHING_ANIMATION - Roblox
Here’s some code for playing the animation.
Place the following code in a LocalScript within StarterPlayer.StarterCharacterScripts:
local fireAnimation = Instance.new("Animation")
fireAnimation.AnimationId = "rbxassetid://10436236672"
while wait(1) do
local humanoid : Humanoid = script.Parent:WaitForChild("Humanoid")
local fireTrack = humanoid:LoadAnimation(fireAnimation):Play(0)
end
Alternatively, you could place a LocalScipt in a tool and run the code within the loop in the activate function instead so you can click to crash the game.
local Tool = script:FindFirstAncestorOfClass("Tool")
local fireAnimation = Instance.new("Animation")
fireAnimation.AnimationId = "rbxassetid://10436236672"
Tool.Activated:Connect(function()
local humanoid : Humanoid = Tool.Parent:FindFirstChildOfClass("Humanoid")
local fireTrack = humanoid:LoadAnimation(fireAnimation):Play(0)
end)
Save the file so you don’t have to re-do this and then press F5 or click Play Solo.
It may crash instantly the moment the animation is played, or it may take a minute or two, but eventually, this animation will crash the game when played.
Here’s a repro save file that contains everything I’ve described here:
ANIMATION_CRASH_RECREATE.rbxl (82.5 KB)
Expected Behavior
I expect the animation to play and fire both events once.
Actual Behavior
Instead, it plays but randomly crashes Roblox.
The crash isn’t super consistent between individual crashes. Sometimes it’ll crash the first time the animation plays, other times it might have to play a couple dozen times to crash. The crash will inevitably happen and only within a minute or so. It’s not like it’s rare. You should be able to recreate it quickly.
As for the crash itself, Roblox once gave me the “Something unexpected happened and Roblox needs to close” window but never again. Now it just freezes for a second or so and then closes without even saying goodbye, sometimes causing me to click on something on my desktop because the window disappeared so abruptly. When I reopen Roblox, it doesn’t even know anything happened and doesn’t even offer to load an autosave. This crash is not autosave-recoverable.
As for the animation events, both fire multiple times in a single playthrough of the animation, or even dozens of times if GetMarkerReachedSignal was called on a client other than the one playing the animation, though this happens even with animations that don’t crash Roblox so I think this is a separate bug though it may be related.
Here is a report for that bug:
Workaround
Don’t use curves. They are unfinished.
Comment
This isn’t just some weird niche issue. This is something that can easily come up when using curves animations. I had two events near the start of the animation with the same name because I can’t have them on the same frame. For me, they are both called “PlaySound” with their parameters being the names of sounds that I’d like to play at the same time. I have high doubts this is uncommon usage of animation events.
The lack of autosave recovery from this crash could also be a massive issue. I was lucky and only lost about 20 minutes of work but others might not be so lucky. This seems pretty serious.
Honestly, considering Roblox seems interested in making animations and avatars suck a core part of their business model and putting so many eyes on it with the live events, I’m surprised this feature has been so buggy for me.
Anybody know if an animation can be converted back into a non-curves animation?
Issue Area: Engine
Issue Type: Crashing
Impact: High
Frequency: Constantly