I'm making a game with Unity.
It works fine on many models, but the following error message occurs on several models and the application does not start.
This is my first development, so I don't know much about Android, so I don't know what caused the error.
I was able to make errors while trying the actual game, but this is the log I got from Firebase.
After that, I tried the same model with TestLab of Firebase and DeviceFarm of AWS, and I was able to confirm that the error.(I didn't know how to view the Logcat at that time, and I didn't know where the error was (there were a lot of errors, but not all of them were directly linked to "apps don't start")
If anyone knows the cause of the error message below, please let me know.
Thank you for your cooperation.
Fatal Exception: java.lang.Error: FATAL EXCEPTION [main]
Unity version: 2019.3.14 f1
Device model: samsung SM-A505U1
Device fingerprint: samsung/a50ue/a50:9/PPR 1.180610.011/A505U1 UEU2ASH6:user/release-keys
Caused by java.lang.Error: ****************************************************************************************************
Version '2019.3.14 f1(2b330bf6d2d8)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
Build fingerprint: 'Samsung/a50ue/a50:9/PPR1.180610.011/A505U1 UEU2ASH6: user/release-keys'
Revision: '10'
ABI: 'arm64'
Timestamp: 2021-02-28 17:20:45 + 0900
pid:5318, tid:5495, name: Vulkan Submissi > > "Game Name" <<
uid —12217
signal11(SIGSEGV), code1(SEGV_MAPERR), fault addr0x0
Cause—null pointer reference
x0000007752d74ce8 x100000076ce00000000 x2fffff893200000000 x3000000775ceee1dc
x400000076dadb9f80 x500000076de2f16c0 x6000000000000000100 x700000000000006
x800000000000000000000x9ffff89320000000000x10000000000087c040x11000000000000000000000000000000000000
x12000000000000000100 x13000000000000000006 x1400000000000000000000000000000002
x16000000775299da78 x17000077f209 dcf0 x180000000000000038 x19fffff8932000000000000
x20000000076ce00000000x21000000000000000000000000000000000000000000000000000000000000000000000000000000
x24000076de2f15f0 x2500000000000028 x260000007752d74690 x27fffff89320000000000
x2800000076eb3e1908 x2900000076b779238
sp00000076e71fb260 lr000000775ceee2f0pc000000775d154438
backtrace:
00pc000000000070f438/vendor/lib64/egl/libGLES_mali.so (BuildId: 4b6cc22350e545f73f0ae424a8499b6)
01 pc00000000004a92ec/vendor/lib64/egl/libGLES_mali.so (BuildId:4b6cc22350e545f73f0ae424a8499b6)
02pc00000000004a91f0/vendor/lib64/egl/libGLES_mali.so (BuildId: 4b6cc22350e545f73f0ae424a8499b6)
03pc000000000073f50c/data/app/"Game Name" - 1e6xwERrV29wlkDZJROczA==/lib/arm64/libunity.so (BuildId:532d8d524ea517bb96c77e9bf471ec218a2a798d)
04 pc0000000073e530/data/app/"Game Name" - 1e6xwERrV29wlkDZJROCzA==/lib/arm64/libunity.so (BuildId:532d8d524ea517bb96c77e9bf471ec218a798d)
05 pc000000000073d6c0/data/app/"Game Name" -<truncated:514 chars>
at libGLES_mali.0x70f438()
at libGLES_mali.0x4a92ec()
at libGLES_mali.vkFlushMappedMemoryRanges(vkFlushMappedMemoryRanges:20)
at libunity.0x73f50c()
at libunity.0x73e530()
at libunity.0x73d6c0()
at libunity.0x586900()
at libc.__pthread_start(void*) (_pthread_start:196)
at libc.__start_thread(__start_thread:68)
First of all, what you can see from the stack trace is
In the call to vkFlushMappedMemoryRanges
, you are segfaulting with null pointer reference inside Mali's Vulkan driver.
There is no source code for the engine part of Unity, so
I think there are some difficulties in judging that
It seems that all of the listed devices are loaded with Mali, but is it not happening on Adreno's?
However, generally speaking, the implementation of the Vulkan driver in the Android device, especially when Vulkan 1.0 was started to work with 7.0 and so on, is well known for being relatively buggy and hard to trust.
In addition, it may be difficult to update the graphics driver of Android devices.
(Because GPU vendors need to update, device manufacturers need to handle it, and carriers deliver it with Android updates)
)
For apps by large developers like their own engines, enable Vulkan with restrictions such as from Android 7.1 devices, or from Vulkan 1.1 devices, and
If it doesn't apply, use GLES3. [roblox-graphics-apis-2019] is the current situation.
Especially the Galaxy S6 is quite old.
Also, it is possible that the version of the Vulkan driver may vary depending on the user's update status.
I'm not familiar with Unity, but do I have to use Vulkan for this game?
Would it be possible to create an APK with only GLES3 as the backend graphics API?
If you really want to go with Vulkan, you may need to limit the distribution depending on the device and its Android version.
© 2024 OneMinuteCode. All rights reserved.