Crash in GPG (SdkboxGPGAuthentication)

Crash in GPG (SdkboxGPGAuthentication)
0

A new crash seems to have appeared in the GPG component of SDKBox as of early July (based on our crash reporting).
It isn’t a 100% crash but seems to be occurring on an increasing amount of devices.

The stack trace is as follows: (with a variant on line 441 and 442

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String android.net.Uri.toString()’ on a null object reference
at com.sdkbox.plugin.SdkboxGPGAuthentication$4.onSuccess + 441(SdkboxGPGAuthentication.java:441)
at com.sdkbox.plugin.SdkboxGPGAuthentication$4.onSuccess + 431(SdkboxGPGAuthentication.java:431)
at com.google.android.gms.tasks.zzn.run + 4(:4)
at android.os.Handler.handleCallback + 754(Handler.java:754)
at android.os.Handler.dispatchMessage + 95(Handler.java:95)
at android.os.Looper.loop + 163(Looper.java:163)
at android.app.ActivityThread.main + 6238(ActivityThread.java:6238)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run + 933(ZygoteInit.java:933)
at com.android.internal.os.ZygoteInit.main + 823(ZygoteInit.java:823)

Could someone please take a look at this? Thanks!

maybe one of the two is null:

                            _signInAccountData.put( "icon_image_uri", player.getIconImageUri().toString() );
                            _signInAccountData.put( "hires_image_uri", player.getHiResImageUri().toString() );

https://developers.google.com/android/reference/com/google/android/gms/games/Player.html#getHiResImageUri()

  • The image URI for the player’s hi-res profile image, or null if the player has none.

Sure, looks like the spec says it can be null.
Can you please release a fix or patch to handle the null case?

PluginSdkboxPlay.jar.zip (79.9 KB)

null check.

Thanks, what’s the safety of hot-swapping this into an existing installation? Does this require a certain version of the core .jar?
I believe all other plugins in our project are currently at 2.4.3

I checked 2.5.0.0 changelog, it’s safe to pluginsdkboxplay.jar .

1 Like

Hi,
I encountered the same issue, it would be great to have the check for null fix in the 2.5.1 :slight_smile:

yes, the fix has been in our staging server.

Thanks for the reply, and great :slight_smile: