Game crashes on user's devices (SOLVED)

For comparison reason list of all crashes from previous release on Android (Aug 28, engine ver:1.2.135) for the last 60 days:

java.lang.NullPointerException
com.defold.iap.IapGooglePlayActivity.onCreate

Android 5.1	4	100.0%
TCT (Alcatel) 8050E (Pixi4-6_3G), Android 5.1
Report 1 of 4

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2521)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2601)
  at android.app.ActivityThread.access$800 (ActivityThread.java:178)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1470)
  at android.os.Handler.dispatchMessage (Handler.java:111)
  at android.os.Looper.loop (Looper.java:194)
  at android.app.ActivityThread.main (ActivityThread.java:5637)
  at java.lang.reflect.Method.invoke (Native Method)
  at java.lang.reflect.Method.invoke (Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:960)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)
Caused by: java.lang.NullPointerException: 
  at com.defold.iap.IapGooglePlayActivity.onCreate (IapGooglePlayActivity.java:223)
  at android.app.Activity.performCreate (Activity.java:6100)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1112)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2468)
1 Like

1.2.135 ± stable
1.2.137 - :sob:
1.2.139 - hot fix, ± stable

2018-11-01_11-18-47

1 Like

Added DEF-3585 for this. It should land in 1.2.143 (in about two weeks)

2 Likes

As for the other callstacks (tgkill/abort), they all look mostly the same:

000000000008536c	Java_com_defold_iac_IACJNI_onInvocation
000000000016a190	Java_com_dynamo_android_DefoldActivity_nativeOnActivityResult

Now, as to why it fails there, I’m not sure yet. That code is quite small, and the edge cases seems taken care of.

Do you happen to have any logcat from such a crash? It might give a clue.

So, probably I have the same problems? On the Family Age project

My last builds was on 1.2.136, builded with Bob.
But got a more tgkill errors than usual then build after 26.10. Prev build was 18.10, but there is not too much errors. (It is strange, probably our fault. The players/install count not very different on this dates)

135 build have tgkill errors too

The tgkill error:

   #00  pc 0000000000041f50  /system/lib/libc.so (tgkill+12)
   #01  pc 0000000000040fa1  /system/lib/libc.so (pthread_kill+32)
   #02  pc 000000000001c88b  /system/lib/libc.so (raise+10)
   #03  pc 0000000000019a3d  /system/lib/libc.so (__libc_android_abort+34)
   #04  pc 00000000000175ec  /system/lib/libc.so (abort+4)
   #05  pc 000000000001b49f  /system/lib/libc.so (__libc_fatal+16)
   #06  pc 0000000000019ac5  /system/lib/libc.so (__assert2+20)
   #07  pc 0000000000049818  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #08  pc 000000000004aefc  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #09  pc 0000000000038824  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #10  pc 0000000000060444  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #11  pc 0000000000038824  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #12  pc 000000000001d588  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #13  pc 000000000008bd9c  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #14  pc 000000000001fb4c  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #15  pc 000000000001fbf0  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #16  pc 000000000001c168  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #17  pc 000000000001c0bc  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #18  pc 000000000015da94  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #19  pc 000000000001c0e4  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #20  pc 000000000015e36c  /data/app/com.test.familyage-2/lib/arm/libFamily_Age.so
   #21  pc 00000000000408a3  /system/lib/libc.so (_ZL15__pthread_startPv+30)
   #22  pc 000000000001a0c1  /system/lib/libc.so (__start_thread+6)

The abort error

  #00  pc 000000000001a518  /system/lib/libc.so (abort+63)
  #01  pc 000000000001a9e9  /system/lib/libc.so (__assert2+20)
  #02  pc 0000000000049818  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #03  pc 000000000004aefc  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #04  pc 0000000000038824  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #05  pc 0000000000060444  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #06  pc 0000000000038824  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #07  pc 000000000001d588  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #08  pc 000000000008bd9c  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #09  pc 000000000001fb4c  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #10  pc 000000000001fbf0  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #11  pc 000000000001c168  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #12  pc 000000000001c0bc  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #13  pc 000000000015da94  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #14  pc 000000000001c0e4  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #15  pc 000000000015e36c  /data/app/com.test.familyage-dFCVGRwuh2nZLUX9iKrGDw==/lib/arm/libFamily_Age.so
  #16  pc 00000000000487ef  /system/lib/libc.so (__pthread_start(void*)+22)
  #17  pc 000000000001b34d  /system/lib/libc.so (__start_thread+32)

libFamily_Age.so: https://drive.google.com/open?id=1yhaARkep0mFjPQNFzNU5ks6kMtlWra0e

Also I have about 1 game crash per day (logs, get from crash.* module).
If I can help with more information, write me on slack

5 Likes

nope :frowning:
It’s all happened on users devices, so, I need a way to register this issues.

Also I found this topic:
Best way to handle crash reporting on device?

I use this module (Google Analytics) from @britzl, but there is no any mentions about crashes in GA console:

:thinking:

UPD: i didn’t enable this feature, arghhh

ga.get_default_tracker().enable_crash_reporting(true)
4 Likes

1.2.140 better than 138, but still has a lot of crashes (
But I am not sure, because after 1.2.140 we paused our UA company

I would recommend going with 1.2.141 directly since it only contains a hot fix of a font crash issue introduced in 1.2.140.

2 Likes

I’ll try today later

1 Like

yeah, somehow in various chats folks sneakily complain about Defold .135 being the last stable. But it is so hard to inspire them go post something here, because “something crashes somewhere and we don’t know where and what”.

Defold users, we do need your bugreports and do value your opinions, even if you don’t know the root of the problem,

8 Likes

This night I’ve updated build at stores with 1.2.141 and got first reports.

java.lang.ClassNotFoundException
dalvik.system.BaseDexClassLoader.findClass

and description sorted by Android version:

|Android 6.0|3|42.9%|
|Android 4.4|3|42.9%|
|Android 5.1|1|14.3%|

Lenovo TB3-710I (TB3-710I), Android 5.1

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:2804)
  at android.app.ActivityThread.access$1700 (ActivityThread.java:178)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1547)
  at android.os.Handler.dispatchMessage (Handler.java:111)
  at android.os.Looper.loop (Looper.java:194)
  at android.app.ActivityThread.main (ActivityThread.java:5637)
  at java.lang.reflect.Method.invoke (Native Method)
  at java.lang.reflect.Method.invoke (Method.java:372)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:960)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:755)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:511)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:469)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:2799)
|Android 7.0|5|83.3%|
|Android 7.1|1|16.7%|

Huawei P8 lite 2017 (HWPRA-H), Android 7.0
Report 1

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3158)
  at android.app.ActivityThread.-wrap18 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1653)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:156)
  at android.app.ActivityThread.main (ActivityThread.java:6523)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:380)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3153)
|Android 8.1|3|75.0%|
|Android 8.0|1|25.0%|

OnePlus OnePlus3T (OnePlus3T), Android 8.0
Report 1 of 4

java.lang.RuntimeException: 
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3390)
  at android.app.ActivityThread.-wrap17 (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1772)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6798)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:767)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:93)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
  at android.app.ActivityThread.handleReceiver (ActivityThread.java:3385)

Also in this build I enabled the crash reports for Google Analytic. Most of them is totally uninformed and looks like a

#0 0xe3014724 #1 0xe2ff3aac #2 0xe2ff3f4c #3 0xe2f701c4 #4 0xe2fdc4b4 #5 0xe2f72744 #6 0xe2f727e8 #7 0xe2f6ed60 #8 0xe2f6ecb4 #9 0xe30a79b4 #10 0xe2f6ecdc #11 0xe30a828c #12 0xf72f6feb #13 0xf72f501f

but someone is much more seem to be a dump:

0 dmengine 0x000000010f8149fa _ZN7dmCrash7OnCrashEi + 74 1 libsystem_platform.dylib 0x00007fff6ad39f5a _sigtramp + 26 2 libsystem_malloc.dylib 0x00007fff6ac61384 tiny_malloc_from_free_list + 431 3 dmengine 0x000000010f5c9d98 _ZN12dmGameObject16CreateComponentsEPNS_10CollectionEPNS_8InstanceE + 392 4 dmengine 0x000000010f5daa96 _ZN12dmGameObject19ResCollectionCreateERKN10dmResource20ResourceCreateParamsE + 1174 5 dmengine 0x000000010f5e2475 _ZN10dmResource3GetEPNS_16SResourceFactoryEPKcPPv + 2501 6 dmengine 0x000000010f5ee448 _ZN12dmGameSystem28CompCollectionProxyOnMessageERKN12dmGameObject24ComponentOnMessageParamsE + 600 7 dmengine 0x000000010f5cf50e _ZN12dmGameObject24DispatchMessagesFunctionEPN9dmMessage7MessageEPv + 2174 8 dmengine 0x000000010f777e64 _ZN9dmMessage16InternalDispatchEyPFvPNS_7MessageEPvES2_b + 436 9 dmengine 0x000000010f5cd7f1 _ZN12dmGameObject16DispatchMessagesEPNS_10CollectionEPyj + 257 10 dmengine 0x000000010f5cca7a _ZN12dmGameObject4InitEPNS_10CollectionE + 394 11 dmengine 0x000000010f5bd802 _ZN8dmEngine4InitEPNS_6EngineEiPPc + 6962 12 dmengine 0x000000010f5bf1b0 _ZN8dmEngineL7InitRunEPN15dmEngineService13EngineServiceEiPPcPFvPNS_6EngineEPvES9_S7_ + 128 13 dmengine 0x000000010f5bf06f _ZN8dmEngine6LaunchEiPPcPFvPNS_6EngineEPvES6_S4_ + 111 14 dmengine 0x000000010f5bf316 _Z11engine_mainiPPc + 118 15 dmengine 0x000000010f5bb404 start + 52 16 ??? 0x0000000000000001 0x0 + 1
0 LookYourLoot 0x001d5619 LookYourLoot + 1488409 1 libsystem_platform.dylib 0x1c8e326d _sigtramp + 24 2 LookYourLoot 0x0012c769 LookYourLoot + 796521 3 LookYourLoot 0x0012c769 LookYourLoot + 796521 4 LookYourLoot 0x0007354b LookYourLoot + 38219 5 LookYourLoot 0x000733c3 LookYourLoot + 37827 6 LookYourLoot 0x00073b2b LookYourLoot + 39723 7 GameCenterFoundation 0x2a83c3cb <redacted> + 84 8 libdispatch.dylib 0x1c731097 <redacted> + 10 9 libdispatch.dylib 0x1c731083 <redacted> + 22 10 libdispatch.dylib 0x1c7355fd _dispatch_main_queue_callback_4CF + 890 11 CoreFoundation 0x1d045a17 <redacted> + 8 12 CoreFoundation 0x1d043cff <redacted> + 1422 13 CoreFoundation 0x1cf93073 CFRunLoopRunSpecific + 486 14 CoreFoundation 0x1cf92e81 CFRunLoopRunInMode + 104 15 LookYourLoot 0x001c37a9 LookYourLoot + 1415081 16 LookYourLoot 0x000f67f3 LookYourLoot + 575475 17 LookYourLoot 0x00070ac9 LookYourLoot + 27337 18 LookYourLoot 0x000f63a3 LookYourLoot + 574371 19 LookYourLoot 0x00071107 LookYourLoot + 28935 20 LookYourLoot 0x00070ff1 LookYourLoot + 28657 21 LookYourLoot 0x000711e3 LookYourLoot + 29155 22 libdyld.dylib 0x1c75e50b <redacted> + 2
0 LookYourLoot 0x0021f619 LookYourLoot + 1488409 1 libsystem_platform.dylib 0x1d150259 _sigtramp + 24 2 LookYourLoot 0x001cf047 LookYourLoot + 1159239 3 LookYourLoot 0x000e85b7 LookYourLoot + 214455 4 LookYourLoot 0x000baab9 LookYourLoot + 27321 5 LookYourLoot 0x001403a3 LookYourLoot + 574371 6 LookYourLoot 0x000bb107 LookYourLoot + 28935 7 LookYourLoot 0x000baff1 LookYourLoot + 28657 8 LookYourLoot 0x000bb1e3 LookYourLoot + 29155 9 libdyld.dylib 0x1cfca4eb <redacted> + 2
5 Likes

Hmm, not sure what class it complains about? If that information printed somewhere?
Also, what version did you have before 1.2.141? (Trying to figure out what Android related stuff we’ve changed recently)

Good question! )

1.2.139

1 Like

Have you been able to reproduce it yourself locally? I would love to watch the log file, perhaps it can reveal what class it doesn’t find.

1.2.140:


1.2.141:

2 Likes

@Dragosha: I just downloaded Look You Loot, and I got the same issue! Yay! (or something :/)
“Didn’t find class “com.defold.adtruth.InstallReceiver””
It’s part of an internal extension that we removed this sprint.
Could it be that you have a custom AndroidManifest.xml that references this class?
If so, you should be able to remove it and try again?
Did it it work for you on your phone?

@agulev: Could this be the issue for you as well?

1 Like

yes, I have the same crashes and old manifest.

Do you have a custom AndroidManifest.xml?
With “com.defold.adtruth.InstallReceiver” in it?

yes, I use custom AndroidManifest.xml (some NE required it) with:

<service android:name="com.defold.adtruth.InstallReceiver"/>
        <receiver
            android:name="com.defold.adtruth.InstallReceiver"
            android:exported="true">
          <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
          </intent-filter>
        </receiver>

Seems, I need to remove this strings?

1 Like

Yes, I’m sorry for this hickup. We didn’t really think of the custom manifests you are using.

You can compare with the manifest in the builtins/ folder, where we have removed it.

6 Likes