Malformed ULevelSequence by MRQ

Hello,

In our application we use the same Level Sequence asset by two different systems, Movie Render Queue and Screensaver. The MRQ is the functionality provided by the engine and user can run it during runtime of the application. The screensaver functionality was added by our team. When MRQ finishes rendering, the screensaver does not work correctly and it is instead in a broken “frozen” state. It seems like ULevelSequence is somehow malformed by MRQ. Changing the keep state of the individual shots has no effect. Currently we use workaround where ALevelSequenceActor is destroyed and then created again. Is there a better solution? Why is MRQ doing this to ULevelSequence?

Kind regards,

Petr Opletal

Hello Chad,

thank you, we will try your suggestions.

Regards

Petr

Hello Chad,

I’ve tested the suggested solutions, making the sequence volatile didn’t help. To isolate and replicate the problem I created a new project both in 5.3.2 and 5.6 engine versions. I managed to replicate the bug and will describe it here in detail. What’s important to know, is that it’s not tied to our custom Screensaver functionality, but rather to playing the Level Sequence.

In the empty project I added a camera and a rig crane. Then I created a simple Level Sequence where I added keyframes for camera location, rotation etc. After that, I made a Movie Render Queue with 1 job to render, the Level Sequence. Finally, I made a new C++ User Widget class for UI. It has two buttons:

1) RecordBtn, which uses MRQ to render a video

2) PlayBtn, which plays the Level Sequence

Here comes the critical part that causes the problem. In our project we use the same Level Sequence in 3 different situations:

1) User renders video, MRQ is used (which uses Level Sequence)

3) User plays video, Level Sequence is played

2) Screensaver, Level Sequence is played

Because of using it in different places, we load the LevelSequence once:

`ULevelSequence* sequenceToPlay = Cast(FSoftObjectPath(“/Game/Content/Movie.Movie”).TryLoad());
ALevelSequenceActor* levelSequenceActor;
ULevelSequencePlayer* sequencePlayer = ULevelSequencePlayer::CreateLevelSequencePlayer(
world,
sequenceToPlay,
playbackSettings,
levelSequenceActor
);
CinematicLevelSequenceActor = levelSequenceActor;

TObjectPtr CinematicLevelSequenceActor; is a property of a class`We use this pointer in the mentioned situations. As you wrote previously and I also observed it in Editor, MRQ does change the Level Sequence in some ways during a render and these changes are reverted after the render finishes. These changes however corrupt the reference to the loaded Level Sequence (Actor). The pointer is not empty or null, but playing the sequence no longer works. In our project we made a workaround: we recreate the CinematicLevelSequenceActor Actor after using MRQ, but it doesn’t seem to be the ideal solution.

If you want to try it for yourself, I am adding repro project (UE 5.6). You can simulate the bug by 3 actions:

1) Press PlayBtn to play the Level Sequence (reference is created)

2) Press RecordBtn, MRQ (reference is corrupted)

3) Press PlayBtn again, the playing of the sequence is in a frozen state

Best regards,

Petr