Game crashes on user's devices


#41

Hmm, I remembered that this bug was fixed, but there is again null pointer in iap module:
java.lang.NullPointerException
com.defold.iap.IapGooglePlayActivity.onCreate
All 8 crashes on Android 5.0
Engine ver: 1.2.141

LGE LG Prime Plus 4G (mc90ds), Android 5.0
Report 1 from 8

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2331)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2391)
  at android.app.ActivityThread.access$800 (ActivityThread.java:151)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1309)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:135)
  at android.app.ActivityThread.main (ActivityThread.java:5354)
  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:908)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:703)
Caused by: java.lang.NullPointerException: 
  at com.defold.iap.IapGooglePlayActivity.onCreate (IapGooglePlayActivity.java:223)
  at android.app.Activity.performCreate (Activity.java:6021)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1105)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2284)

#42

Yes, that issue should be fixed in the next release (1.2.142) (DEF-3585)


#43

Released in 1.2.142


#44

engine version 1.2.144

java.lang.IllegalArgumentException
com.dynamo.android.DefoldActivity.onCreate

Wiko FEVER (l5460), Android 6.0
1 / 2

java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2572)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2654)
  at android.app.ActivityThread.-wrap11 (ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1488)
  at android.os.Handler.dispatchMessage (Handler.java:111)
  at android.os.Looper.loop (Looper.java:207)
  at android.app.ActivityThread.main (ActivityThread.java:5728)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:789)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:679)
Caused by: java.lang.IllegalArgumentException: 
  at android.app.NativeActivity.onCreate (NativeActivity.java:170)
  at com.dynamo.android.DefoldActivity.onCreate (DefoldActivity.java:205)
  at android.app.Activity.performCreate (Activity.java:6376)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1113)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2519)

#45

I have the same crashes in the game without NEs (Solitaire)



#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?


#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


#48

Wiko FEVER (l5460), Android 6.0


#49

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


#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?


#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.


#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.


#53

Solved in 1.2.145