SetPlaybackPosition of a Sequence fails assertion

I started experiencing something odd with the new SetPlaybackPosition in 4.26.

So, it seems that one cannot call an event from the SequenceDirector, that either directly or indirectly calls a SetPlaybackPosition on the sequence itself. This used to work fine for 4.25 (with the deprecated ScrubTo or JumpTo nodes) but now using SetPlaybackPosition it produces an Ensure failed error. Not sure if it’s a regression of an older bug I read about somewhere (4.17 maybe?)

Do the following simple thing:

Start a new FPS template, C++ Create a simple actor in C++ that holds a UPROPERTY for a ULevelSequencePlayer Also include a UPROPERTY for a ULevelSequence Extend that actor in Blueprint Create a new LevelSequence that does something very simple, for example moves one of the cubes in the scene * Select that sequence from the dropdown for your LevelSequence object reference in your blueprint’s properties At BeginPlay create a new CreateLevelSequencePlayer and set it for your LevelSequencePlayer property (I did it in my blueprint actor) Trigger your sequence to play however you like (at begin play or whatever - I used a box trigger, from within the BP actor mentioned above) *In the sequencer, add your BP actor from above and add an event track that simply aims to skip to some other frame - do that by calling a custom event in the BP actor which then calls SetPlayBackPosition (in my case in an arbitrary marked frame A).

I was basically trying to interrupt normal playback of the cube movement and make it skip to another frame towards the end. The same thing used to work in 4.25 (admittedly though was not using SetPlaybackPosition for this).

This looks like a regression from an internal refactor. At first glance, we added some protection in the evaluation loop to prevent this because of undefined behaviors, especially because the tracks are evaluating in arbitrary order. Our solution for this is to allow all the tracks to evaluate on the particular frame that the event gets triggered on and then run the set playback position call.

We’ll do some further investigation and hopefully provide a fix soon.

I’ve filed this issue and it’ll be made public soon so you can follow the progress on it:

Thank you Max, this is very much appreciated!

No problem. This is fixed now and will come out with the next 4.26 hotfix.