(Case 1341751) Hybrid Renderer fail to run properly at mobile platform

I build Android il2cpp build and try run at Mi Note 2 but it's black screen give the following error.

[spoiler]

2021/06/08 10:11:16.285 16893 16958 Error CRASH *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021/06/08 10:11:16.285 16893 16958 Error CRASH Version '2020.3.11f1 (99c7afb366b3)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
2021/06/08 10:11:16.285 16893 16958 Error CRASH Build fingerprint: 'Xiaomi/scorpio/scorpio:8.0.0/OPR1.170623.032/V11.0.2.0.OADCNXM:user/release-keys'
2021/06/08 10:11:16.285 16893 16958 Error CRASH Revision: '0'
2021/06/08 10:11:16.285 16893 16958 Error CRASH ABI: 'arm64'
2021/06/08 10:11:16.285 16893 16958 Error CRASH Timestamp: 2021-06-08 10:11:16+0800
2021/06/08 10:11:16.285 16893 16958 Error CRASH pid: 16893, tid: 16958, name: UnityGfxDeviceW >>> com.Test.NetCube <<<
2021/06/08 10:11:16.285 16893 16958 Error CRASH uid: 10214
2021/06/08 10:11:16.285 16893 16958 Error CRASH signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x78fb22d800
2021/06/08 10:11:16.285 16893 16958 Error CRASH x0 00000078fa9ea47c x1 0000000000000c7c x2 0000000000000002 x3 00000078fb22d800
2021/06/08 10:11:16.285 16893 16958 Error CRASH x4 0000000000844000 x5 6769666e6f632b2b x6 676966e76a01c32b x7 0000000000000000
2021/06/08 10:11:16.285 16893 16958 Error CRASH x8 0000000000000003 x9 0000000000000001 x10 0000000000000050 x11 00000078e72c4848
2021/06/08 10:11:16.285 16893 16958 Error CRASH x12 0000000000000078 x13 0000000000000000 x14 00000078fa9ea3e8 x15 00000078fa9ea434
2021/06/08 10:11:16.285 16893 16958 Error CRASH x16 0000000000000c7c x17 0000000000000168 x18 0000000000000001 x19 00000078e72c6158
2021/06/08 10:11:16.285 16893 16958 Error CRASH x20 00000078fa9e5000 x21 0000000000001494 x22 00000078ea5d8100 x23 00000078fa9e9800
2021/06/08 10:11:16.285 16893 16958 Error CRASH x24 0000000000000001 x25 00000078fa9e5000 x26 00000000bcbcbcbc x27 00000000abcdabcd
2021/06/08 10:11:16.285 16893 16958 Error CRASH x28 00000078e85d5968 x29 00000078e72c5f10
2021/06/08 10:11:16.285 16893 16958 Error CRASH sp 00000078e72c4810 lr 00000078e7cbe288 pc 00000078e7cbe380
2021/06/08 10:11:16.285 16893 16958 Error CRASH
2021/06/08 10:11:16.285 16893 16958 Error CRASH backtrace:
2021/06/08 10:11:16.285 16893 16958 Error CRASH #00 pc 0000000000a51380 /system/vendor/lib64/libllvm-qgl.so (BuildId: ccbe1c7ab10ab804e10cbf1c20a1752e)
2021/06/08 10:11:16.285 16893 16958 Error CRASH #01 pc 000000000099adb0 /system/vendor/lib64/libllvm-qgl.so (BuildId: ccbe1c7ab10ab804e10cbf1c20a1752e)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #02 pc 0000000000a6da94 /system/vendor/lib64/libllvm-qgl.so (QGLCLoadShaderBinary(void*, void*, unsigned long, void*, unsigned long, QGLC_COMPILETOIR_RESULT*)+108) (BuildId: ccbe1c7ab10ab804e10cbf1c20a1752e)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #03 pc 00000000000b11bc /system/vendor/lib64/hw/vulkan.msm8996.so (QglShaderCompiler::LoadShaderFromCache(void*, QGLC_COMPILETOIR_RESULT*, QglProgram const*, QglShaderStage)+252)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #04 pc 00000000000b07d8 /system/vendor/lib64/hw/vulkan.msm8996.so (QglShaderCompiler::CompileToIrShader(QglProgram const*, QglShaderStage, char const*, unsigned int, char const*, QGLC_COMPILETOIR_RESULT*)+488)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #05 pc 00000000000a41cc /system/vendor/lib64/hw/vulkan.msm8996.so (QglProgram::Compile(QglPipelineLayout const*)+112)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #06 pc 00000000000a3ff4 /system/vendor/lib64/hw/vulkan.msm8996.so (QglProgram::Create(QglProgramCreateData*)+224)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #07 pc 00000000000a1570 /system/vendor/lib64/hw/vulkan.msm8996.so (QglPipeline::CreateProgram()+196)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #08 pc 00000000000a13d4 /system/vendor/lib64/hw/vulkan.msm8996.so (QglPipeline::Compile()+84)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #09 pc 00000000000a09fc /system/vendor/lib64/hw/vulkan.msm8996.so (QglPipeline::Init(QglPipelineCreateData*)+88)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #10 pc 00000000000a0918 /system/vendor/lib64/hw/vulkan.msm8996.so (QglPipeline::Create(QglPipelineCreateData*)+64)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #11 pc 000000000007595c /system/vendor/lib64/hw/vulkan.msm8996.so (qglinternal::vkCreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T*)+4296)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #12 pc 00000000007d45f8 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (VKGpuProgram::GetCachedPipeline(vk::PipelineKey const&, vk::RenderPassDescription const&)+328) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.286 16893 16958 Error CRASH #13 pc 00000000007f7354 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (vk::smile:eviceState::Transition(vk::CommandBuffer
, vk::smile:eviceState const&)+48) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #14 pc 00000000007bdfd0 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (GfxDeviceVKBase::smile:rawBuffersInternal(VkBuffer_T*, unsigned long, unsigned int, VkBuffer_T* const*, unsigned int const*, unsigned long const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned int, int)+288) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #15 pc 00000000007c7dd0 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (GfxDeviceVKBase::smile:rawBufferRangesPlatform(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long, int)+1084) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #16 pc 00000000008cac18 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (SinglePassStereoSupportExt::smile:rawBuffersStereo(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long)+164) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #17 pc 00000000007bde94 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (GfxDeviceVKBase::smile:rawBuffers(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*)+40) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #18 pc 00000000008cccb8 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (DynamicVBO::smile:rawChunk(VertexDeclaration*)+808) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #19 pc 0000000000971794 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (DrawImmediate::FlushBuffer()+380) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #20 pc 0000000000e47034 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+22068) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #21 pc 0000000000e498ac /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+44) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #22 pc 0000000000e49874 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (GfxDeviceWorker::Run()+136) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #23 pc 0000000000e417e8 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+4) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #24 pc 000000000062ae20 /data/app/com.Test.NetCube-o96gcelZh4umKRAmF2Bmcg==/lib/arm64/libunity.so (Thread::RunThreadWrapper(void*)+512) (BuildId: 388f1efac65e4aa5c352582c4afc9a3366f1a35e)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #25 pc 00000000000667f0 /system/lib64/libc.so (pthread_start(void*)+36) (BuildId: 1596af9bfe30740491efc432bb322a19)
2021/06/08 10:11:16.287 16893 16958 Error CRASH #26 pc 000000000001f2f4 /system/lib64/libc.so (
start_thread+68) (BuildId: 1596af9bfe30740491efc432bb322a19)
2021/06/08 10:11:16.457 16893 16964 Error AudioTrack did not receive expected priority boost on time

[/spoiler]

Would it be possible for you to report a bug for this?
This crash seems unrelated to the hybrid renderer as it crashes in the vulkan specific path of DynamicVBO code (particles and other dynamic geometry generated on CPU).

EDIT: now that I look more at it it might be hybrid related after all. Crash is in shader loading from cache in the driver. A bug like this was fixed at some point but I am unsure what versions the fix ended up in. In any case a repro project would be nice to have.

[quote=“joelv”, post:2, topic: 843955]
Would it be possible for you to report a bug for this?
This crash seems unrelated to the hybrid renderer as it crashes in the vulkan specific path of DynamicVBO code (particles and other dynamic geometry generated on CPU).

EDIT: now that I look more at it it might be hybrid related after all. Crash is in shader loading from cache in the driver. A bug like this was fixed at some point but I am unsure what versions the fix ended up in. In any case a repro project would be nice to have.
[/quote]
Alright. Case 1341751.

[quote=“optimise”, post:3, topic: 843955]
Alright. Case 1341751.
[/quote]
Thank you

[quote=“joelv”, post:4, topic: 843955]
Thank you
[/quote]
One more thing I would like you find out why too. I dunno why open subscene the plane color is darker and after close subscene it becomes brighter. I believe darker should be correct result.

[quote=“optimise”, post:5, topic: 843955]
One more thing I would like you find out why too. I dunno why open subscene the plane color is darker and after close subscene it becomes brighter. I believe darker should be correct result.
[/quote]
This sounds like a gamma color problem. We have one fix regarding something like this in the pipe if I recall correctly.
Do you do anything specific with setting colors to overrides yourself or are you fully relying on the built in conversion systems?

[quote=“joelv”, post:6, topic: 843955]
This sounds like a gamma color problem. We have one fix regarding something like this in the pipe if I recall correctly.
Do you do anything specific with setting colors to overrides yourself or are you fully relying on the built in conversion systems?
[/quote]
Currently I fully relying on built in conversion systems. What’s the ETA of the fix? Btw what overrides setting colors are u referring to?

The overrides I am speaking on if you modify the value of a MaterialColor component yourself from code. If you do so you must ensure that the value you write is in linear color since the data will be uploaded to GPU directly as is.

I am checking when and where the fix landed. What version of hybrid renderer are you on now?

EDIT: also ensure your project is in linear mode. It's the only supported mode for hybrid for now.

[quote=“joelv”, post:8, topic: 843955]
I am checking when and where the fix landed. What version of hybrid renderer are you on now?
[/quote]
0.11.0-preview.44

[quote=“joelv”, post:8, topic: 843955]
EDIT: also ensure your project is in linear mode. It’s the only supported mode for hybrid for now.
[/quote]
Alright switch to linear color space fix the issue but hopefully gamma color space fix will land soon.

EDIT: One more thing. Will future release of Hybrid renderer supports low end GLES3 and GLES2 mobile devices soon?

Currently our focus is on vulkan (on android that is) devices and linear space only. We currently rely heavily on compute buffers and compute shaders to put data in the right place. This is something we might revisit but that's how the current plan looks.

So yes, currently it is expected that the project is in linear space and docs should reflect this. I thought we added it but it must have been missed.

1 Like

[quote=“joelv”, post:10, topic: 843955]
Currently our focus is on vulkan (on android that is) devices and linear space only. We currently rely heavily on compute buffers and compute shaders to put data in the right place. This is something we might revisit but that’s how the current plan looks.

So yes, currently it is expected that the project is in linear space and docs should reflect this. I thought we added it but it must have been missed.
[/quote]

I see. Now I’m confuse. Then what is the purpose of gamma color problem fix?
[quote=“joelv”, post:6, topic: 843955]
This sounds like a gamma color problem. We have one fix regarding something like this in the pipe if I recall correctly.
Do you do anything specific with setting colors to overrides yourself or are you fully relying on the built in conversion systems?
[/quote]

The fix was that we had forgotten to convert from gamma to linear at one point in our conversion systems. This is something we need to do because some of the source data colors are in gamma space. Unity material properties automatically handles this conversion behind the scenes, but as we have a separate GPU data upload path for things in hybrid it has to be done at any place we store a color (we do the conversion when we store the data, not on upload). And this was missed in one place, hence the fix.

1 Like

[quote=“optimise”, post:3, topic: 843955]
Alright. Case 1341751.
[/quote]
@joelv Have u find out why it crash? I would like to know why it crash.

EDIT:
[quote=“joelv”, post:10, topic: 843955]
Currently our focus is on vulkan (on android that is) devices and linear space only. We currently rely heavily on compute buffers and compute shaders to put data in the right place. This is something we might revisit but that’s how the current plan looks.
[/quote]
Is there any specific timeline for this plan like will start at the end of this year 2021?

[quote=“optimise”, post:3, topic: 843955]
Alright. Case 1341751.
[/quote]
Hi @joelv @JussiKnuuttila . Any new updates for this case? I would also like to have detail explanation why it doesn’t work properly.

[quote=“optimise”, post:3, topic: 843955]
Alright. Case 1341751.
[/quote]
Hi @joelv @JussiKnuuttila . I would like update you that it’s not black screen and see nothing anymore but I still see there’s vulkan error “Error vulkan invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, “vkEnumerateInstanceVersion”) call”. Maybe it’s related to this issue (https://issuetracker.unity3d.com/issues/android-vulkan-black-screen-renders-on-android-devices-with-adreno-640-and-mali-gpus?_gl=1*jli2c2*_ga*MTQ1MDA4NTcwOC4xNjAxMjU5MDA1*_ga_1S78EFL1W5*MTYyNDQ2MTA3NC4xODIuMS4xNjI0NDYzOTYzLjYw&_ga=2.99354649.640705391.1622730107-1450085708.1601259005) I dunno. Any idea what is that? Seems like the error still need to fix if not I afraid it will still crash at some point in time at runtime.

Sorry Ive been out of the loop for a bit and am currently on vacation. The bug was triaged and it might be a general vulkan problem to be addressed by the vulkan team.

1 Like