Description

The message in ensure is below

LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: (FMath::Abs(1.f - M.GetScaledAxis(EAxis::X).SizeSquared()) <= (1.e-4f)) && (FMath::Abs(1.f - M.GetScaledAxis(EAxis::Y).SizeSquared()) <= (1.e-4f)) && (FMath::Abs(1.f - M.GetScaledAxis(EAxis::Z).SizeSquared()) <= (1.e-4f)) [File:E:\dev\UnrealEngine-4.25\Engine\Source\Runtime\Core\Public\Math/Quat.h] [Line: 600]

This issue is caused by scaled transform.
To remove scale from the matrix fixes it.

//in FNiagaraDataInterfaceParametersCS_SkeletalMesh::Set

			SetShaderValue(RHICmdList, ComputeShaderRHI, NumFilteredSockets, StaticBuffers->GetNumFilteredSockets());
			SetShaderValue(RHICmdList, ComputeShaderRHI, FilteredSocketBoneOffset, StaticBuffers->GetFilteredSocketBoneOffset());

			SetShaderValue(RHICmdList, ComputeShaderRHI, InstanceTransform, InstanceData->Transform);
			SetShaderValue(RHICmdList, ComputeShaderRHI, InstancePrevTransform, InstanceData->PrevTransform);
#if 1
			SetShaderValue(RHICmdList, ComputeShaderRHI, InstanceRotation, InstanceData->Transform.GetMatrixWithoutScale().ToQuat());
			SetShaderValue(RHICmdList, ComputeShaderRHI, InstancePrevRotation, InstanceData->PrevTransform.GetMatrixWithoutScale().ToQuat());
#else
			SetShaderValue(RHICmdList, ComputeShaderRHI, InstanceRotation, InstanceData->Transform.ToQuat());
			SetShaderValue(RHICmdList, ComputeShaderRHI, InstancePrevRotation, InstanceData->PrevTransform.ToQuat());
#endif
			SetShaderValue(RHICmdList, ComputeShaderRHI, InstanceInvDeltaTime, 1.0f / InstanceData->DeltaSeconds);

			SetShaderValue(RHICmdList, ComputeShaderRHI, EnabledFeatures, EnabledFeaturesBits);
		}
Steps to Reproduce
  1. open attached project on ue4.25 MyProject.zip[Image Removed]
  2. press play button to start PIE
  3. see logs or trap a break with attached debugger
Callstack

> [Inline Frame] UE4Editor-Core.dll!FQuat::

{ctor}

::__l6::<lambda_c6ec71c1cea6b9d5da85fbd207816d2b>::operator()() Line 600 C++ Symbols loaded.
UE4Editor-Core.dll!FQuat::FQuat(const FMatrix & M) Line 600 C++ Symbols loaded.
UE4Editor-Core.dll!FMatrix::ToQuat() Line 554 C++ Symbols loaded.
UE4Editor-Niagara.dll!FNiagaraDataInterfaceParametersCS_SkeletalMesh::Set(FRHICommandList & RHICmdList, const FNiagaraDataInterfaceSetArgs & Context) Line 1157 C++ Symbols loaded.
UE4Editor-Niagara.dll!UNiagaraDataInterfaceSkeletalMesh::SetParameters(const FNiagaraDataInterfaceParametersCS * Base, FRHICommandList & RHICmdList, const FNiagaraDataInterfaceSetArgs & Context) Line 1263 C++ Symbols loaded.
UE4Editor-Niagara.dll!NiagaraEmitterInstanceBatcher::SetDataInterfaceParameters(const TArray<FNiagaraDataInterfaceProxy *,TSizedDefaultAllocator<32>> & DataInterfaceProxies, const TShaderRefBase<FNiagaraShader,FNiagaraShaderMapPointerTable> & Shader, FRHICommandList & RHICmdList, const FNiagaraComputeInstanceData * Instance, const FNiagaraGPUSystemTick & Tick, unsigned int SimulationStageIndex) Line 1343 C++ Symbols loaded.
UE4Editor-Niagara.dll!NiagaraEmitterInstanceBatcher::Run(const FNiagaraGPUSystemTick & Tick, const FNiagaraComputeInstanceData * Instance, unsigned int UpdateStartInstance, const unsigned int TotalNumInstances, const TShaderRefBase<FNiagaraShader,FNiagaraShaderMapPointerTable> & Shader, FRHICommandList & RHICmdList, FRHIUniformBuffer * ViewUniformBuffer, const FNiagaraGpuSpawnInfo & SpawnInfo, bool bCopyBeforeStart, unsigned int DefaultSimulationStageIndex, unsigned int SimulationStageIndex, FNiagaraDataInterfaceProxy * IterationInterface, bool HasRunParticleStage) Line 1489 C++ Symbols loaded.
UE4Editor-Niagara.dll!NiagaraEmitterInstanceBatcher::DispatchMultipleStages(const FNiagaraGPUSystemTick & Tick, FNiagaraComputeInstanceData * Instance, FRHICommandList & RHICmdList, FRHIUniformBuffer * ViewUniformBuffer, const TShaderRefBase<FNiagaraShader,FNiagaraShaderMapPointerTable> & ComputeShader) Line 512 C++ Symbols loaded.
UE4Editor-Niagara.dll!NiagaraEmitterInstanceBatcher::DispatchAllOnCompute(TArray<FNiagaraGPUSystemTick *,TMemStackAllocator<0>> & OverlappableTick, FRHICommandList & RHICmdList, FRHIUniformBuffer * ViewUniformBuffer) Line 732 C++ Symbols loaded.
UE4Editor-Niagara.dll!NiagaraEmitterInstanceBatcher::ExecuteAll(FRHICommandList & RHICmdList, FRHIUniformBuffer * ViewUniformBuffer, ETickStage TickStage) Line 1005 C++ Symbols loaded.
UE4Editor-Niagara.dll!NiagaraEmitterInstanceBatcher::PreInitViews(FRHICommandListImmediate & RHICmdList, bool bAllowGPUParticleUpdate) Line 1131 C++ Symbols loaded.
UE4Editor-Engine.dll!FFXSystemSet::PreInitViews(FRHICommandListImmediate & RHICmdList, bool bAllowGPUParticleUpdate) Line 98 C++ Symbols loaded.
UE4Editor-Renderer.dll!FSceneRenderer::PreVisibilityFrameSetup(FRHICommandListImmediate & RHICmdList) Line 3053 C++ Symbols loaded.
[Inline Frame] UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::PreVisibilityFrameSetup(FRHICommandListImmediate &) Line 4272 C++ Symbols loaded.
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::InitViews(FRHICommandListImmediate & RHICmdList, FExclusiveDepthStencil::Type BasePassDepthStencilAccess, FILCUpdatePrimTaskData & ILCTaskData, TArray<TRefCountPtr<FGraphEvent>,TInlineAllocator<4,TSizedDefaultAllocator<32>>> & UpdateViewCustomDataEvents) Line 4288 C++ Symbols loaded.
UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRHICommandListImmediate & RHICmdList) Line 1370 C++ Symbols loaded.
UE4Editor-Renderer.dll!RenderViewFamily_RenderThread(FRHICommandListImmediate & RHICmdList, FSceneRenderer * SceneRenderer) Line 3482 C++ Symbols loaded.
[Inline Frame] UE4Editor-Renderer.dll!FRendererModule::BeginRenderingViewFamily::__l35::<lambda_759d0c4589f205101b108f5da3fb1556>::operator()(FRHICommandListImmediate &) Line 3721 C++ Symbols loaded.
UE4Editor-Renderer.dll!TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`35'::FDrawSceneCommandName,<lambda_759d0c4589f205101b108f5da3fb1556>>::DoTask(ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 195 C++ Symbols loaded.
UE4Editor-Renderer.dll!TGraphTask<TEnqueueUniqueRenderCommandType<`FRendererModule::BeginRenderingViewFamily'::`35'::FDrawSceneCommandName,<lambda_759d0c4589f205101b108f5da3fb1556>>>::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.

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-95350 in the post.

0
Login to Vote

Fixed
ComponentRendering - Niagara
Affects Versions4.25
Target Fix4.26
Fix Commit13210766
Main Commit13210766
CreatedJul 14, 2020
ResolvedJul 14, 2020
UpdatedJul 16, 2020