简体   繁体   中英

Game Crashing When Loading Main Scene On Some Android Devices

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!

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.HappyHedgeh og.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)

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM