# CVarEnableVRS.GetValueOnRenderThread() causes Ensure failure 

**URL:** <https://forums.unrealengine.com/t/cvarenablevrs-getvalueonrenderthread-causes-ensure-failure/2832703>\
**Category:** Pipeline & Plugins\
**Tags:** Epic-Pro-Support, unreal-engine, question\
**Created:** [August 20, 2026, 1:47am UTC](https://forums.unrealengine.com/t/cvarenablevrs-getvalueonrenderthread-causes-ensure-failure/2832703 "2026-08-20T01:47:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [August 20, 2026, 1:47am UTC](https://forums.unrealengine.com/t/cvarenablevrs-getvalueonrenderthread-causes-ensure-failure/2832703/1 "2026-08-20T01:47:59Z")

</div>

We are running into an ensure that is triggered when **CVarEnableVRS.GetValueOnRenderThread()** is called on the game thread from **FVariableRateShadingImageManager::IsAttachmentVRSEnabled**.

This happens when using Windows Vulkan ES3\_1 Renderer, and we do have our own custom integrated code, however none of our code is in involved with the callstack during this crash.

The calls happens when **FMobileBasePassMeshProcessor::CollectPSOInitializers** is executed, which is why it happens on the game thread. I am still trying to create some reproduction steps to include here as well.

However, when checking if this issue has already been addressed in a later changelist, I found that in **CL#54496007** from Epic’s P4 Main stream, **FVariableRateShadingImageManager::IsPipelineVRSEnabled** also had the same call to CVarEnableVRS. **GetValueOnRenderThread** (), which was changed to **GetValueOnAnyThread**. The changelist comment also mentioned that it can be used during PSO precaching. That function is written right before **IsAttachmentVRSEnabled** and they both reference the same cvar.

So, I assume the appropriate fix would be to change **FVariableRateShadingImageManager::IsAttachmentVRSEnabled** to use **GetValueOnAnyThread** just like the other function.

Is that an appropriate fix that we should use until it is remedied?

Thank you for your time,

Nate

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [August 21, 2026, 12:52am UTC](https://forums.unrealengine.com/t/cvarenablevrs-getvalueonrenderthread-causes-ensure-failure/2832703/2 "2026-08-21T00:52:23Z")

</div>

Callstack:

```auto
LogOutputDevice: Error: Ensure condition failed: oldValue == newValue [File:E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp] [Line: 325] 
LogOutputDevice: Error: oldValue(1) newValue(0) If this check fails make sure that there is a FTaskTagScope(ETaskTag::EParallelRenderingThread) as deep as possible on the current callstack, you can see the current value in ActiveNamedThreads(40000002)
LogOutputDevice: Error: Stack: 
LogOutputDevice: Error: [Callstack] 0x00007ff7daddb21e UnrealGame.exe!`IsInParallelRenderingThread'::`10'::<lambda_1>::operator()() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:325]
LogOutputDevice: Error: [Callstack] 0x00007ff7cd0021cd UnrealGame.exe!IsInParallelRenderingThread() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Core\Private\HAL\ThreadingBase.cpp:325]
LogOutputDevice: Error: [Callstack] 0x00007ff7d35e0e53 UnrealGame.exe!FVariableRateShadingImageManager::IsAttachmentVRSEnabled() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Renderer\Private\VariableRateShading\VariableRateShadingImageManager.cpp:332]
LogOutputDevice: Error: [Callstack] 0x00007ff7d2b9deeb UnrealGame.exe!FMobileBasePassMeshProcessor::CollectPSOInitializers() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Renderer\Private\MobileBasePass.cpp:1325]
LogOutputDevice: Error: [Callstack] 0x00007ff7d10dbeab UnrealGame.exe!FMaterialShaderMap::CollectPSOPrecacheData() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Engine\Private\Materials\MaterialShader.cpp:3511]
LogOutputDevice: Error: [Callstack] 0x00007ff7d15d1eed UnrealGame.exe!FMaterialPSOPrecacheCollectionTask::CollectPrecacheDataAndStartCompiles() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Engine\Private\PSOPrecacheMaterial.cpp:904]
LogOutputDevice: Error: [Callstack] 0x00007ff7d15d906a UnrealGame.exe!FMaterialPSOPrecacheCollectionTask::DoTask() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Engine\Private\PSOPrecacheMaterial.cpp:948]
LogOutputDevice: Error: [Callstack] 0x00007ff7d15e0284 UnrealGame.exe!TGraphTask<FMaterialPSOPrecacheCollectionTask>::ExecuteTask() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:702]
LogOutputDevice: Error: [Callstack] 0x00007ff7ccd9b43a UnrealGame.exe!UE::Tasks::Private::FTaskBase::TryExecuteTask() [E:\TC\w2\8feacc05540d00f7\UE5\Engine\Source\Runtime\Core\Public\Tasks\TaskPrivate.h:525]

```

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![Petrockets](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/petrockets/32/1142518_2.png) [@Petrockets](https://forums.unrealengine.com/u/Petrockets)\
**Post date:** [August 21, 2026, 11:33pm UTC](https://forums.unrealengine.com/t/cvarenablevrs-getvalueonrenderthread-causes-ensure-failure/2832703/3 "2026-08-21T23:33:46Z")

</div>

Hello,

Yes, using **GetValueOnAnyThread** is likely the correct fix to go with here and we’ll likely implement a similar fix. If you do find reproduction steps please let us know. I’ve created the following issue which should be visible soon for tracking [https://issues.unrealengine.com/issue/UE\-393217](https://issues.unrealengine.com/issue/UE%5C-393217)

[Attachment Removed]

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [August 21, 2026, 11:46pm UTC](https://forums.unrealengine.com/t/cvarenablevrs-getvalueonrenderthread-causes-ensure-failure/2832703/4 "2026-08-21T23:46:24Z")

</div>

Awesome, thanks!

Currently I can only replicate it easily with out own modified UE5.8 source, which happens when automated tests are running. None of our code is involved with the callstack though, so I’ll try to find a way to make it happen with vanilla UE5.8.

[Attachment Removed]
