AnimSequenceBase.cpp randomly causes assertion

Hi!

When testing my game it crashes randomly when I use “simple move to” node. The error is:

D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.2\Engine\Source\Runtime\Engine\Private\Animation\AnimSequenceBase.cpp(242): Assertion failed: bPlayingBackwards ? (CurrentPosition <= PreviousPosition) : (CurrentPosition >= PreviousPosition)

I’ve tried to reimport the models and animations which didn’t help. This happens on multiple characters and moving them might work multiple times and then suddenly crash.

I was able to reproduce this issue in a new project with a simple blueprint:

Branch: Binary, using launcher

Build version: 4.2.1-2101290

Thanks!

Howdy Fervensmiber,

Thank you for your bug report. I have attempted to reproduce your bug and have been unsuccessful. I have created a Character Blueprint and have set it up exactly as you have shown in the photo. I haven’t seen any crashing when placing the blueprint into the level and/or moving it around in the level.

If there is any additional information on how I may be setting this up wrong or any steps that are not included, please do let me know so i can attempt another reproduction.

Thanks and have a great day!

Hello Sean and thanks for looking into this! I used Pawn instead of Character, but the problem might be caused by the assets we are using. I sent you a repro project as a private message through forums. Could you check it out? It contains only the blueprint that causes the issue. We have encountered the same error with multiple assets, but if you can find fault in this one I think we can help ourselves from there.
Thanks!

Howdy Fervensmiber,

I received the files through the private message, thank you for that. I was able to see the crash on my end and I have proceeded to write a bug report for the issue. Please let us know if anything further develops.

Thanks again and have a great day!

Hi Sean and thanks for reporting this forward. Were you able to investigate what might be causing this so we could workaround it, instead of disabling all of our animations?

I fixed this in latest, but to work around for you, right after you play animation, make sure to set SetPosition to 0.f. There was a bug where position isn’t reset.

Thanks,

–Lina,

I have exactly the same error, and it also crashes randomly. I’m on 4.8.1, is it broken again? (I can’t apply this workaround with setting SetPosition to 0.f. after playing animation, because i use animation blueprint, not Play Animation nodes)

PS. When this crash happens (random), it seems like it’s always right after character is reaching his destination point, after performing Simple Move to Location.

Edit: I’ve managed to work around this bug by delaying any actions taken AFTER reaching destination point by ~0.3s in my function. Maybe it’s because previously playing animation was somehow not fully blended yet and this causes the error? Well anyway, i’ve decided to give it some time, and waiting 0.3 seconds before playing any other animation fixed it - but the bug is still there.

Edit2: Just noticed that my workaround works only in one case, the bug still crashes my game…

Edit3: THIS thread is probably the same bug, i have very similar setup

Edit4: As OP said in thread linked above, the bug appears only when the new animation is shorter than the previous one! Just tested it.

Hi Slavq,

In cases like this where your crash may have the same repro steps, we would appreciate it if you made one new answerhub post instead of reviving old posts. While the repro may be the same, the cause could be new. Please make a new post.

-Matt W.

OK, just did it with new repro demo project, HERE