# Crash when ending Matinee movie

**URL:** <https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832>\
**Category:** World Creation\
**Tags:** crashes, unreal-engine, question\
**Created:** [April 11, 2016, 11:01pm UTC](https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832 "2016-04-11T23:01:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgamble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kgamble](https://forums.unrealengine.com/u/kgamble)\
**Post date:** [April 11, 2016, 11:01pm UTC](https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832/1 "2016-04-11T23:01:16Z")

</div>

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++

---

<div class="post-metadata">

**Author:** ![kgamble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kgamble](https://forums.unrealengine.com/u/kgamble)\
**Post date:** [April 11, 2016, 11:46pm UTC](https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832/2 "2016-04-11T23:46:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_280dd372](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_280dd372](https://forums.unrealengine.com/u/anonymous_user_280dd372)\
**Post date:** [April 14, 2016, 3:52pm UTC](https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832/3 "2016-04-14T15:52:44Z")

</div>

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?

-.

---

<div class="post-metadata">

**Author:** ![kgamble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kgamble](https://forums.unrealengine.com/u/kgamble)\
**Post date:** [April 14, 2016, 5:04pm UTC](https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832/4 "2016-04-14T17:04:17Z")

</div>

- 

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_280dd372](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_280dd372](https://forums.unrealengine.com/u/anonymous_user_280dd372)\
**Post date:** [April 15, 2016, 2:50pm UTC](https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832/5 "2016-04-15T14:50:09Z")

</div>

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.

-.

---

<div class="post-metadata">

**Author:** ![kgamble](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kgamble](https://forums.unrealengine.com/u/kgamble)\
**Post date:** [April 19, 2016, 4:05pm UTC](https://forums.unrealengine.com/t/crash-when-ending-matinee-movie/353832/6 "2016-04-19T16:05:13Z")

</div>

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.
