[Daydream] [GoogleVR] 4.13.1 Assertion failed: UniformBufferRHI.GetReference() results in crash

Daydream export on 4.13.1:

Hard crash on device with this in the logs:

08-23 08:16:39.165: D/UE4(2403): Assertion failed: UniformBufferRHI.GetReference() [File:D:/Build/++UE4+Release-4.13+Compile/Sync/Engine/Source\Runtime/RenderCore/Public/UniformBuffer.h] [Line: 78] 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FDebug::LogAssertFailedMessage(char const*, char const*, int, wchar_t const*, ...) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!void SetUniformBufferParameter<FRHIVertexShader*, FPrimitiveUniformShaderParameters, FRHICommandList>(FRHICommandList&, FRHIVertexShader*, TShaderUniformBufferParameter<FPrimitiveUniformShaderParameters> const&, TUniformBuffer<FPrimitiveUniformShaderParameters> const&) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!void FMeshMaterialShader::SetMesh<FRHIVertexShader*>(FRHICommandList&, FRHIVertexShader*, FVertexFactory const*, FSceneView const&, FPrimitiveSceneProxy const*, FMeshBatchElement const&, FMeshDrawingRenderState const&, unsigned int) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!TMobileBasePassDrawingPolicy<FUniformLightMapPolicy, 0>::SetMeshRenderState(FRHICommandList&, FViewInfo const&, FPrimitiveSceneProxy const*, FMeshBatch const&, int, bool, FMeshDrawingRenderState const&, TMobileBasePassDrawingPolicy<FUniformLightMapPolicy, 0>::ElementDataType const&, FMeshDrawingPolicy::ContextDataType) const 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!void FDrawMobileTranslucentMeshAction::Process<0>(FRHICommandList&, FProcessBasePassMeshParameters const&, FUniformLightMapPolicy const&, FLightCacheInterface const* const&) const 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!void ProcessMobileBasePassMesh<FDrawMobileTranslucentMeshAction, 0>(FRHICommandList&, FProcessBasePassMeshParameters const&, FDrawMobileTranslucentMeshAction const&) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FMobileTranslucencyDrawingPolicyFactory::DrawDynamicMesh(FRHICommandList&, FViewInfo const&, FMobileTranslucencyDrawingPolicyFactory::ContextType, FMeshBatch const&, bool, bool, FPrimitiveSceneProxy const*, FHitProxyId) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FTranslucentPrimSet::DrawPrimitivesForMobile(FRHICommandListImmediate&, FViewInfo const&, bool) const 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FMobileSceneRenderer::RenderTranslucency(FRHICommandListImmediate&) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FMobileSceneRenderer::Render(FRHICommandListImmediate&) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so![Unknown]() 
08-23 08:16:39.165: D/UE4(2403): libUE4.so![Unknown]() 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FNamedTaskThread::ProcessTasksNamedThread(int, bool) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FNamedTaskThread::ProcessTasksUntilQuit(int) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!RenderingThreadMain(FEvent*) 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FRenderingThread::Run() 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FRunnableThreadPThread::Run() 
08-23 08:16:39.165: D/UE4(2403): libUE4.so!FRunnableThreadPThread::_ThreadProc(void*) 
08-23 08:16:39.165: D/UE4(2403): libc.so![Unknown]() 
08-23 08:16:39.165: D/UE4(2403): libc.so![Unknown]() 
08-23 08:16:39.165: D/UE4(2403): [2016.08.23-06.16.39:175][838]Assertion failed: Assertion failed: UniformBufferRHI.GetReference() [File:D:/Build/++UE4+Release-4.13+Compile/Sync/Engine/Source\Runtime/RenderCore/Public/UniformBuffer.h] [Line: 78] 

Using 3D widgets but that seems to be fixed in 4.13 now: [Daydream] - 4.12 crashing project: Assertion failed when manipulating 3D Widgets - XR Development - Unreal Engine Forums as I no longer get that specific crash in the same location.

Daydream is certainly appearing pretty ‘experimental’ right now as this crash occurs about 10secs after the linked crash which was fixed in 4.13 :frowning:

EDIT: I manged to narrow it down to one of my components that passes instance static meshes through the camera - works fine on other platforms just not this one for some reason …

I am using 3D widgets and have a similar callstack ending in UniformBufferRHI.GetReference. Can you clarify what your edit means? What did you need to do to address the issue? Thanks.

Hi terryl,

I never actually managed to narrow down the exact cause for this error. The 3D widget problem was definitely fixed out of the box in 4.13 as per: [Daydream] - 4.12 crashing project: Assertion failed when manipulating 3D Widgets - XR Development - Unreal Engine Forums

However this crash I could narrow down to one of my blueprint actors which spawned a few moved meshes with a depth fade material that moved around (and sometimes through) the camera. When I removed it the crash no longer occurred.

More recently once I got a Pixel phone I discovered this crash did not occur on it with that component re-enabled. So perhaps it is related to the chipset of the phone:

S7 Exynos chipset = crash

Pixel XL snapdragon chipset = no crash

Which device are you testing on?

At the moment we are using a custom build of unreal 4.13.2. We have four phones that were tested

Pixel / Pixel XL - OK

Moto Droid Z - OK

Huawei Mate 9 - Crash