4.15 Random crash in packaged build - render thread

Hi!

For some time we have this strange crash that occurs randomly and in callstack there is only engine code.

Fatal error: [File:D:\Build\++UE4+Release-4.15+Compile\Sync\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp] [Line: 796]
Rendering thread exception:
Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x1c510000

GAME-Win64-DebugGame.exe!FSkeletalMeshObjectGPUSkin::GetSkinVertexFactory()
GAME-Win64-DebugGame.exe!FSkeletalMeshSceneProxy::GetDynamicElementsSection()
GAME-Win64-DebugGame.exe!FSkeletalMeshSceneProxy::GetMeshElementsConditionallySelectable()
GAME-Win64-DebugGame.exe!FSkeletalMeshSceneProxy::GetDynamicMeshElements()
GAME-Win64-DebugGame.exe!FProjectedShadowInfo::GatherDynamicMeshElementsArray()
GAME-Win64-DebugGame.exe!FProjectedShadowInfo::GatherDynamicMeshElements()
GAME-Win64-DebugGame.exe!FSceneRenderer::GatherShadowDynamicMeshElements()
GAME-Win64-DebugGame.exe!FSceneRenderer::InitDynamicShadows()
GAME-Win64-DebugGame.exe!FDeferredShadingSceneRenderer::InitViewsPossiblyAfterPrepass()
GAME-Win64-DebugGame.exe!FDeferredShadingSceneRenderer::InitViews()
GAME-Win64-DebugGame.exe!FDeferredShadingSceneRenderer::Render()
GAME-Win64-DebugGame.exe!FRelevancePacket::RenderThreadFinalize()
GAME-Win64-DebugGame.exe!TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`21'::EURCMacro_FDrawSceneCommand>::ExecuteTask()
GAME-Win64-DebugGame.exe!FNamedTaskThread::ProcessTasksNamedThread()
GAME-Win64-DebugGame.exe!FNamedTaskThread::ProcessTasksUntilQuit()
GAME-Win64-DebugGame.exe!RenderingThreadMain()
GAME-Win64-DebugGame.exe!FRenderingThread::Run()
GAME-Win64-DebugGame.exe!FRunnableThreadWin::Run()
GAME-Win64-DebugGame.exe!FRunnableThreadWin::GuardedRun()
KERNEL32.DLL!0x00000000A7FB8364
ntdll.dll!0x00000000A80E70D1
ntdll.dll!0x00000000A80E70D1

Hi sgorazd,

Do you have your [full logs][1] that you can send to us? If there is a crashreporter window that allows you to submit the crash, can you please submit it? I only see a couple crashes from 5 days ago for you in our crashreporter database.

[1]:

Hi ,
Great to hear from you. I am working on logs.
I was trying to debug engine code on a build. After some work I finally got it working with compiled engine sources from Github. But when it crashes I can not get to values of variables.

Do you have any idea why this is happening?

That’s because you’re building in “Debug Game” and that source code is in the engine. When you see “Game” in there that means the engine source is being optimized. To debug your game and engine, just do “Debug” without the “Game”. It’s “Debug” for a standalone game, and “Debug Editor” and “Debug Server” for each of those. Then you’ll see the engine’s values at runtime.

That may not be entirely true because I managed to get it working in DebugGame, don’t know why though.
In Debug I couldn’t get a game to work, because of lots of

LoadErrors:Warning: Warning CreateExport: Failed to load Outer for resource

Hey sgorazd,

Apologies for the delay in response. Is this still an issue on your end or have there been any new developments?

Hi,

I think I found what caused this issue. I not sure why exactly.
We have custom made destruction meshes and when we import them in UE4, they are given a material slot for each chunk (about 100 slots, but really got only 2 materials).
There is already request to change that but unfortunately, marked as Won’t Fix - UE-8566
One of our scripts uses SetVisible/SetHiddenInGame (tried both), to hide objects in way o camera view.
While I moving the camera like a crazy game will eventually crash.
When I commented out SetVisible/SetHiddenInGame part, crashes do not occur.
Finally. when I removed custom destructible meshes and replaced them with generated in UE4 (they only got 2 materials), crashes stopped even with SetVisible/SetHiddenInGame uncommented.