Description

In raytracing enabled, When loading a sublevel containing landscape with LoadStreamLevel function following error is shown.

Assertion failed: Pair != nullptr [Link Removed] [Line: 584]

Licensee reports a workaround of this issue.

void FLandscapeComponentSceneProxy::GetDynamicRayTracingInstances(FRayTracingMaterialGatheringContext& Context, TArray<FRayTracingInstance>& OutRayTracingInstances)
{
...
	FMeshBatch BaseMeshBatch;
	BaseMeshBatch.VertexFactory = VertexFactory;
	BaseMeshBatch.MaterialRenderProxy = SelectedMaterial->GetRenderProxy();
	BaseMeshBatch.LCI = ComponentLightInfo.Get();
	BaseMeshBatch.CastShadow = true;
	BaseMeshBatch.CastRayTracedShadow = true;
	BaseMeshBatch.bUseForMaterial = true;
	BaseMeshBatch.SegmentIndex = 0;

	BaseMeshBatch.Elements.Empty();

#if 0
	FLandscapeRenderSystem& RenderSystem = *LandscapeRenderSystems.FindChecked(LandscapeKey);
#else
	FLandscapeRenderSystem** RegisteredRenderSystem = LandscapeRenderSystems.Find(LandscapeKey);
	if (!RegisteredRenderSystem)
	{
		return;
	}
	FLandscapeRenderSystem& RenderSystem = **RegisteredRenderSystem;
#endif
	for (int32 SubY = 0; SubY < NumSubsections; SubY++)
	{


Steps to Reproduce
  1. open attached project with 4.25 [Link Removed]
  2. play in editor

 

Callstack

[Inline Frame] UE4Editor-Landscape.dll!TMapBase<FLandscapeNeighborInfo::FLandscapeKey,FLandscapeRenderSystem *,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FLandscapeNeighborInfo::FLandscapeKey,FLandscapeRenderSystem *,0> >::FindChecked(const FLandscapeNeighborInfo::FLandscapeKey &) Line 584 C++ Symbols loaded.
> UE4Editor-Landscape.dll!FLandscapeComponentSceneProxy::GetDynamicRayTracingInstances(FRayTracingMaterialGatheringContext & Context, TArray<FRayTracingInstance,TSizedDefaultAllocator<32> > & OutRayTracingInstances) Line 3406 C++ Symbols loaded.
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::GatherRayTracingWorldInstances(FRHICommandListImmediate & RHICmdList) Line 945 C++ Symbols loaded.
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRHICommandListImmediate & RHICmdList) Line 1398 C++ Symbols loaded.
UE4Editor-Renderer.dll!RenderViewFamily_RenderThread(FRHICommandListImmediate & RHICmdList, FSceneRenderer * SceneRenderer) Line 3581 C++ Symbols loaded.
[Inline Frame] UE4Editor-Renderer.dll!FRendererModule::BeginRenderingViewFamily::__l35::<lambda_ca994b52dcfd379b80fcb1607b30126e>::operator()(FRHICommandListImmediate &) Line 3820 C++ Symbols loaded.
UE4Editor-Renderer.dll!TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`35'::FDrawSceneCommandName,<lambda_ca994b52dcfd379b80fcb1607b30126e> >::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 195 C++ Symbols loaded.
UE4Editor-Renderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`35'::FDrawSceneCommandName,<lambda_ca994b52dcfd379b80fcb1607b30126e> > >::ExecuteTask(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32> > & NewTasks, ENamedThreads::Type CurrentThread) Line 849 C++ Symbols loaded.
[Inline Frame] UE4Editor-Core.dll!FBaseGraphTask::Execute(TArray<FBaseGraphTask *,TSizedDefaultAllocator<32> > & CurrentThread, ENamedThreads::Type) Line 516 C++ Symbols loaded.
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 692 C++ Symbols loaded.
UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 587 C++ Symbols loaded.
UE4Editor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 341 C++ Symbols loaded.
UE4Editor-RenderCore.dll!FRenderingThread::Run() Line 492 C++ Symbols loaded.
UE4Editor-Core.dll!FRunnableThreadWin::Run() Line 86 C++ Symbols loaded.
UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() Line 27 C++ Symbols loaded.
kernel32.dll!00007ff9a2c37bd4() Unknown No symbols loaded.
ntdll.dll!00007ff9a2ecce51() Unknown No symbols loaded.

Have Comments or More Details?

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

1
Login to Vote

Fixed
ComponentUE - LD & Modeling - Terrain - Landscape
Affects Versions4.25
Target Fix4.25.2
Fix Commit13464319
Main Commit14151001
Release Commit13464319
CreatedMay 13, 2020
ResolvedJul 13, 2020
UpdatedAug 26, 2020
View Jira Issue