guycalledfrank / bakery-issues

Bug tracker for Bakery
4 stars 0 forks source link

🐛[Bug] Unity Crash straight after light baking while there is a volume in a scene. #140

Closed OmarVector closed 1 year ago

OmarVector commented 1 year ago

Everytime I bake the lighting while I've a volume in the scene, unity crash after it reload the level

Obtained 22 stack frames 0x00007ffe9b401911 (halffloat2vb) halffloat2vb 0x00000145c0fd47e1 (Mono JIT Code) (wrapper managed-to-native) ftRenderLightmap:halffloat2vb (string,intptr,int) 0x00000145c0fd09a3 (Mono JIT Code) [ftRenderLightmap.cs:2621] ftRenderLightmap:LoadVolumes () 0x00000145c3859443 (Mono JIT Code) [ftRenderLightmap.cs:7019] ftRenderLightmap/d283:MoveNext () 0x0000014560b73258 (Mono JIT Code) [ftRenderLightmap.cs:6829] ftRenderLightmap/d282:MoveNext () 0x0000014560b57aac (Mono JIT Code) [ftRenderLightmap.cs:4601] ftRenderLightmap:RenderLightmapUpdate () 0x0000014642cd8800 (Mono JIT Code) UnityEditor.EditorApplication:Internal_CallUpdateFunctions () 0x0000014503d3b09d (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) 0x00007ffe81d0e334 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke 0x00007ffe81c4e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke 0x00007ffe81c4e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke 0x00007ff7549555b4 (Unity) scripting_method_invoke 0x00007ff7549501d4 (Unity) ScriptingInvocation::Invoke 0x00007ff754949af5 (Unity) ScriptingInvocation::Invoke 0x00007ff754a85c8b (Unity) Scripting::UnityEditor::EditorApplicationProxy::Internal_CallUpdateFunctions 0x00007ff7553ad1e2 (Unity) SceneTracker::Update 0x00007ff75555ed0a (Unity) Application::TickTimer 0x00007ff7559aaa4a (Unity) MainMessageLoop 0x00007ff7559af2fb (Unity) WinMain 0x00007ff756ce18ee (Unity) __scrt_common_main_seh 0x00007fff76d154e0 (KERNEL32) BaseThreadInitThunk 0x00007fff7888485b (ntdll) RtlUserThreadStart

guycalledfrank commented 1 year ago

Weird... what is the resolution of this volume? Can you reproduce this issue in a scene with just 1 box, 1 light and this exact volume?

OmarVector commented 1 year ago

I found out, Setting Tanget-Space SH on skylight , was the reason that it was crashing. turning it off, everything run ok

I dont remember the resolution correctly, but I do remember you mentioned in reply on the forum something about TangetSpace SH not work nice with volume or something like that.

guycalledfrank commented 1 year ago

Seems like I should add at least some big console warning saying "ARE YOU SURE you want to use tangent-space SH"? :D Since it's a super advanced feature only 2 people used with their custom shaders.

guycalledfrank commented 1 year ago

Added https://github.com/guycalledfrank/bakery-csharp/commit/b91701990e214deedba57ddc64b047788b3a5388