4.15 Upgrade resulting in Failed Assertion Crash Error related to TextureStreamingBuild.cpp line 371

Strangely enough this only happens in a particular level in our project after upgrading from 4.13 Multi-res branch to 4.15 Vanilla branch.

**The full error is:**

Assertion Failed: BoundState.Texture == nullptr || BoundState.Texture == Texture2D [File:C:\Engine\Source\Runtime\Engine\Private\Streaming\TextureStreamingBuild.cpp] [Line: 371]

**Here is the crash log:**

[2017.02.20-17.51.04:389][264]LogWindows:Error: === Critical error: ===
[2017.02.20-17.51.04:389][264]LogWindows:Error: 
[2017.02.20-17.51.04:389][264]LogWindows:Error: Assertion failed: BoundState.Texture == nullptr || BoundState.Texture == Texture2D [File:C:\Users\unc0nnected\Perforce\YVR\4.15\Engine\Source\Runtime\Engine\Private\Streaming\TextureStreamingBuild.cpp] [Line: 371] 
[2017.02.20-17.51.04:389][264]LogWindows:Error: 
[2017.02.20-17.51.04:389][264]LogWindows:Error: 
[2017.02.20-17.51.04:389][264]LogWindows:Error: 
[2017.02.20-17.51.04:389][264]LogWindows:Error: KERNELBASE.dll!0x00000000EB3B7788
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Core.dll!FOutputDeviceWindowsError::Serialize() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:120]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Core.dll!FOutputDevice::Logf__VA() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\core\private\misc\outputdevice.cpp:70]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Core.dll!FDebug::AssertFailed() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\core\private\misc\assertionmacros.cpp:349]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Engine.dll!FStreamingTextureLevelContext::GetBuildDataIndexRef() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\streaming\texturestreamingbuild.cpp:373]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Engine.dll!FStreamingTextureLevelContext::ProcessMaterial() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\streaming\texturestreamingbuild.cpp:396]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Engine.dll!UMeshComponent::GetStreamingTextureInfoInner() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\components\meshcomponent.cpp:368]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Engine.dll!UStaticMeshComponent::GetStreamingTextureInfo() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\components\staticmeshcomponent.cpp:837]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Engine.dll!UPrimitiveComponent::GetStreamingTextureInfoWithNULLRemoval() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\components\primitivecomponent.cpp:292]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Engine.dll!FTextureInstanceState::AddComponent() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\streaming\textureinstancemanager.cpp:476]
[2017.02.20-17.51.04:389][264]LogWindows:Error: UE4Editor-Engine.dll!FLevelTextureManager::IncrementalBuild() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\streaming\textureinstancemanager.cpp:1459]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor-Engine.dll!FLevelTextureManager::IncrementalUpdate() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\streaming\textureinstancemanager.cpp:1548]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor-Engine.dll!FStreamingManagerTexture::IncrementalUpdate() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\streaming\streamingmanagertexture.cpp:360]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor-Engine.dll!FStreamingManagerTexture::UpdateResourceStreaming() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\streaming\streamingmanagertexture.cpp:1170]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor-Engine.dll!FStreamingManagerCollection::UpdateResourceStreaming() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\contentstreaming.cpp:709]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor-Engine.dll!FStreamingManagerCollection::Tick() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\engine\private\contentstreaming.cpp:680]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\editor\unrealed\private\editorengine.cpp:1833]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\editor\unrealed\private\unrealedengine.cpp:391]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor.exe!FEngineLoop::Tick() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\launch\private\launchengineloop.cpp:3025]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor.exe!GuardedMain() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\launch\private\launch.cpp:166]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor.exe!GuardedMainWrapper() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\launch\private\windows\launchwindows.cpp:134]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor.exe!WinMain() [c:\users\unc0nnected\perforce\yvr\4.15\engine\source\runtime\launch\private\windows\launchwindows.cpp:210]
[2017.02.20-17.51.04:390][264]LogWindows:Error: UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253]
[2017.02.20-17.51.04:390][264]LogWindows:Error: KERNEL32.DLL!0x00000000EBCB8364
[2017.02.20-17.51.04:390][264]LogWindows:Error: ntdll.dll!0x00000000EE4870D1
[2017.02.20-17.51.04:390][264]LogWindows:Error: ntdll.dll!0x00000000EE4870D1
[2017.02.20-17.51.04:390][264]LogWindows:Error: 
[2017.02.20-17.51.04:413][264]LogExit: Executing StaticShutdownAfterError
[2017.02.20-17.51.04:423][264]LogWindows: FPlatformMisc::RequestExit(1)
[2017.02.20-17.51.04:423][264]Log file closed, 02/20/17 12:51:04

We’re having the exact same issue.
One of our levels (from a total of 12) crashes after load, on this exact same part of code after upgrading to 4.15.

I still haven’t resolved why this was happening but we did find a way to salvage the level.

I opened 2 instances of the editor/project. In one I had a blank level open and ready to receive the files. Each one open on a separate monitor, important for later.

In the other I opened up the level. I have about 2 seconds before the editor will crash after the level opens, so in that time I selected all items in the world hiearchy with Control+A, copied everything with Ctrl+C and then went over to the second instance of the project that was open, clicked in the empty world hierarchy and pressed Ctrl+V to paste everything. It’s important to do this because the moment that UE4 crashes is dumps the crash log to your clipboard, overwriting everything you had copied from the level

Haven’t resolved why it crashed but at least it made recovering the level a bit easier

From a colleague, hopefully this helps others:

In our case it was caused by some textures (namely ClassicRoomPack) and related to streaming. I had to check all troublesome textures to NeverStream, open level, let the lighting build, save and then switch the stream flag on textures again and it worked.