Description

UDN user reported frequent crashes in FStaticMesh::~FStaticMesh() on DrawListLinks[i]->Remove(false);

Crash went away after adding critical sections to FStaticMesh::LinkDrawList(), FStaticMesh::UnlinkDrawList(), FStaticMesh::RemoveFromDrawLists() and FStaticMesh::~FStaticMesh()

Callstack

Process 9622 stopped

  • thread #49: tid = 0x20d34, 0x0000000000015c0e, name = 'RenderThread 1', stop reason = EXC_BAD_ACCESS (code=1, address=0x15c0e)
    frame #0: 0x0000000000015c0e
    error: memory read failed for 0x15c00
    (lldb) thread backtrace
  • thread #49: tid = 0x20d34, 0x0000000000015c0e, name = 'RenderThread 1', stop reason = EXC_BAD_ACCESS (code=1, address=0x15c0e)
  • frame #0: 0x0000000000015c0e
    frame #1: 0x00000001022d5c42 TheObserver`FStaticMesh::~FStaticMesh(this=<unavailable>) + 98 at SceneCore.cpp:429 [opt]
    frame #2: 0x00000001022014f8 TheObserver`FPrimitiveSceneInfo::RemoveFromScene(bool) + 34 at IndirectArray.h:444 [opt]
    frame #3: 0x00000001022014d6 TheObserver`FPrimitiveSceneInfo::RemoveFromScene(bool) [inlined] TIndirectArray<FStaticMesh, FDefaultAllocator>::Empty(this=<unavailable>, Slack=0) at IndirectArray.h:347 [opt]
    frame #4: 0x00000001022014d6 TheObserver`FPrimitiveSceneInfo::RemoveFromScene(bool) [inlined] FPrimitiveSceneInfo::RemoveStaticMeshes(this=<unavailable>) at PrimitiveSceneInfo.cpp:295 [opt]
    frame #5: 0x00000001022014d6 TheObserver`FPrimitiveSceneInfo::RemoveFromScene(this=<unavailable>, bUpdateStaticDrawLists=<unavailable>) + 1814 at PrimitiveSceneInfo.cpp:326 [opt]
    frame #6: 0x0000000102294d4d TheObserver`FScene::RemovePrimitiveSceneInfo_RenderThread(this=<unavailable>, PrimitiveSceneInfo=0x000000019dfe2200) + 1405 at RendererScene.cpp:958 [opt]
    frame #7: 0x0000000102296760 TheObserver`FScene::RemovePrimitive(this=<unavailable>, CurrentThread=StatsThread, MyCompletionGraphEvent=<unavailable>)::EURCMacro_FRemovePrimitiveCommand::DoTask(ENamedThreads::Type, TRefCountPtr<FGraphEvent> const&) + 464 at RendererScene.cpp:980 [opt]
    frame #8: 0x000000010233e53a TheObserver`TGraphTask<FScene::RemovePrimitive(UPrimitiveComponent*)::EURCMacro_FRemovePrimitiveCommand>::ExecuteTask(this=<unavailable>, NewTasks=<unavailable>, CurrentThread=<unavailable>) + 522 at TaskGraphInterfaces.h:883 [opt]
    frame #9: 0x00000001009b66ce TheObserver`FNamedTaskThread::ProcessTasksNamedThread(int, bool) [inlined] FBaseGraphTask::Execute(this=<unavailable>, NewTasks=size=0, CurrentThread=<unavailable>) + 12798 at TaskGraphInterfaces.h:488 [opt]
    frame #10: 0x00000001009b66c1 TheObserver`FNamedTaskThread::ProcessTasksNamedThread(this=<unavailable>, QueueIndex=<unavailable>, bAllowStall=<unavailable>) + 12785 at TaskGraph.cpp:952 [opt]
    frame #11: 0x00000001009b2155 TheObserver`FNamedTaskThread::ProcessTasksUntilQuit(this=<unavailable>, QueueIndex=<unavailable>) + 437 at TaskGraph.cpp:699 [opt]
    frame #12: 0x00000001009aefd1 TheObserver`FTaskGraphImplementation::ProcessThreadUntilRequestReturn(this=0x000000010d7a2800, CurrentThread=ActualRenderingThread) + 641 at TaskGraph.cpp:1747 [opt]
    frame #13: 0x0000000101ca7c14 TheObserver`RenderingThreadMain(TaskGraphBoundSyncEvent=<unavailable>) + 436 at RenderingThread.cpp:324 [opt]
    frame #14: 0x0000000101cb6217 TheObserver`FRenderingThread::Run(this=0x0000000128a688e0) + 23 at RenderingThread.cpp:476 [opt]
    frame #15: 0x0000000100a01c63 TheObserver`FRunnableThreadPThread::Run(this=0x000000013ff52fa0) + 371 at PThreadRunnableThread.cpp:25 [opt]
    frame #16: 0x00000001009cead1 TheObserver`FRunnableThreadPThread::_ThreadProc(pThis=0x000000013ff52fa0) + 353 at PThreadRunnableThread.h:177 [opt]
    frame #17: 0x00007fffd42f5aab libsystem_pthread.dylib`_pthread_body + 180
    frame #18: 0x00007fffd42f59f7 libsystem_pthread.dylib`_pthread_start + 286
    frame #19: 0x00007fffd42f51fd libsystem_pthread.dylib`thread_start + 13

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-43125 in the post.

0
Login to Vote

Fixed
ComponentUE - Graphics Features
Affects Versions4.15.1
Target Fix4.16
Fix Commit3390933
Main Commit3461201
CreatedMar 21, 2017
ResolvedApr 12, 2017
UpdatedMay 26, 2017
View Jira Issue