random crashes

First one is odd. Does it happens often? Second one should be fixed now.

For the first one, almost every day 1-3 devices affected.

Older devices like:

Nokia 3, android 8.1

Samsung Galaxy Tab3, android 4.4

Lenovo Tab 2, android 6

Huawei Media Tab 2, android 6

Samsung Galaxy J5, android 7

Also I think (not 100% sure) the second one is not completely fixed yet and it’s the most important.

Tonight I will update some apps and we will have more info.

What I’m trying to say: please, try new build, both crashes should be gone. I just pushed a fix for them.

Sorry, didn’t know.

Kudos vlads, this time you nailed it!

No worries. I didn’t write this plugin initially, I just picked it up a week ago. If you have more issues with it, please, let me know, I’ll fix them as they come.

Do they have a traceback or something?

Hi vlads.

Thank you for the reply.

at java.util.Hashtable.put (Hashtable.java:461) at plugin.gpgs.v2.Utils.gameToHashtable (Utils.java:282) at plugin.gpgs.v2.Utils.snapshotMetadataToHashtable (Utils.java:312) at plugin.gpgs.v2.Snapshots$OpenSnapshotOnCompleteListener.onComplete (Snapshots.java:503) at com.google.android.gms.tasks.zzj.run (Unknown Source:23) at android.os.Handler.handleCallback (Handler.java:794) at android.os.Handler.dispatchMessage (Handler.java:99) at android.os.Looper.loop (Looper.java:173) at android.app.ActivityThread.main (ActivityThread.java:6634) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:822)

edit:

To be clear. Everything works fine with gpgs version 1.

It has to do with gpgs version 2 only.

That’s why I wrote about the change in conflictPolicy.

More users contacted with us about this crash and did some more tests.

On some devices the crash stops if comment out the parameter create = true,  in gpgs.snapshots.open().

On some others it doesn’t help and the crash keeps happening.

I understand you got a lot to do but not giving priority to things like this is a mistake.

Hey! Sorry for not responding earlier
Here’s code which is crashing:
yCOt0OP.png

Game description is returning Null and it crashes serialization. It seems like easiest solution would be to make sure to always have some description field when saving (it could be an empty string, but not nil)

So it’s not about gpgs.snapshots.open but gpgs.snapshots.save?

Something like this?

gpgs.snapshots.save({ snapshotId = event.snapshotId, description = "saved", listener = gpgsSnapshotAfterSaveListener })

Yes, it seems so. But code should be consistent. It seems once snapshot is saved w/o game description it should always fail on open. Try reproducing it first?

I can’t reproduce it in my devices.

I am using build 2019.3470 and gpgs v2 plugin.

 

I am also getting the following error trace from google play. 

Device: Samsung galaxy Note 8 and Android 8.0

 

But in my device I don’t get the error and I am seeing the error in a subset of players only.

 

java.lang.NullPointerException :

 

at java.util.Hashtable.put (Hashtable.java:461)

 

at plugin.gpgs.v2.Utils.gameToHashtable (Utils.java:282)

 

at plugin.gpgs.v2.Utils.snapshotMetadataToHashtable (Utils.java:312)

 

at plugin.gpgs.v2.Snapshots$OpenSnapshotOnCompleteListener.onComplete (Snapshots.java:503)

 

at com.google.android.gms.tasks.zzj.run (Unknown Source:23)

 

at android.os.Handler.handleCallback (Handler.java:789)

 

at android.os.Handler.dispatchMessage (Handler.java:98)

 

at android.os.Looper.loop (Looper.java:164)

 

at android.app.ActivityThread.main (ActivityThread.java:6940)

 

at java.lang.reflect.Method.invoke (Native Method)

 

at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)

 

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

@vlads

I just checked. I had game description " game score" from before already and still seeing the crashes. 

Another crash trace I am seeing is the following: 

java.lang.NullPointerException :

 

at java.util.Hashtable.put (Hashtable.java:442)

 

at plugin.gpgs.v2.Utils.gameToHashtable (Utils.java:282)

 

at plugin.gpgs.v2.Utils.snapshotMetadataToHashtable (Utils.java:312)

 

at plugin.gpgs.v2.Snapshots$OpenSnapshotOnCompleteListener.onComplete (Snapshots.java:503)

 

at com.google.android.gms.tasks.zzj.run (Unknown Source)

 

at android.os.Handler.handleCallback (Handler.java:751)

 

at android.os.Handler.dispatchMessage (Handler.java:95)

 

at android.os.Looper.loop (Looper.java:154)

 

at android.app.ActivityThread.main (ActivityThread.java:6682)

 

at java.lang.reflect.Method.invoke (Native Method)

 

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1520)

 

at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)

@vlads please check it again.

Crashes keep coming for the same reason although I did what you wrote.

Nothing?

Version 1 gives a lot of ANRs and version 2 a lot of crashes. 

Corona doesn’t have a working gpgs plugin right now.

It’s a big issue and nobody seems to care.

@Aarbron,

let’s wait awhile for Corona team to find a fix so that they can update us. :slight_smile:

@mysticeti

It’s not that simple when you get 1 star reviews and emails about an error that you can’t fix.

Corona should at least inform us about this issue. 

They don’t respond here or in emails.

I’m part of this community for almost 7 years and that kind of behaviour is really worrying.

I’ll re-ping our engineers.

Thank you Rob.

vlads wrote about missing (optional ) parameter description = “”.

I added it and the problem remains with users coming back after long breaks and even with new users!

Totally random.

Last crash was from s9 device although I have thousands users with that device without any problem!

Also you should keep the compatibility with gpgs version 1.

I didn’t have this (optional) parameter and everything worked fine!

That’s what should happen with version 2.

If you don’t change I will keep having random crashes with players coming back after long breaks.

Another user reported same issues in this topic and he uses the description parameter from the beginning. 

That complicates everything even more.

Please let me know when you have any news.

Thank you!