Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPGS Android: Disconnect from service while saving leads to crash #26

Closed
MrStahlfelge opened this issue May 18, 2018 · 1 comment
Closed

Comments

@MrStahlfelge
Copy link
Owner

MrStahlfelge commented May 18, 2018

In very rare cases, app crashes with the following cause:

java.lang.IllegalStateException:
com.google.android.gms.games.internal.api.SnapshotsImpl.commitAndClose (SnapshotsImpl.java)
or .open$70b7f367 (SnapshotsImpl.java)
at de.golfgl.gdxgamesvcs.GpgsClient..saveGameStateSync (GpgsClient.java)
at de.golfgl.gdxgamesvcs.GpgsClient$4.doInBackground (GpgsClient.java)

This is probably caused by disconnecting from GPGS while cloud save is still running.

There are two possible approaches to prevent this crash:

  1. do not disconnect while cloud save is running
  2. catch the exception and return failed cloud save
@MrStahlfelge
Copy link
Owner Author

Fixed in v0.2.4 with exception catch like it is done when loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant