Search Issue Tracker

By Design



Found in






Issue ID




[Vulkan] [Android] Crash when calling IUnityGraphicsVulkanV2::ConfigureEvent in native plug-in



Reproduction steps:
1. Open the attached project ""
2. Change the platform to Android
3. Go to Player Settings and set the Graphics APIs to Vulkan
4. Build and Run on the Android device

Expected result: App does not crash
Actual result: App crashes

Reproducible with: 2020.3.28f1, 2021.2.11f1, 2022.1.0b7
Could not test with: 2019.4.35f1 (Multiple project errors when downgraded)

Reproducible with these devices:
----------, Huawei - (ELS-NX9), Android 10, CPU: NOT FOUND, GPU: Mali-G76
VLNQA00264, Samsung Galaxy S10+ (SM-G975F), Android 10, CPU: NOT FOUND, GPU: Mali-G76
VLNQA00078, Motorola Nexus 6 (Nexus 6), Android 7.1.1, CPU: Snapdragon 805 APQ8084AB, GPU: Adreno (TM) 420
VLNQA00176, Xiaomi Redmi 4 (Redmi 4), Android 6.0.1, CPU: Snapdragon 430 MSM8937, GPU: Adreno (TM) 505
VLNQA00414 - Galaxy Note10+ 5G (SM-N976V), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 9
VLNQA00321 - Xiaomi MI 9 (MI 9), CPU: Snapdragon 855 SM8150, GPU: Adreno 640, OS: 10.0.0
VLNQA00331 - HUAWEI P20 lite (ANE-LX1), CPU: HiSilicon Kirin 659, GPU: Mali-T830, OS: 9

User's devices that reproduced the issue:
Oculus Quest 2 (Android 10)
Xiaomi Mi 9t (Android 11)

First lines of the stack trace:
vk::PluginEventConfig, core::hash<int>, std::__ndk1::equal_to<int> >::operator[](int const&)+88) (BuildId: fb8b76ad9e7e8cb39c5f52e93f5dcc8f7d64e1b6)
#01 pc 000000000076dad4 /data/app/com.DefaultCompany.TestProj-ibjxBn_PshJ0Omyz8F313Q==/lib/arm64/ (GfxDeviceVK::ConfigurePluginEvent(int, vk::PluginEventConfig const&)+32) (BuildId: fb8b76ad9e7e8cb39c5f52e93f5dcc8f7d64e1b6)
#02 pc 0000000000236fa0 /data/app/com.DefaultCompany.TestProj-ibjxBn_PshJ0Omyz8F313Q==/lib/arm64/ (BuildId: fb8b76ad9e7e8cb39c5f52e93f5dcc8f7d64e1b6)
#03 pc 00000000000009ec /data/app/com.DefaultCompany.TestProj-ibjxBn_PshJ0Omyz8F313Q==/lib/arm64/ (ProcessDeviceEvent(UnityGfxDeviceEventType)+96) (BuildId: d23ae1a0d042a2c1b8915b9c08fbfb5fb60c2f87)
#04 pc 00000000004136c8 /data/app/com.DefaultCompany.TestProj-ibjxBn_PshJ0Omyz8F313Q==/lib/arm64/ (PluginCallbackArray1<UnityGfxDeviceEventType>::Invoke(UnityGfxDeviceEventType)+76) (BuildId: fb8b76ad9e7e8cb39c5f52e93f5dcc8f7d64e1b6)
#05 pc 00000000004135b8 /data/app/com.DefaultCompany.TestProj-ibjxBn_PshJ0Omyz8F313Q==/lib/arm64/ (PluginsSetGraphicsDevice(void*, int, GfxDeviceEventType)+84) (BuildId: fb8b76ad9e7e8cb39c5f52e93f5dcc8f7d64e1b6)

-The issue is reproduced when the Graphics APIs is set to OpenGLES3

  1. Resolution Note (2022.2.X):

    The plugin must check the renderer type using IUnityGraphics::GetRenderer before calling graphics API specific plugin API. It is first set to kUnityGfxRendererNull.

Comments (1)

  1. CodeLane_Wouter

    Feb 17, 2022 15:54

    But the issue also occurs when the appropriate renderer type, i.e. Vulkan, is used.
    I'm using Vulkan and unityInterfaces->Get<IUnityGraphicsVulkanV2>(); is returning a valid pointer, but still a crash occurs when calling ConfigureEvent.

    See also item 3 in the reproduction steps.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.