Crash when unloading streaming map

I have a somewhat basic streaming map setup for a game I’m working on, and I’m encountering a consistent, repeatable engine crash in 4.12.3 when unloading one of the streaming maps via Blueprint.

Specifically, the log file returns this error:

[2016.08.03-02.48.34:780][953]LogCrashTracker:



[2016.08.03-02.48.34:902][953]LogWindows: Windows GetLastError: The operation completed successfully. (0) [2016.08.03-02.48.34:903][953]LogThreadingWindows:Error: Runnable thread RenderThread 3 crashed. [2016.08.03-02.48.34:903][953]LogCrashTracker:



[2016.08.03-02.48.34:903][953]LogWindows:Error:
=== Critical error: === Assertion failed: (GIsCriticalError || !NumMarks) [File:U:\UnrealEngine-4.12\Engine\Source\Runtime\Core\Public\Misc\MemStack.h] [Line: 72] 




Crash in runnable thread RenderThread 3

[2016.08.03-02.48.34:903][953]LogWindows: Windows GetLastError: The operation completed successfully. (0) [2016.08.03-02.48.34:903][953]LogWindows:Error: HandleError re-entered. [2016.08.03-02.48.34:903][953]LogWindows: FPlatformMisc::RequestExit(1)

Now, some info about the map in question:

The streaming map hierarchy looks like this:

101184-1.jpg

What I’m doing is loading the Persistent map (which is empty except for a few manager actors), then I load “StartMenu”, which also loads the Main Menu widget.

When you hit “New Game” on that widget, it’s supposed to unload “StartMenu”, load the “Loading” map, and then after a small delay it would load one of the other gameplay maps.

The error occurs when the Blueprint script begins to unload the “StartMenu” map. If I skip unloading this streaming map, things seem to work just fine.

This leads me to believe it’s something specific to this map. The error in the log files is not very descriptive, so I don’t really have any ideas about where to begin.

I’ve found [this post][2] where OP had more or less the same error, but the initial problem is much different leading me to believe this Assertion failed: (GIsCriticalError || !NumMarks) error is more of a general crash when the editor just has a problem loading something from memory.

So, ok, there’s something in my map that is corrupted or bad, causing this issue.

[Next thread I come to][3] is a post where a guy is having trouble unloading a streaming map with a landscape, in Unreal 4.4. Sure enough, my “StartMenu” map has a landscape in it with a somewhat complicated material. However that post says the issue was to be fixed in UE 4.5.

Either way, I tried to make some edits where the blueprint would delete the landscape before unloading the map, but that didn’t work for me.

Any ideas?

Hi ,

  • Can you post your crash logs and callstack so I can take a look? The crash logs can be found at \Unreal Projects\PROJECTNAME\saved\logs.
  • Does this occur in a clean, blank project with no additional content or is it limited to one project?
  • What steps can I take to reproduce this error on my end?

Hey ,

You’ll find my current logs in the attached file.

For what it’s worth, I was not able to reproduce this issue in a clean, blank project. I migrated the landscape over just to be sure, stripped down everything else, and rewrote the BPs more or less exactly like the failing project. Unloading that streaming map (with the landscape) works just fine there. The only difference is the assets… the blank project obviously has nothing but the landscape, while my other project obviously has thousands.

Looking at my log files, I notice a ton of compiler warnings issues for things like my child blueprint classes not inheriting from their parents… which is a total lie, because when I open the assets everything appears fine, they’re compiled correctly, inheriting from the correct parents, and I haven’t edited those assets in weeks. However, I did just yesterday move some of them around via the content browser, and then used the “Fix Up Redirectors” command which may have just broken all of those references instead of fixing them…

I’m accustomed to stuff like this by now happening to child BPs, and figure the classes just need to be recreated or restored from P4, but that’s super annoying and I honestly did not think it would be relevant to this particular crash error. Maybe the warnings are indeed relevant? Could the engine be attempting to load these resources, failing, and crashing?

link text

Can you post your crash callstack here as well? They can be obtained by causing the crash, which should produce a crash report window. Copy the callstack data, then send the crash report to us so I can pull up additional info on my end. Looking through your logs, I’m noticing a significant amount of warnings regarding missing or content that exists in duplicate spaces. Try running fix up redirectors on your entire contents folder and see if this helps resolve the error.

I made some progress on this.

My logs are totally ruined with those warnings, but they are irrelevant to this issue.

Rarely, the crash would occur in the same place (while unloading a specific streaming map) and leave this in the log instead of the Memstack.h error:

[2016.08.07-16.09.30:187][991]LogWindows:Error: === Critical error: ===
Fatal error: [File:U:\UnrealEngine-4.12\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp] [Line: 717] 
Rendering thread exception:
Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000018

UE4Editor-D3D11RHI.dll!FD3D11DynamicRHI::RHISetShaderSampler() [u:\unrealengine-4.12\engine\source\runtime\windows\d3d11rhi\private\d3d11commands.cpp:560]
UE4Editor-Renderer.dll!FSkyLightReflectionParameters::SetParameters<FRHIPixelShader * __ptr64,FRHICommandList>() [u:\unrealengine-4.12\engine\source\runtime\renderer\private\basepassrendering.h:365]
UE4Editor-Renderer.dll!FReflectionApplyPS<1,0,1,0>::SetParameters() [u:\unrealengine-4.12\engine\source\runtime\renderer\private\reflectionenvironment.cpp:484]
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::RenderStandardDeferredImageBasedReflections() [u:\unrealengine-4.12\engine\source\runtime\renderer\private\reflectionenvironment.cpp:1231]
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::RenderDeferredReflections() [u:\unrealengine-4.12\engine\source\runtime\renderer\private\reflectionenvironment.cpp:1292]
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::Render() [u:\unrealengine-4.12\engine\source\runtime\renderer\private\deferredshadingrenderer.cpp:1321]
UE4Editor-Renderer.dll!RenderViewFamily_RenderThread() [u:\unrealengine-4.12\engine\source\runtime\renderer\private\scenerendering.cpp:1931]
UE4Editor-Renderer.dll!TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`20'::EURCMacro_FDrawSceneCommand>::ExecuteTask() [u:\unrealengine-4.12\engine\source\runtime\core\public\async\taskgraphinterfaces.h:999]
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [u:\unrealengine-4.12\engine\source\runtime\core\private\async\taskgraph.cpp:932]
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [u:\unrealengine-4.12\engine\source\runtime\core\private\async\taskgraph.cpp:679]
UE4Editor-RenderCore.dll!RenderingThreadMain() [u:\unrealengine-4.12\engine\source\runtime\rendercore\private\renderingthread.cpp:319]
UE4Editor-RenderCore.dll!FRenderingThread::Run() [u:\unrealengine-4.12\engine\source\runtime\rendercore\private\renderingthread.cpp:440]
UE4Editor-Core.dll!FRunnableThreadWin::Run() [u:\unrealengine-4.12\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]
UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() [u:\unrealengine-4.12\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:31]
KERNEL32.DLL
ntdll.dll
ntdll.dll

It’s the rendering errors that led me to realize that my integration of third party software was at fault. In my case, this project uses Simul’s trueSKY plugin, and attempting to unload a streaming map that uses trueSKY actors will cause the crash reliably, every time.

The fix for this was to simply remove the trueSKY actors from the streaming map. At that point, it can be successfully unloaded.

For my uses, I’ll end up needing to create some type of trueSKY manager actor that can change the sequences on demand, since I’ve got seven different streaming maps with seven different trueSKY sequences.

Thanks for the help!

Thanks a lot! It was different for me but you gave me ideas. For me it was some dynamic material instances got cross-referenced. MID_B referred to MID_A, then MID_A got unloaded.