Crash when ending Matinee movie

Whenever I try to capture an image sequence in matinee for one of my projects it crashes at D3D11Viewport.cpp:157, failing a check to see if the FD3D11Viewport’s destructor is in the rendering thread. Video sequences work fine, it’s just PNG, JPG, and BMP that crash.

Tried recording in a different 4.11 project and it worked fine, so something weird seems to have happened to this project in particular. I deleted the Binaries, Saved, and Intermediate folders from the project directory but it still crashes.

Stack trace for the crash is below.

UE4Editor-D3D11RHI.dll!FD3D11Viewport::~FD3D11Viewport() Line 157 C++
[External Code]
UE4Editor-RHI.dll!FRHIResource::Release() Line 51 C++
[External Code]
UE4Editor-SlateRHIRenderer.dll!FSlateRHIRenderer::OnWindowDestroyed(const TSharedRef<SWindow,0> & InWindow) Line 387 C++
UE4Editor-Slate.dll!FSlateApplication::PrivateDestroyWindow(const TSharedRef<SWindow,0> & DestroyedWindow) Line 5659 C++
UE4Editor-Slate.dll!FSlateApplication::DestroyWindowsImmediately() Line 2609 C++
UE4Editor-Slate.dll!FSlateApplication::RequestDestroyWindow(TSharedRef<SWindow,0> InWindowToDestroy) Line 2085 C++
UE4Editor-Slate.dll!FSlateApplication::DestroyWindowImmediately(TSharedRef<SWindow,0> WindowToDestroy) Line 2093 C++
UE4Editor-UnrealEd.dll!UEditorEngine::TeardownPlaySession(FWorldContext & PieWorldContext) Line 536 C++
UE4Editor-UnrealEd.dll!UEditorEngine::EndPlayMap() Line 255 C++
UE4Editor-UnrealEd.dll!UEditorEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 977 C++
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick(float DeltaSeconds, bool bIdleMode) Line 370 C++
UE4Editor.exe!FEngineLoop::Tick() Line 2643 C++
UE4Editor.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 142 C++
UE4Editor.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 189 C++

After posting this I also tried completely deleting the folder and pulling it back down from our repo, still crashed.

Hi kgamble,

I can’t seem to find any other instances of this crash in our system. Are you using the same engine build for this project and the other 4.11 projects you’ve tried? Any idea if you’ve modified any engine code that could cause something like this?

-.

We don’t modify the engine at all in our studio, everything is done with 4.11.1 from the launcher. In fact, the project that was crashing is just a branch of the other 4.11 project I tested on.

However, in writing this up it occurred to me that the major difference was the crashing project used sublevels. I did a bit of testing and it seems that this crash occurs if you have a matinee in a sublevel. Sublevels themselves aren’t the problem, only if your matinee is in them. I’ve attached a sample project showing what I mean.

This is a shame because we’re planning on recording multiple scenes using the same persistent map so I wanted to just be able to set up a sublevel for each one and just stream in each one individually when we want to record its scene.

Hi kgamble,

It’s crashing because the sub-level isn’t being loaded. If you set it to always loaded or use the persistent level blueprint to load it in, the crash stops occurring. Either way, that’s still just a workaround.

I was able to repro and entered UE-29532 in our system.

-.

Oops, I guess I forgot to load it in the repro project. In the project I first found this in I do stream the level in and it still crashes, so it seems the only way around it is to set it to always loaded instead. Thanks.