Problems with certain devices using Vulkan API

Anyone else has problems using Vulkan API? On several devices like xiaomi 4x, lg x venture, lg v 20 and even sometimes samsung galaxy s7, google pixel XL (probably even more) The game just shows a black screen and nothing gets rendered except some UI and then it just freezes. Changing the API order from vulkan first to vulkan last, makes everything normal.

It’s happening in All Untiy version from 2018.1 onwards.Unity 5 works fine with Vulkan except of some edgecases with multiple cameras where some sprites are just shown as a glitch desaster.

Does it output any errors to the console?

Unfortunately I don’t have these devices by myself to catch the logs, it was always try and error with the users until it worked by removing Vulkan.

What’s funny is that sounds and game logic seem to work but the the game is visually not there.

I have submitted a repro project some time ago but still no response so far except that the project was too big with first submit.

Can you post the bug number here?

Case 1044679

@aleksandrk any news on this? It’s still not working with 2018.2.8f. Game just does not start with Vulkan API, GLES3 and GLES2 work normally. Just use a LG X Venture. I can see you disable Vulkan for some Andreno 4xx devices in 2018.3 but this one has 505 anyway so it won’t affect it.

We have crash on two devices (Xiaomi Mi Mix 2s, Asus Zenfone 5z) when use Vulkan in our game. Unity 2018.3.8f1

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000000dc
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build type 'Development', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
Build fingerprint: 'Xiaomi/polaris/polaris:9/PKQ1.180729.001/V10.2.1.0.PDGMIXM:user/release-keys'
Revision: '0'
pid: 16945, tid: 17006, name: UnityGfxDeviceW >>> com.company.game_goo <<<
r0 0236e800 r1 00000000 r2 00000000 r3 00008000
r4 0236e800 r5 00008000 r6 b3a014d8 r7 e941cbcf
r8 00000000 r9 b3a014d0 sl b3a01578 fp ba36e798
ip b68ecd78 sp b3a013b0 lr b66e3f41 pc b6712324 cpsr e3d2bd10

backtrace:
#00 pc 00073324 /vendor/lib/hw/vulkan.sdm845.so (QglResource::BindObjectMemory(unsigned int, QglMemObj*, unsigned long long)+11)
#01 pc 00044f3d /vendor/lib/hw/vulkan.sdm845.so (qglinternal::vkBindBufferMemory(VkDevice_T*, unsigned long long, unsigned long long, unsigned long long)+20)
#02 pc 00d4b4ac /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::AllocateBuffer(VkDevice_T*, VkPhysicalDeviceMemoryProperties const&, vk::MemoryAllocator&, unsigned long long, unsigned int)+556)
#03 pc 00d6ebd8 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::BufferManager::CreateBufferResource(unsigned int, unsigned int, unsigned int)+160)
#04 pc 00d6fe98 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::smile:ataBuffer::RecreateResource()+532)
#05 pc 00d6fc1c /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (vk::smile:ataBuffer::Initialize(void const*, vk::CommandBuffer*, vk::ScratchBuffer*, unsigned long long)+48)
#06 pc 00d35db0 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceVK::InitializeBufferInternal(GfxBuffer*, void const*, GfxUpdateBufferFlags)+104)
#07 pc 0060ffc0 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+14784)
#08 pc 00613d3c /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+68)
#09 pc 00613ccc /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::Run()+132)
#10 pc 0060c318 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+4)
#11 pc 00ac9000 /data/app/com.company.game_goo-wmLUCdRgGWsjQFkcdWMXHQ==/lib/arm/libunity.so (Thread::RunThreadWrapper(void*)+696)
#12 pc 000637f5 /system/lib/libc.so (__pthread_start(void*)+22)
#13 pc 0001e019 /system/lib/libc.so (__start_thread+24)

@Driven Did you ever find a fix for this, I’m having the same problem in 2019.1.2

@cullen_unity i didn’t find a fix, the QA sent me a message that it is fixed in 2019.2+ ONLY which means every version below will have this error “forever”, since no backport is planned as far as i know.

I don’t think it was fixed. Whatever the version you’ll try. I have tried 2019.3 alpha and still it have black screen on my Nokia 6. Doesn’t happen with UE4 Vulkan builds.

I ran into a black screen with Vulkan on Android. OpenGL ES3 works great, but Vulkan goes to a black screen. This was with Unity 2018.4.2f1 and a Samsung S10.

I saw that Unity fixed that to >2019.1. I really hope that they can bring this fix to the 2018.4 LTS ASAP.

No no, Unity didnt fix that. I just experienced the problem with Unity 2019.2.0f1! 2 days changing the setup of the whole shit and I just found out after checking the logcat from Android Studio (and now with your comments)
:rage::rage::rage::rage:

Solution: remove vulkan from the player settings, keep only OpenGL ES3 or 2.
my device: xiaomi mi9

2019-08-12 20:29:55.783 7194-7247/com.xxx.xxx E/vulkan: invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, “vkDestroyInstance”) call
2019-08-12 20:29:55.783 7194-7247/com.xxx.xxx E/vulkan: invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, “vkEnumeratePhysicalDevices”) call
2019-08-12 20:29:55.783 7194-7247/com.xxx.xxxE/vulkan: invalid vkGetInstanceProcAddr(VK_NULL_HANDLE, “vkGetPhysicalDeviceProperties”) call

2 Likes

@tiagoandr it would be nice if you could report a bug.

Do we have bug report for this or I need to create additional one?
How to report bug about Unity internals that is visible only in builds?

@JesOb I don’t think I’ve seen one. Please create a new bug report, QA will sort this out :slight_smile:
When you create one, you can describe, what’s happening and how to get to this state.

I can not describe how to get to this satet I can link apk to bug report that is in this stet and only Unity Devs can know something.

And because of this I have ask how to correct create bug report. Will linked apk will help?

It’s preferable to have source code to debug this. So the best way would be to use the built-in bug reporter.

Hello, Aleksandr.
Ok, so I’ve submitted a bug report with minimal project, steps to reproduce included. It failed to render a Unity splash screen and an empty scene on Xiaomi Mi 9, but works as expected on Samsung Galaxy S8. Its just an empty scene with camera, URP + Vulkan, no source code at all :slight_smile:
Bug id 1193349

@Silentor666 great, thanks!
we’ll take a look :slight_smile:

2 Likes