# Error : RayTracingDevice-\>CreateStateObject()

**URL:** <https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763>\
**Category:** Feedback & Requests\
**Tags:** unreal-engine, crash, bug-report\
**Created:** [November 17, 2024, 2:38am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763 "2024-11-17T02:38:20Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ynoak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ynoak](https://forums.unrealengine.com/u/Ynoak)\
**Post date:** [November 17, 2024, 2:38am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/1 "2024-11-17T02:38:20Z")

</div>

Hello !

I updated my project from 5.4 to 5.5 and now only in shipping build mode I have this crash when I launch the build:

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

Everything is updated (Nvidia Driver, sdk, etc)  
I understand it’s from DirectX12 / Ray Tracing but for this project I can not really remove ray tracing. Any suggestion except to wait for a patch from unreal or nvidia ?

EDIT : After some research, when the build is launched this file is created in saved folder : XXXX\_PCD3D\_SM6.upipelinecache

If I delete it, the build works but create another one, making crash the second launch. PSO seems to be the problem.

Thanks for your help

---

<div class="post-metadata">

**Author:** ![Ynoak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ynoak](https://forums.unrealengine.com/u/Ynoak)\
**Post date:** [November 17, 2024, 5:39am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/2 "2024-11-17T05:39:54Z")

</div>

[/Script/Engine.RendererSettings]  
r.ShaderPipelineCache.Enabled=0

Add this line in DefaultEngine.ini prevent the creation of the file

---

<div class="post-metadata">

**Author:** ![boriskourt1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/boriskourt1/32/1081788_2.png) [@boriskourt1](https://forums.unrealengine.com/u/boriskourt1)\
**Post date:** [November 18, 2024, 10:48pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/3 "2024-11-18T22:48:46Z")

</div>

Currently have the exact same error after switching to 5.5.

~~The r.ShaderPipelineCache.Enabled=0 didn’t fix it.~~

I lied, it does fix it. Thanks.

---

<div class="post-metadata">

**Author:** ![ratikG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ratikG](https://forums.unrealengine.com/u/ratikG)\
**Post date:** [November 19, 2024, 1:46am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/4 "2024-11-19T01:46:16Z")

</div>

i have the same issue, i cant seem to fix it. Can someone help

---

<div class="post-metadata">

**Author:** ![Ynoak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ynoak](https://forums.unrealengine.com/u/Ynoak)\
**Post date:** [November 19, 2024, 4:01am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/5 "2024-11-19T04:01:28Z")

</div>

Try to delete YourProjectName\_PCD3D\_SM6.upipelinecache in your saved folder (appdata/local/ YourProjectName/saved/)

And add in your defaultengine.ini :

[/Script/Engine.RendererSettings]  
r.ShaderPipelineCache.Enabled=0

It’s a temporal solution because PSO is now removed. Can decrease performance depending of your project. So keep in mind it’s a quick fix to remove later when it will be fixed

---

<div class="post-metadata">

**Author:** ![Free-Radical-666](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/free-radical-666/32/982868_2.png) [@Free-Radical-666](https://forums.unrealengine.com/u/Free-Radical-666)\
**Post date:** [November 22, 2024, 2:49pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/6 "2024-11-22T14:49:01Z")

</div>

I have the exact same issue after switching my game to 5.5

---

<div class="post-metadata">

**Author:** ![15530175137](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@15530175137](https://forums.unrealengine.com/u/15530175137)\
**Post date:** [November 27, 2024, 5:21am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/7 "2024-11-27T05:21:07Z")

</div>

Is it solved? I have the same problem, it only works when the RHI is DX11 or DX12 SM5 mode.

---

<div class="post-metadata">

**Author:** ![15530175137](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@15530175137](https://forums.unrealengine.com/u/15530175137)\
**Post date:** [November 27, 2024, 11:27am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/8 "2024-11-27T11:27:05Z")

</div>

It worked, thank you for providing the method.

---

<div class="post-metadata">

**Author:** ![hellbunny](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hellbunny](https://forums.unrealengine.com/u/hellbunny)\
**Post date:** [January 2, 2025, 11:45pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/9 "2025-01-02T23:45:33Z")

</div>

> [@Ynoak](#):
>
> PCD3D\_SM6.upipelinecache

that worked thank you thank you thank you!!

---

<div class="post-metadata">

**Author:** ![WhiteShirt](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WhiteShirt](https://forums.unrealengine.com/u/WhiteShirt)\
**Post date:** [January 14, 2025, 3:48pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/10 "2025-01-14T15:48:15Z")

</div>

Hello, I would like to ask which file should these two codes be added to, and what is its file path?

---

<div class="post-metadata">

**Author:** ![Ynoak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ynoak](https://forums.unrealengine.com/u/Ynoak)\
**Post date:** [January 14, 2025, 9:55pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/11 "2025-01-14T21:55:16Z")

</div>

> [@Ynoak](#):
>
> DefaultEngine.ini

YOUR PROJECT\Config  
DefaultEngine.ini

---

<div class="post-metadata">

**Author:** ![ShoraiX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShoraiX](https://forums.unrealengine.com/u/ShoraiX)\
**Post date:** [January 16, 2025, 4:12am UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/12 "2025-01-16T04:12:38Z")

</div>

Another thing you could do is just replace the file “YourProjectNamePCD3D\_SM6.upipelinecache” with an empty read-only file with the same name and extension (just make a txt and rename all, delete the culprit one).

---

<div class="post-metadata">

**Author:** ![zliwei2333](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/zliwei2333/32/628815_2.png) [@zliwei2333](https://forums.unrealengine.com/u/zliwei2333)\
**Post date:** [January 16, 2025, 3:02pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/13 "2025-01-16T15:02:01Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![CRYOMEN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CRYOMEN](https://forums.unrealengine.com/u/CRYOMEN)\
**Post date:** [January 17, 2025, 4:59pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/14 "2025-01-17T16:59:28Z")

</div>

To confirm UE 5.5.1 also has this issue.

---

<div class="post-metadata">

**Author:** ![Gelevor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gelevor](https://forums.unrealengine.com/u/Gelevor)\
**Post date:** [February 9, 2025, 8:09pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/15 "2025-02-09T20:09:13Z")

</div>

I love these types of primitive but magnificent solutions! It works flaslessly, thank you!

---

<div class="post-metadata">

**Author:** ![T.0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@T.0](https://forums.unrealengine.com/u/T.0)\
**Post date:** [February 20, 2025, 3:40pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/16 "2025-02-20T15:40:16Z")

</div>

Hi. Thank you a lot for the fix !

However it’s working just one time. I replaced the culprit file with a txt file with the same name and it worked the first time I launched MyProject.exe (the build I made for my game):

 ![Sans titre](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/a/9/7a9a9ab16497b97cf579f40b7194547c03d35de5.png)

When I close MyProject.exe, it automatically delete this txt file and create again the original culprit file:

 ![Sansitre](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/a/bda6e7793d3187009c31360e0d8396613fd98cfe.png)

Do you have a solution which can be permanent ?

---

<div class="post-metadata">

**Author:** ![ShoraiX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShoraiX](https://forums.unrealengine.com/u/ShoraiX)\
**Post date:** [February 23, 2025, 10:39pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/17 "2025-02-23T22:39:43Z")

</div>

Just to be sure, did you make it read-only?

---

<div class="post-metadata">

**Author:** ![T.0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@T.0](https://forums.unrealengine.com/u/T.0)\
**Post date:** [March 8, 2025, 3:21pm UTC](https://forums.unrealengine.com/t/error-raytracingdevice-createstateobject/2129763/18 "2025-03-08T15:21:58Z")

</div>

Thanks a lot. This was my problem. Fixed !
