DiligentCore icon indicating copy to clipboard operation
DiligentCore copied to clipboard

[Android emulator] Crash initializing RenderDeviceVk

Open PauGuillamon opened this issue 3 months ago • 5 comments

There seems to be a crash when initializing Diligent on an Android emulator, it happens here: https://github.com/DiligentGraphics/DiligentCore/blob/API256011/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp#L1424-L1427

I've linked to the tag API256011 for reference but it also happens on latest master branch, commit 454e7ffcd. I can reproduce it in both my own sample app using DiligentCore and through any of the samples in DiligentSample.

I am building on a MacBook Pro M2 Max with Sequoia 15.7.2, and I have verified it works fine on a Windows x86_64 machine. So I am assuming it has to do somehow with running Android's native Vulkan on an emulator running on Metal on Apple silicon, but I might be wrong. I'll probably be able to test it on an intel MacBook tomorrow.

I can do other tests if you tell me what to test specifically :)

PauGuillamon avatar Nov 25 '25 17:11 PauGuillamon

Is there anything in the log cat? Crash call stack? If it runs fine on emulator on Windows x86_64, that strongly suggests there is something wrong with the emulator. It has been known for issues with GLES/Vulkan.

TheMostDiligent avatar Nov 25 '25 18:11 TheMostDiligent

Nothing useful in the log cat besides Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR). SEGV_MAPERR: address not mapped to object. Some wrong dereferencing?

I found the emulators on my two machines were using configured with Android API versions. It turns out it fails starting on Android API level 36, and it fails on both macOS and Windows.

It has been known for issues with GLES/Vulkan.

BTW I have GLES apps working fine on that API level.

PauGuillamon avatar Nov 26 '25 10:11 PauGuillamon

It turns out it fails starting on Android API level 36, and it fails on both macOS and Windows.

Do you mean that it works fine on both macOS and Windows with API level < 36?

TheMostDiligent avatar Nov 26 '25 15:11 TheMostDiligent

Exactly, it works fine on both macOS and Windows with API level < 36, I tested 34 and 35 using the Shadows sample in DiligentSamples. I also tested API level 36.1 and it also failed. Sorry for not making that clear.

PauGuillamon avatar Nov 26 '25 15:11 PauGuillamon

I don't know honestly. I can't think of any Vulkan-related backwards-incompatible changes in 36+

TheMostDiligent avatar Nov 26 '25 17:11 TheMostDiligent