Game crashes on user's devices (SOLVED)

#46

I don’t have source code access at the moment but @Johan_Beck-Noren should be able to check tomorrow what changes (if any) could cause this problem.

Anything in particular about the devices? Android OS versions?

0 Likes

#47

In my both my cases it was Android 6.0 (ZTE BLADE V7 (P653A10) and Cubot MAX (x6069_cubot_5365u))

UPD:
Looks like android 6 can’t find libname path for some reason https://android.googlesource.com/platform/frameworks/base/+/android-cts-6.0_r32/core/java/android/app/NativeActivity.java#170

1 Like

#48

Wiko FEVER (l5460), Android 6.0

0 Likes

#49

Thanks. Added DEF-3688 to our sprint planning today.

4 Likes

#50

Hmm, strange crash is catched

java.lang.ArrayIndexOutOfBoundsException
com.dynamo.android.DefoldActivity$1.run
in Google Play Services, but game don not use gms extension.

Also, what is “ProGuard deobfuscation file”? Is it possible to build this one with Defold?

0 Likes

#51

We get advertising info at start on Android so that we can populate some of the fields in sys.get_sys_info(). The code looks like this:

    new Thread(new Runnable() {
        public void run() {
            try {
                AdvertisingIdClient.Info info = AdvertisingIdClient.getAdvertisingIdInfo(self);
                self.setAdInfo(info.getId(), info.isLimitAdTrackingEnabled());
            } catch (java.io.IOException e) {
                self.setAdInfo("", false);
            } catch (GooglePlayServicesNotAvailableException e) {
                self.setAdInfo("", false);
            } catch (GooglePlayServicesRepairableException e) {
                self.setAdInfo("", false);
            }
        }
    }).start();

It seems like it’s crashing somewhere inside the GPS code. We should probably do a generic try-catch just to make sure we catch everything. Created DEF-3692.

ProGuard is a tool for obfuscating and/or minimising Java code. We do not use it but it’s in our roadmap to add support for it (or the new R8 tool from Google) to reduce APK size.

4 Likes

#52

After some investigation this is probably caused by the device looking for a (non-existent) 64-bit engine lib in the APK. Looking at the chipsets on affected devices, they should support the lib we currently ship (armeabi-v7a) but for some reason they don’t.

Instead of digging more into this specific issue we decided to start work on DEF-3459 adding Android 64-bit support. It’s on our roadmap for 2019 and is due anyway. Once in place, it should solve the issue in this thread as well.

7 Likes

java.lang.ClassCastException: cyh cannot be cast to dalvik.system.BaseDexClassLoader
#53

Solved in 1.2.145

1 Like

#54

Solved in 1.2.153

Should work fine in 1.2.153 (if you include Android 64bit)

1 Like

#55

I just uploaded a new build (made bundle in 1.2.154, 32 and 64-bit) into the Google Store, so, will collect a new statistic.

5 Likes

#56

Found new crash reports in Google Console for this build. May be interesting:

28 May 22:15 on app version 67
Huawei Honor 10 (HWCOL), Android 9
Report 1 of 3

java.lang.NullPointerException: 
  at com.defold.iap.IapGooglePlay.handleMessage (IapGooglePlay.java:476)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:207)
  at android.app.ActivityThread.main (ActivityThread.java:7470)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:524)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:958)

Other reports are available here (with build.zip files for this release):
https://drive.google.com/drive/folders/19VjTFMiJPvcPLZTB03jrL4yNJbaQp6w3?usp=sharing

2 Likes

[ANR] Input dispatching timed out. Discuss thread (SOLVED)
#57

I’ve made a bundle with default minimum Android SDK version (16) in last update and have ~70 crashes with 11 impacted users with an old devices:

Android 4.4 63 90.0%
Android 4.2 7 10.0%
A536 (A536) 17 24.3%
Galaxy Tab E 9.6 (gtel3g) 10 14.3%
Galaxy Tab3 Lite 7.0 (goyavewifi) 9 12.9%
HT7071MG 8 11.4%
Galaxy Tab2 7.0 (espressorf) 7 10.0%
Galaxy S3 Neo (s3ve3gds) 5 7.1%
Galaxy S4 Mini (serrano3g) 4 5.7%
Galaxy Tab Pro 10.1 (picassowifi) 4 5.7%
Unite 3 (Q379) 3 4.3%
Hol-U10 (HWHol-U) 2 2.9%
Galaxy Core Prime (core33g) 1 1.4%

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

Today, 17:12 on app version 78
Samsung Galaxy Tab2 7.0 (espressorf), Android 4.2
Report 1

java.lang.RuntimeException: 
  at android.app.LoadedApk.makeApplication (LoadedApk.java:504)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:4525)
  at android.app.ActivityThread.access$1400 (ActivityThread.java:150)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1340)
  at android.os.Handler.dispatchMessage (Handler.java:99)
  at android.os.Looper.loop (Looper.java:137)
  at android.app.ActivityThread.main (ActivityThread.java:5279)
  at java.lang.reflect.Method.invokeNative (Native Method)
  at java.lang.reflect.Method.invoke (Method.java:511)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1102)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:869)
  at dalvik.system.NativeStart.main (Native Method)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:65)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:501)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:461)
  at android.app.Instrumentation.newApplication (Instrumentation.java:985)
  at android.app.LoadedApk.makeApplication (LoadedApk.java:499)

As I understand 4.2 Android (17 SDK) should work, what can be wrong?
Previosly I bundled with 14 minimum SDK.

0 Likes

#58

Does it say what class it cannot load?

0 Likes

#59

Google console? nope, it doesn’t show this important info.

1 Like

#60

We will investigate and see if we see similar issues in King games. @AGulev have you seen this in your games?

0 Likes

#61

I’ve charged my old phone Samsung GT-I9105 Android 4.2.2 and try to run the game.

Logcat:

09-20 11:56:18.199 8240-8240/? D/dalvikvm: Late-enabling CheckJNI
09-20 11:56:18.479 8240-8240/com.dragosha.hamster D/AndroidRuntime: Shutting down VM
09-20 11:56:18.479 8240-8240/com.dragosha.hamster W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40e2c930)
09-20 11:56:18.489 8240-8240/com.dragosha.hamster E/AndroidRuntime: FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to instantiate application android.support.multidex.MultiDexApplication: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: /data/app/com.dragosha.hamster-1.apk
        at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4529)
        at android.app.ActivityThread.access$1400(ActivityThread.java:150)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5283)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
        at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication" on path: /data/app/com.dragosha.hamster-1.apk
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
        at android.app.Instrumentation.newApplication(Instrumentation.java:985)
        at android.app.LoadedApk.makeApplication(LoadedApk.java:499)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4529) 
        at android.app.ActivityThread.access$1400(ActivityThread.java:150) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340) 
        at android.os.Handler.dispatchMessage(Handler.java:99) 
        at android.os.Looper.loop(Looper.java:137) 
        at android.app.ActivityThread.main(ActivityThread.java:5283) 
        at java.lang.reflect.Method.invokeNative(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:511) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 
        at dalvik.system.NativeStart.main(Native Method)

android.support.multidex.MultiDexApplication

3 Likes

#62

Thanks. We’re investigating this.

1 Like

#63

HI @Dragosha!
I have published a fix on our test server, to make sure the multidex-related classes always end up in the first classes.dex (your package has two dex files).

Point the editor or bob to this build server to try it out:
https://build-stage.defold.com/

4 Likes

#64

Seems to work fine on my Samsung GT-I9105 Android 4.2.2 . Thanks!

4 Likes

#65

Solved in 1.2.163

1 Like