Calling UHierarchicalInstancedStaticMeshComponent::AddInstance multiple times causes multiple BuildTrees to be created and run asynchronously at the same time.
Tested in 4.21(CL - 4613538)
How the steps reproduce above are technically not a recommended process, codewise, but it is still an issue.
A workaround for this issue is to set UHierarchicalInstancedStaticMeshComponent::bAutoRebuildTreeOnInstanceChanges to false before the loop where UHierarchicalInstancedStaticMeshComponent::AddInstance gets called multiple times, set it back to true after the loop, call UHierarchicalInstancedStaticMeshComponent::BuildTreeIfOutdated(true, true), and finally UHierarchicalInstancedStaticMeshComponent::Modify()
LoginId:6b5940ce425805aa9506178fb7822a35 EpicAccountId: Assertion failed: (void*)((&ElementData[InstanceIndex]) + 1) <= (void*)(InstanceOriginDataPtr + CurrentSize) [Link Removed] [Line: 1233] UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4\sync\engine\source\runtime\core\private\misc\assertionmacros.cpp:417] UE4Editor_Engine!FStaticMeshInstanceBuffer::UpdateFromCommandBuffer_RenderThread() [d:\build\++ue4\sync\engine\source\runtime\engine\private\instancedstaticmesh.cpp:247] UE4Editor_Engine!TGraphTask<TEnqueueUniqueRenderCommandType<`FStaticMeshInstanceBuffer::UpdateFromCommandBuffer_Concurrent'::`2'::InstanceBuffer_UpdateFromPreallocatedDataName,<lambda_8f141d6f12b5e9ba7bbe98accef238b8> > >::ExecuteTask() [d:\build\++ue4\sync\engine\source\runtime\core\public\async\taskgraphinterfaces.h:829] UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:679] UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4\sync\engine\source\runtime\core\private\async\taskgraph.cpp:575] UE4Editor_RenderCore!RenderingThreadMain() [d:\build\++ue4\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:333] UE4Editor_RenderCore!FRenderingThread::Run() [d:\build\++ue4\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:467] UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-68582 in the post.
3 |
Component | UE - World Creation - Worldbuilding Tools - Foliage |
---|---|
Affects Versions | 4.21.1 |
Target Fix | 4.23 |
Created | Jan 16, 2019 |
---|---|
Resolved | May 30, 2019 |
Updated | Jul 29, 2019 |