(Case 1201759) Looking at some models with the camera turns the scene black in HDRP

I just downloaded new Beta 12 and tried to upgrade my project which was on b11 but the editor crashes during import. I attached the Editor.log and error.log files as a ZIP file to this post if that helps in any way.

5200442–517103–crash.zip (23.3 KB)

For future readers of this thread, here is the callstack from the editor.log where it crashed:

(Unity) ShaderLab::IntShader::PostLoad
(Unity) Shader::SetGlobalRenderPipeline
(Unity) Shader_Set_Custom_PropGlobalRenderPipeline
(Mono JIT Code) (wrapper managed-to-native) UnityEngine.Shader:set_globalRenderPipeline (string)
(Mono JIT Code) [C:\Dev\games\forawhile\Library\PackageCache\com.unity.render-pipelines.high-definition@7.1.5\Runtime\RenderPipeline\HDRenderPipeline.cs:628] UnityEngine.Rendering.HighDefinition.HDRenderPipeline:SetRenderingFeatures ()
(Mono JIT Code) [C:\Dev\games\forawhile\Library\PackageCache\com.unity.render-pipelines.high-definition@7.1.5\Runtime\RenderPipeline\HDRenderPipeline.cs:309] UnityEngine.Rendering.HighDefinition.HDRenderPipeline:.ctor (UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset,UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset)
(Mono JIT Code) [C:\Dev\games\forawhile\Library\PackageCache\com.unity.render-pipelines.high-definition@7.1.5\Runtime\RenderPipeline\HDRenderPipelineAsset.cs:38] UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset:CreatePipeline ()
(Mono JIT Code) UnityEngine.Rendering.RenderPipelineAsset:InternalCreatePipeline ()
(Mono JIT Code) UnityEngine.Rendering.RenderPipelineManager:PrepareRenderPipeline (UnityEngine.Rendering.RenderPipelineAsset)
(Mono JIT Code) UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,UnityEngine.Camera[],intptr,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle)
(Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_object_intptr_AtomicSafetyHandle (object,intptr,intptr,intptr)
(mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
(mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2921] do_runtime_invoke
(mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2968] mono_runtime_invoke
(Unity) scripting_method_invoke
(Unity) ScriptingInvocation::Invoke
(Unity) ScriptableRenderContext::ExtractAndExecuteRenderPipelineNoCleanup
(Unity) ScriptableRenderContext::ExtractAndExecuteRenderPipeline
(Unity) Camera::CustomRenderWithPipeline
(Unity) Camera::StandaloneCustomRender
(Unity) CameraScripting::Render
(Unity) Camera_CUSTOM_Render
(Mono JIT Code) (wrapper managed-to-native) UnityEngine.Camera:Render (UnityEngine.Camera)
(Mono JIT Code) UnityEditor.PreviewRenderUtility:Render (bool,bool)
(Mono JIT Code) UnityEditor.GameObjectInspector:smile:oRenderPreview ()
(Mono JIT Code) UnityEditor.GameObjectInspector:RenderStaticPreview (string,UnityEngine.Object[],int,int)
(Mono JIT Code) UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset (UnityEngine.Object,UnityEngine.Object[],string)
(Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_object_object_object_object (object,intptr,intptr,intptr)
(mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\mini\mini-runtime.c:2809] mono_jit_runtime_invoke
(mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2921] do_runtime_invoke
(mono-2.0-bdwgc) [c:\build\output\unity-technologies\mono\mono\metadata\object.c:2968] mono_runtime_invoke
(Unity) scripting_method_invoke
(Unity) ScriptingInvocation::Invoke
(Unity) MonoCreateAssetPreview
(Unity) WriteAssetPreviewToFile
(Unity) WriteAssetPreviewNoInfo
(Unity) ImportToObjects
(Unity) ImportAsset
(Unity) AssetImportWorker::Import
(Unity) AssetImportManager::ImportInProcess
(Unity) AssetImportManager::Import
(Unity) ImportAndPostprocessOutOfDateAssets
(Unity) RefreshInternalV2
(Unity) StopAssetImportingV2
(Unity) RefreshV2
(Unity) AssetDatabase::Refresh
(Unity) Application::InitializeProject
(Unity) WinMain
(Unity) __scrt_common_main_seh
(KERNEL32) BaseThreadInitThunk
(ntdll) RtlUserThreadStart

Thanks Refeas. Can you submit a bug report using the Bug Reporter tool, attaching your minimal project and we will also get the callstack attached in a Fogbugz number for tracking the issue.

I wasn’t able to reproduce this in a simple project following the same steps. I deleted the Library folder on the faulty one and it finished “successfully” but I got a bunch of errors when trying to run my game in that project. Will update you once I conclude more testing, but the project is just not working on b12.

Well, I have some new developement on this. For some reason, the upgrade from b11 to b12 on the faulty project magically started working. However I’ve discovered that skybox is broken in HDRP (B12 + HDRP 7.1.5) - whenever I point the camera in certain directions, the scene goes completely black (except for UI) in both scene and game view and only appears OK in certain angles. When I switch off HDRI Skybox in the Volume Settings, it starts working properly. I tried all the skybox types and they are all broken in the same way. However I was not able to reproduce this issue in an empty project even when using the same volume settings and packages.

I had the same issue, deleting the Library folder fixed it.

Fixed the crash or the skybox bug? I tried to delete it multiple times but to no avail.

I meant the crash, there’s no problem with HDRP as far as I can tell.
I’m using the Physically Based Sky, though.

I only have the problem in that specific project. I tried PBS as well as Gradient Sky and they are all broken for me. The only way it worked was to disable skybox altogether. I’ll jsut stick to B11 for now.

Have you tried stripping the project down? A reproducible + bug report for this would be much appreciated. There are some tools that can help with that: https://blogs.unity3d.com/2016/08/24/attaching-your-project-to-a-bug-report/

I was finally able to reproduce the issue. I reported the bug as case 1201759. If you need any further information, please let me know.

Edit: I just noticed that it has been submitted with 2019.2 for some reason, is there a way you could change the version manually to 2019.3.0f1? Thanks.

Thanks a lot for the report and the reproducible! The issue has been reproduced and the team is investigating:

Hey @LeonhardP , any news on this? It’s still present in 2019.3.0f4 and HDRP 7.1.7 and it’s literally preventing us from working on our project since the last working version was b11 and that one crashes a lot.

2019.3 is out but the issue is still present even tho it is “planned for 2019.3”. Would be nice to know which version is it planned to be fixed in. It’s been more than 2 months and we are still unable to work on our project.

I’ve reached out to the devs to check whether they have any updates about this.

@LeonhardP

Any update on this please? This is still happening as of today, and is a really big blocker. For us it only happens when building a project from linux-based system image.

EDIT: It is also present in 2019.3.0f6

Good news, we have a fix in review: https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/6027

Once it passes, it will get backported to 2019.3.

Awesome! I’ll be following this topic, thanks for the info!

Still happening. Tried everything suggested in the previous posts. Unity 2019.4 HDRP 7.3.1