# Shipping build crashes with DX12 and Raytracing enabled

**URL:** <https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567>\
**Category:** Rendering\
**Tags:** unreal-engine, Ray-Tracing, crash, Rendering, dx12, question\
**Created:** [November 19, 2024, 3:42am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567 "2024-11-19T03:42:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![PolskiKot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PolskiKot](https://forums.unrealengine.com/u/PolskiKot)\
**Post date:** [November 19, 2024, 3:42am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/1 "2024-11-19T03:42:09Z")

</div>

Hello everyone,

I’ve encountered a problem when enabling DX12 and hardware ray tracing. In a Shipping build, the project crashes on startup with the following error (but only on some machines, even with similar hardware configurations):

**Engine Version** : 5.5.0 (no additional plugins)

### Crash log:

```auto
LowLevelFatalError [File:D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Util.cpp] [Line: 991]
RayTracingDevice->CreateStateObject(&Desc, IID_PPV_ARGS(Result.GetInitReference())) failed
at D:\build\++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp:663
with error E_INVALIDARG

Reichfall_Win64_Shipping!D3D12RHI::VerifyD3D12Result()
Reichfall_Win64_Shipping!FD3D12PoolAllocator::CreatePlacedResource()
Reichfall_Win64_Shipping!FD3D12RayTracingPipelineCache::FShaderCompileTask::DoTask()
Reichfall_Win64_Shipping!TGraphTask<FD3D12RayTracingPipelineCache::FShaderCompileTask>::ExecuteTask()
Reichfall_Win64_Shipping!UE::Tasks::Private::FTaskBase::TryExecuteTask()
Reichfall_Win64_Shipping!LowLevelTasks::TTaskDelegate<LowLevelTasks::FTask * __ptr64__ cdecl(bool),48>::TTaskDelegateImpl<LowLevelTasks::FTask::Init<UE::Tasks::Private::FTaskBase::Init'::2'::<lambda_1> >'::5'::<lambda_1>,0>::CallAndMove()
Reichfall_Win64_Shipping!LowLevelTasks::FTask::ExecuteTask()
Reichfall_Win64_Shipping!LowLevelTasks::FScheduler::WorkerLoop()
Reichfall_Win64_Shipping!operator<<()
Reichfall_Win64_Shipping!FThreadImpl::Run()
Reichfall_Win64_Shipping!FRunnableThreadWin::Run()

```

### Relevant Code in D3D12RayTracing.cpp:

```auto
	// Existing collection objects

	for (int32 CollectionIndex = 0; CollectionIndex < ExistingCollections.Num(); ++CollectionIndex)
	{
		Subobjects[Index++] = D3D12_STATE_SUBOBJECT{ D3D12_STATE_SUBOBJECT_TYPE_EXISTING_COLLECTION, &ExistingCollections[CollectionIndex] };
	}

	// Done!

	checkf(Index == Subobjects.Num(), TEXT("All pipeline subobjects must be initialized."));

	// Create ray tracing pipeline state object

	D3D12_STATE_OBJECT_DESC Desc = {};
	Desc.NumSubobjects = Index;
	Desc.pSubobjects = &Subobjects[0];
	Desc.Type = StateObjectType;

	VERIFYD3D12RESULT(RayTracingDevice->CreateStateObject(&Desc, IID_PPV_ARGS(Result.GetInitReference()))); // crash!

	INC_DWORD_STAT(STAT_D3D12RayTracingCreatedPipelines);
	INC_DWORD_STAT_BY(STAT_D3D12RayTracingCompiledShaders, NumExports);

	return Result;
}

```

### DirectX Debug Log:

```auto
D3D12 ERROR: ID3D12Device::CreateStateObject: Resource bindings for function "RayGen_56888ca624d69fc5" not compatible with associated root signatures (if any): local root signature object: 0x00000181432A6E60:'Unnamed ID3D12RootSignature Object', global root signature object: 0x00000181656E0E20:'Unnamed ID3D12RootSignature Object'. Error detail: Shader CBV descriptor range (BaseShaderRegister=1, NumDescriptors=1, RegisterSpace=4) is not fully bound in a root signature. If the intent is this will be resolved later when this state object is combined with other state object(s), use a D3D12_STATE_OBJECT_CONFIG subobject with D3D12_STATE_OBJECT_FLAG_ALLOW_LOCAL_DEPENDENCIES_ON_EXTERNAL_DEFINITIONS set in Flags. [STATE_CREATION ERROR #1194: CREATE_STATE_OBJECT_ERROR]

D3D12: **BREAK** enabled for the previous message, which was: [ERROR STATE_CREATION #1194: CREATE_STATE_OBJECT_ERROR]

```

Interestingly, as long as I don’t click **OK** on the error message box, the application appears to work fine.

- Does anyone have ideas on what might be causing this issue?
- Is there a workaround for this without modifying Unreal Engine source files?

Any help is appreciated!

---

<div class="post-metadata">

**Author:** ![gombles](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@gombles](https://forums.unrealengine.com/u/gombles)\
**Post date:** [November 19, 2024, 9:10am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/2 "2024-11-19T09:10:34Z")

</div>

Getting the same crash here with my Shipping build. Can play for a time if I ignore the message but then exits.

LowLevelFatalError [File:D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12Util.cpp] [Line: 991]  
RayTracingDevice-\>CreateStateObject(&Desc, IID\_PPV\_ARGS(Result.GetInitReference())) failed  
at D:\build++UE5\Sync\Engine\Source\Runtime\D3D12RHI\Private\D3D12RayTracing.cpp:663  
with error E\_INVALIDARG

0x00007ff6f3722be7 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f36ce005 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f36cfe00 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f36d0c58 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1c9ecf1 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1e39b12 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1c9ff3b UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f36c1811 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f36d8183 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f37f2c04 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f37f5090 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1c9ecf1 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1c8b4bf UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1c8dfee UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1ca0923 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1c87e91 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1d15a74 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1e545a7 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff6f1e54379 UE\_StTeilo-Win64-Shipping.exe!UnknownFunction   
0x00007ff8b73b259d KERNEL32.DLL!UnknownFunction

Crash in runnable thread Foreground Worker #1

Any help would be great, because disabling Ray Tracing to fix this is not ideal going forward,

---

<div class="post-metadata">

**Author:** ![Jgxxxx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jgxxxx](https://forums.unrealengine.com/u/Jgxxxx)\
**Post date:** [November 19, 2024, 10:00am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/3 "2024-11-19T10:00:32Z")

</div>

Same here, no idea what’s going on…  
The first build I did on 5.5 worked, but none after that…

Tried deleting temp/cache files and updated drivers

---

<div class="post-metadata">

**Author:** ![TiagoCostaUE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TiagoCostaUE](https://forums.unrealengine.com/u/TiagoCostaUE)\
**Post date:** [November 19, 2024, 11:29am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/4 "2024-11-19T11:29:47Z")

</div>

Hi! This is a known issue and will be addressed in 5.5.1.

In the meantime you can delete `%localappdata%\<ProjectName>\Saved\<ProjectName>_PCD3D_SM6.upipelinecache` and run with `r.ShaderPipelineCache.SaveUserCache=0` which should prevent it from happening again ( **note that this cvar override should removed once 5.5.1 is released** ).

---

<div class="post-metadata">

**Author:** ![Jgxxxx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jgxxxx](https://forums.unrealengine.com/u/Jgxxxx)\
**Post date:** [November 19, 2024, 12:10pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/5 "2024-11-19T12:10:47Z")

</div>

Thank you, it runs now!

---

<div class="post-metadata">

**Author:** ![PolskiKot](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PolskiKot](https://forums.unrealengine.com/u/PolskiKot)\
**Post date:** [November 19, 2024, 12:36pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/6 "2024-11-19T12:36:20Z")

</div>

Thanks! I can confirm that this fixes my issue.

---

<div class="post-metadata">

**Author:** ![SaOk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SaOk](https://forums.unrealengine.com/u/SaOk)\
**Post date:** [November 27, 2024, 1:51am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/7 "2024-11-27T01:51:43Z")

</div>

> [@TiagoCostaUE](#):
>
> r.ShaderPipelineCache.SaveUserCache=0

Hi, where to put the r.ShaderPipelineCache.SaveUserCache=0? Have tried to add it in project’s defaultengine.ini and defaultgame.ini, also have it in game used in BP. But pipelinecache is still created after each shipping build play session.

---

<div class="post-metadata">

**Author:** ![atzepenq](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/atzepenq/32/920906_2.png) [@atzepenq](https://forums.unrealengine.com/u/atzepenq)\
**Post date:** [December 4, 2024, 2:41am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/8 "2024-12-04T02:41:34Z")

</div>

would like to know that too.

meanwhile you can create an empty \_PCD3D\_SM6.upipelinecache yourself, then set it to read only. saves you the time to delete the file after every run.

---

<div class="post-metadata">

**Author:** ![35degree](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/35degree/32/486057_2.png) [@35degree](https://forums.unrealengine.com/u/35degree)\
**Post date:** [December 10, 2024, 5:23pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/10 "2024-12-10T17:23:39Z")

</div>

Hi! I have updated to version 5.5.1, but the issue still persists. I have to manually delete the \_PCD3D\_SM6.upipelinecache file each time before I can run it.

---

<div class="post-metadata">

**Author:** ![julschau](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@julschau](https://forums.unrealengine.com/u/julschau)\
**Post date:** [December 10, 2024, 7:57pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/11 "2024-12-10T19:57:17Z")

</div>

I also have the same problem in 5.5.1 and shipping builds.

---

<div class="post-metadata">

**Author:** ![SaOk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SaOk](https://forums.unrealengine.com/u/SaOk)\
**Post date:** [December 10, 2024, 9:43pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/12 "2024-12-10T21:43:58Z")

</div>

Seem to stuck to black screen now instead of crashing. The empty readonly upipelinecache file work nicely, but require quite messy trick from game testers.

---

<div class="post-metadata">

**Author:** ![Miguel1900](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/miguel1900/32/1010694_2.png) [@Miguel1900](https://forums.unrealengine.com/u/Miguel1900)\
**Post date:** [December 11, 2024, 12:43pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/13 "2024-12-11T12:43:10Z")

</div>

Couldn’t be addressed, at the end @TiagoCostaUE ?

Tons of users complaining about and still without being able to package, everywhere.

---

<div class="post-metadata">

**Author:** ![Jgxxxx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jgxxxx](https://forums.unrealengine.com/u/Jgxxxx)\
**Post date:** [December 12, 2024, 1:23pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/14 "2024-12-12T13:23:14Z")

</div>

Yes, issue still there in 5.5.1 sadly

---

<div class="post-metadata">

**Author:** ![AlbertZamora](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlbertZamora](https://forums.unrealengine.com/u/AlbertZamora)\
**Post date:** [December 12, 2024, 5:17pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/15 "2024-12-12T17:17:45Z")

</div>

I imagine that a problem that prevents the final product of your users to work should be a priority issue… or not? and how disgusting is the habit these days of companies to first say that we should not worry, that everything will be fixed in the next version, and as soon as it is not fixed, we only hear silence from them… most likely because of this type of mentality is the reason why the video game industry is in crisis.

---

<div class="post-metadata">

**Author:** ![TiagoCostaUE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TiagoCostaUE](https://forums.unrealengine.com/u/TiagoCostaUE)\
**Post date:** [December 13, 2024, 2:36pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/16 "2024-12-13T14:36:01Z")

</div>

Unfortunately the previous fix didn’t address all causes of this issue and that wasn’t detected in time for 5.5.1.

There will be a [workaround for this issue in 5.5.2](https://github.com/EpicGames/UnrealEngine/commit/799d41011a98463aca589eafd0c5a9d673f1e73a) and further improvement is already in UE5/Main for a future release.

---

<div class="post-metadata">

**Author:** ![Miguel1900](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/miguel1900/32/1010694_2.png) [@Miguel1900](https://forums.unrealengine.com/u/Miguel1900)\
**Post date:** [December 13, 2024, 3:02pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/18 "2024-12-13T15:02:29Z")

</div>

Thank you @TiagoCostaUE ,

As there are a few major bugs, like this one, do you think (I understand you can’t give a date, but your personal opinion, if you can) 5.5.2 will be more or less urgent, maybe arriving before the end of the year? Or totally impossible? (any opinion or very rude approximation would be great, anyway) Just to keep the hope, or find an alternative and change our dev strategy (we are close to release and our project is already ready into UE5.5, just waiting to package or deciding to release based on 5.3).

Thank you very much

---

<div class="post-metadata">

**Author:** ![DoL](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DoL](https://forums.unrealengine.com/u/DoL)\
**Post date:** [December 13, 2024, 11:07pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/19 "2024-12-13T23:07:21Z")

</div>

Using version 5.5.1: Disabling MegaLights from project settings seems to have solved the issue for me.

---

<div class="post-metadata">

**Author:** ![JansenSensei](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jansensensei/32/994866_2.png) [@JansenSensei](https://forums.unrealengine.com/u/JansenSensei)\
**Post date:** [December 14, 2024, 9:40pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/20 "2024-12-14T21:40:13Z")

</div>

> [@35degree](#):
>
> I have to manually delete the \_PCD3D\_SM6.upipelinecache file

Any info on where this file can be found? I can certainly wait for 5.5.2 before I publich but I would like to be able to test my built game ASAP. If this workaround can help me do that then great… so… the location of that file…? Anyone? 🙂

Thanks in advance

---

<div class="post-metadata">

**Author:** ![SaOk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SaOk](https://forums.unrealengine.com/u/SaOk)\
**Post date:** [December 15, 2024, 12:45am UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/22 "2024-12-15T00:45:01Z")

</div>

The appdata folder mentioned is in C:\Users\Username, need to toggle hidden folders to show. Search that .upipelinecache too.

---

<div class="post-metadata">

**Author:** ![Mirror\_Visuals](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mirror\_Visuals](https://forums.unrealengine.com/u/Mirror_Visuals)\
**Post date:** [December 16, 2024, 2:45pm UTC](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567/24 "2024-12-16T14:45:51Z")

</div>

Hi Guys i could fix the issue when I added these two console variables at the default ini.

r.ShaderPipelineCache.Enabled=0  
r.ShaderPipelineCache.StartupMode=0

chat gpt to the rescue!!!

[Next page](https://forums.unrealengine.com/t/shipping-build-crashes-with-dx12-and-raytracing-enabled/2134567.md?page=2)
