Editor Freeze when pressing "Apply to All" from an Animation Modifier

Hi, in 5.6 we’re having the editor freeze when pressing the “Apply to All” button on an Animation Modifier. The upgrade to 5.6 added the line `AnimSequence->WaitOnExistingCompression();` to the function `AnimationModifier::ApplyToAnimationSequence`, which is what’s causing the freeze. The `ApplyToAnimationSequence` function is waiting for compression the first time through, and then re-entering the same function during `PostEditChange`. Ultimately, it gets stuck in `AsyncCompilationHelpers::FinishCompilation` where it has 1 job to work on but makes no progress.

The message box it gets stuck on shows “Waiting for animation sequences to be ready 0/1 (PATH_TO_ANIM_HERE)”

We got around this by adding the line `UE::Anim::FApplyModifiersScope Scope;` above the `AnimSequence->WaitOnExistingCompression();` line, but we’re not sure if this is the correct fix. Alternatively, removing `AnimSequence->WaitOnExistingCompression();` also fixes the issue.

I’m unable to get this to repro with default mannequin animations, and it’s weird because some of our game specific animations are fine and some aren’t, and I’m not sure why.

Our repro is:

  1. Create a new blueprint asset, which is a child of AnimationModifier
  2. Open an animation sequence, and in the Window -> Animation Data Modifiers panel, press “Add Modifier” and select the new one you just made
  3. Go back to the blueprint asset of the animation modifier, and press “Apply to All”

[Image Removed]

Hello [mention removed]​,

Thank you for reporting this. It appears the freeze issue has been fixed in the Main P4 stream with change CL 43221187. Change description: Create Montage is causing a freeze. EvaluationModifier lock scopes when applying AnimModifier (as users can hook into ::PostEditChange).

You can also review this change on GitHub here.

You can expect this change to be introduced in an upcoming release. In the meantime, could you please try cherry-picking or applying the changes and let me know if the issue persists on your end?

Looking forward to your confirmation.

Best,

Francisco

Hi, thanks for the quick reply

That worked for most animations, but it still gets stuck on another one now with the same callstack. If I reapply the anim modifier to just that one animation though, it doesn’t freeze.

Hello [mention removed]​ ,

Glad to hear it helped. Is that other animation the only one causing the freeze?

It would also be very helpful if you could share a minimal repro project where the freeze occurs so I can reproduce it on my end and test further.

Best,

Francisco