1

Hey guys I'm in desperate need of help with this problem. We have an game built and released to the Google Play Store. The game runs perfectly fine on my phone and many others. The issue is that the game crashes when loading our main scene only on a minority percentage of Android devices. This is still big a problem though.

Some devices that have the problems:

  • Samsung Galaxy A20
  • Samsung Galaxy A32
  • Oppo A53s
  • Motorola moto e
  • Redmi 9
  • Samsung Galaxy A02s
  • Samsung Galaxy A11

There is some info we've gathered that makes this even more confusing:

  • The logcat does not show any major error when crashing.
  • We added Debug.Log and Try Catch to Awake of all manager scripts We also made the player manager first in Unity's Script Execution Order These logs and Try Catch are not showing in the logcat (Scripts not even being executed?)
  • The game does not crash when only the player manager object is in the scene When we add EITHER the enemy manager OR the UI Manager the game will crash Both of these managers will draw something on the screen whereas the player manager does not show anything on the screen. (Is it an issue with graphics settings?)

We tried removing most third party SDKs but it still crashed

  • Facebook SDK
  • Firebase SDK
  • Unity Mediation Beta
  • We have a loading scene that does not crash

Other relevant info:

  • Unity 2021.2.13f
  • We tried a couple other Unity version but it still crashed.
  • Target API level 30

I'll keep adding more info the post once we gain more. If anyone has any ideas or has experienced something like this then I would really appreciate the help. Thank you in advance!

  • Could you also provide part of code where you draw stuff on the screen? What do you mean by "draw"? It is like a pen or is it loading texture? Or is it UI thing? Could you provide the part of code where you suspicious? Are there any similarities on the crashing devices? Like API level, android version, screen sizes or anything? – YGreater Aug 07 '22 at 18:19
  • Since it is released on Google play, could you send a link to the game if it is not a secret, so I can try it on my own? – YGreater Aug 07 '22 at 18:21
  • 1
    Sorry I think saying "draw" something on the screen was the wrong word. I just meant that they actually spawned objects with sprites attached to them. The Player Manager does not have anything visual on the screen. Here is the link: https://play.google.com/store/apps/details?id=com.HappyHedgehog.IdleBounceHeroes&hl=en&gl=US The android versions are varying. The screen sizes are also different. Can't seem to find out what the similarities are in the devices. – Andrew Tran Aug 07 '22 at 20:26
  • Ok. It crashes for me as well. It shows loading screen and crashes. Try removing sections of your code to see which part is causing this. And have you tried rewriting your code but this time a little different? And also try this: create new project and copy/paste all the assets to your new project and build. Maybe it won't crash then (it sometimes solves the problem). – YGreater Aug 08 '22 at 03:07
  • Also before crashing it freezes. Make sure that none of your loops are infinite – YGreater Aug 08 '22 at 03:27
  • Ok, I think it returns null error. Always check if object is accessible before accessing it. if(object!=null). Also it returns error similar to this: https://stackoverflow.com/questions/1000002/what-is-segv-maperr I think that in some devices it can't access a specific object because it returns null. So it crashes – YGreater Aug 08 '22 at 03:38
  • Hey thanks a lot for testing it for me! Where are you seeing that error? Is it showing up in the logcat for you? – Andrew Tran Aug 08 '22 at 06:39
  • I have Redmi s2 (2018 MIUI 10 Android 8). When an app crashes it asks if I want to send the MI team a crash report. There's a link "view summary" where it shows what error actually appeared. If it doesn't appear for you try turning on developer mode. Or I can send screenshots of errors as an answer if you want – YGreater Aug 08 '22 at 08:53
  • Ok I was able to copy the message and post it as an answer – YGreater Aug 08 '22 at 09:01

2 Answers2

1

With the help of @YGreater and his crash logs I was able to narrow the issue down to a graphical problem. It had to do with how some phones loaded the textures from our game. Had to rework the way that we loaded some resources and changed some references. It works now!

0

I have tested your app and I think this will be useful for you. PAY ATTENTION to

>>> com.HappyHedgehog.IdleBounceHeroes <<<
uid: 11015
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), 
fault addr 0x60
Cause: null pointer dereference

Part of the error. I think It can't get access to something or gets null.

Full error message:

java.lang.Error: FATAL EXCEPTION [main] Unity version : 2021.2.13f1 Device model : Xiaomi Redmi S2 Device fingerprint: xiaomi/ysl/ysl:8.1.0/OPM1.171019.011/V10.3.1.0.OEFMIXM:user/release-keys Build Type : Release Scripting Backend : IL2CPP ABI : armeabi-v7a Strip Engine Code : true

Caused by: java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Version '2021.2.13f1 (90b6766da538)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a' Build fingerprint: 'xiaomi/ysl/ysl:8.1.0/OPM1.171019.011/V10.3.1.0.OEFMIXM:user/release-keys' Revision: '0' ABI: 'arm' Timestamp: 2022-08-08 13:57:24+0500 pid: 28532, tid: 28604, name: UnityGfxDeviceW >>> com.HappyHedgehog.IdleBounceHeroes <<< uid: 11015 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x60 Cause: null pointer dereference r0 00000048 r1 00000000 r2 00000008 r3 40000000 r4 82386020 r5 01900100 r6 00000002 r7 80ed8c60 r8 00000001 r9 00000000 r10 00000000 r11 82379668 ip a4fa3d5c sp 77f3e4c8 lr 8a21e108 pc 8a21e108

backtrace: #00 pc 007d8108 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #01 pc 007d6cd8 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #02 pc 007d7c80 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #03 pc 007d7858 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #04 pc 00590ad0 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #05 pc 00536278 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #06 pc 0010c7f5 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #07 pc 00126821 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #08 pc 00126925 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #09 pc 004e981c /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #10 pc 00634097 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #11 pc 00634d7f /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #12 pc 0062e4a7 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #13 pc 001baa23 /data/app/com.HappyHedgehog.IdleBounceHeroes-Zj0Q3i8jZbOmRJDrVblF9Q==/lib/arm/libunity.so (BuildId: cf27a02556a0eed15af1ae5beb2cbe0adf18284a) #14 pc 00047a1f /system/lib/libc.so (__pthread_start(void*)+22) (BuildId: 455f9e023a86fc21ca8f19f464f56db2) #15 pc 0001b31d /system/lib/libc.so (__start_thread+32) (BuildId: 455f9e023a86fc21ca8f19f464f56db2)

at libunity.0x7d8108(Native Method)
at libunity.0x7d6cd8(Native Method)
at libunity.0x7d7c80(Native Method)
at libunity.0x7d7858(Native Method)
at libunity.0x590ad0(Native Method)
at libunity.0x536278(Native Method)
at libunity.0x10c7f5(Native Method)
at libunity.0x126821(Native Method)
at libunity.0x126925(Native Method)
at libunity.0x4e981c(Native Method)
at libunity.0x634097(Native Method)
at libunity.0x634d7f(Native Method)
at libunity.0x62e4a7(Native Method)
at libunity.0x1baa23(Native Method)
at libc.__pthread_start(void*)(__pthread_start:22)
at libc.__start_thread(__start_thread:32)
YGreater
  • 42
  • 1
  • 11
  • Thanks again. Could I add you on Discord or something? I've pushed some changes to our internal testing but it still crashes on our test device. I was wondering if the crash log you receive is the same with our latest internal build. – Andrew Tran Aug 08 '22 at 11:14
  • i have discord. But I live in Turkmenistan. So many sites, servers, platforms and even vpns are blocked. that's why i can't use discord until i find a working vpn. but you could upload it to google drive and send link to my email yagshygreater@gmail.com . Looking forward to help you with solving your issue. – YGreater Aug 08 '22 at 11:22
  • I just sent you a link to the internal testing. Thanks again! – Andrew Tran Aug 08 '22 at 15:33