#Crash in built game in specific scene: RenderGraph is the suspect

1 messages · Page 1 of 1 (latest)

summer atlas
#

Having a crash ONLY in the built game, and only in a specific scene (level 2). The crash occurs immediately after loading into lv.2 (and also occurs immediately if I make a build with level 2 as the only scene, which is the build this log is from). The crash log (attached) isn't very meaningful to me, as the only thing that gives any sort of clue is the 'RenderGraph is now enabled' line right before the crash.

The negative scale box colliders are not the cause, since they have been present in previous builds (and are also present in scene 1) with no issue.
The The referenced script (Unknown) on this Behaviour is missing! and The referenced script on this Behaviour (Game Object 'UnityMainThreadDispatcher') is missing! are not the cause, they are caused by an asset I am using and are known as a harmless exception. Previous builds also had this exception without crashing.

So that just leaves renderGraph... but the rendergraph render features I've added all work fine in the first level, and as far as I'm aware, aren't tied to the current scene in any way, so I'm pretty stuck.
Any help or guidance is appreciated.

Also, let me know if this is the wrong place to post this. At this stage I'm not fully sure if this is a code issue or a rendering issue 😅

long hazel
#

Does it crash with D3D11 as the graphics api?

#

Also, I'd double check if you have any conditional compilation in the custom rendering code.

summer atlas
long hazel
#

12 was already used according to the crash log. What about 11?

summer atlas
#

yeah, it crashes with 11, was my default before

long hazel
#

Hmm... Well one thing is clear: it crashes somewhere in the rendering loop.
Other than that, there's not much info.

At this point it's just trial and error: try disabling your custom rendering features, then deactivating objects in the scene.

summer atlas
#

alright, thanks for the help, I'll give that a go

summer atlas
#

found the culprit, it's a render feature that creates a texture with white for objects on a certain renderlayer, and black for everything else

#

I'll take a look into it but I'm still pretty new to rendergraph (and the documentation for the new api is frustratingly lacking) so any further help is greatly appreciated

long hazel
#

It would help if you share the code correctly.

#

!code

sharp mulchBOT
summer atlas
#

narrowed it down further, it's not do with the render feature script but seemingly if there's any terrain of any kind in one specific scene it crashes whenever that scene is loaded

#

i dont think its the terrain asset that's corrupted since it crashes even if I create a new terrain asset in that scene

#

can't test how it works with the potentially troublesome terrain asset in other scenes, because the editor crashes whenever I try to copy terrain between scenes lmao