mob-sakai / SoftMaskForUGUI

Enhance Unity UI (uGUI) with advanced soft-masking features to create more visually appealing effects!
https://github.com/mob-sakai/SoftMaskForUGUI
MIT License
1.97k stars 261 forks source link

[v1] SoftMaskable Image not rendered on specific Android device #116

Closed novavision closed 1 month ago

novavision commented 3 years ago

Describe the bug We just get a bug report from one of our user about missing icons textures, everywhere, where SoftMask is used.

To Reproduce We can't reproduce it on our devices, but this user device is: ZenFone 5 (ZE620KL) (ASUS_X00QD) Android 9.0 (Pie), ZenUI 5 Chipset | Qualcomm SDM636 Snapdragon 636 (14 nm) CPU | Octa-core (4x1.8 GHz Kryo 260 Gold & 4x1.6 GHz Kryo 260 Silver) GPU | Adreno 509

Expected behavior A clear and concise description of what you expected to happen.

Screenshots example example2

Environment (please complete the following information):

Additional context Everything works well in iOS devices, and out test Android devices. For now only ZenFone 5 user reported the issue.

mob-sakai commented 3 years ago

@novavision Thank you for your reporting! Unfortunately, I don't have that device...

mob-sakai commented 3 years ago

Are you using Default-UI shader for the icons?

novavision commented 3 years ago

I am not 100%, but most likely there is some issue with Vulkan => Adreno 509. Not many devices use Adreno 509, I also don't have any of this list but maybe you can give some advice where to start searching the reason?

mob-sakai commented 3 years ago

For example, downgrade the "Graphic API" in the project settings to "OpenGL ES 3.0".

bruce-alien commented 2 years ago

Did you enable the camera HDR option?

Yaski commented 1 year ago

We have the same issue.

On these devices app crashes sometimes with SoftMask:

Motorola g7 play, Xiaomi redmi note 5, Lenovo tab p11, Redmi 5 Plus - most of them Adreno 506-509, one is Adreno 610

Redmi Note 8T - not crashes it is Adreno 610.

On samsung s21, lg k61 there is no crash but there is an error:

allocation 0x0xc000000000000000 already registered @ ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:233 size 4096; now calling from ./Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:233 size 4096?

Coffee.UISoftMask.SoftMask:UpdateMaskTexture()
Coffee.UISoftMask.SoftMask:UpdateMaskTextures()
UnityEngine.UI.ScrollRect:SetNormalizedPosition(Single, Int32)

And with crash on Android devices we get this stack trace

Fatal Exception: Tombstone :  Version '2021.3.8f1 (b30333d56e81)', Build type 'Development', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
Build fingerprint: 'xiaomi/whyred/whyred:9/PKQ1.180904.001/V11.0.3.0.PEIMIXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2022-09-27 12:27:21+0300
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    x0  00000007f2c60000  x1  0000000000000000  x2  0000000000360150  x3  00000007f2c60000
    x4  0000000000360150  x5  00000007f2fc0150  x6  0000000000000002  x7  0000000000100900
    x8  000000000000000c  x9  0000000000000000  x10 000000000000006c  x11 0000000000000000
    x12 000000009d03800a  x13 0000000000000000  x14 0000000000008004  x15 000000780db15400
    x16 00000078da9b3838  x17 000000796ed77f70  x18 00000007f2c60000  x19 000000780cffa980
    x20 0000000000000000  x21 0000000000000000  x22 000000780cfe5d08  x23 0000007743fdcccc
    x24 000000000000002c  x25 0000000000360150  x26 0000000000000000  x27 0000000000000002
    x28 0000000000000000  x29 000000780b5fec00
    sp  000000780b5feb40  lr  00000078da6f8d48  pc  000000796ed78058

#00 pc 0x1e058 libc.so (memcpy + 232)
#01 pc 0x1d0d44 libGLESv2_adreno.so ((EsxVertexArrayObject::UpdateInternalVbos(EsxDrawDescriptor const*, unsigned int, EsxAttributeDesc const*) + 1644)
#02 pc 0x3374f4 libGLESv2_adreno.so ((A5xVertexArrayObject::CalcVfdRegs(EsxDrawDescriptor const*, A5xVfdRegs*, int) + 892)
#03 pc 0x34ff54 libGLESv2_adreno.so ((A5xContext::ValidateState(EsxDrawDescriptor const*) + 1212)
#04 pc 0x33c820 libGLESv2_adreno.so ((A5xContext::HwValidateGfxState(EsxDrawDescriptor const*) + 16)
#05 pc 0x115158 libGLESv2_adreno.so ((EsxContext::ValidateGfxState(EsxDrawDescriptor const*) + 1968)
#06 pc 0x10c644 libGLESv2_adreno.so ((EsxContext::DrawElementsInstanced(EsxPrimType, unsigned int, EsxPixType, void const*, unsigned int, int) + 972)
#07 pc 0x897d54 libunity.so (GfxDeviceGLES::DrawBufferRanges(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long, int) + 620)
#08 pc 0x7a60bc libunity.so (SinglePassStereoSupportExt::DrawBuffersStereo(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*, unsigned long) + 168)
#09 pc 0x89e130 libunity.so (GfxDeviceGLES::DrawBuffers(GfxBuffer*, unsigned int, GfxBuffer* const*, unsigned int const*, int, DrawBuffersRange const*, int, VertexDeclaration*) + 380)
#10 pc 0x9f8428 libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&) + 30924)
#11 pc 0x9f894c libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&) + 44)
#12 pc 0x9f8914 libunity.so (GfxDeviceWorker::Run() + 140)
#13 pc 0x9f0944 libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*) + 4)
#14 pc 0x370c20 libunity.so (Thread::RunThreadWrapper(void*) + 796)
#15 pc 0x90328 libc.so (__pthread_start(void*) + 36)
#16 pc 0x23a28 libc.so (__start_thread + 68)

@mob-sakai maybe it helps

Yaski commented 1 year ago

This bug happens only when app is opened from inactive state and canvas refresh occurs

mob-sakai commented 1 month ago

Please try v2: https://github.com/mob-sakai/SoftMaskForUGUI/releases/tag/v2.0.0