Skip to content

Fix ButtonClicker random crash issue [ the crash happens on 64 bit gpg sdk ]#20

Closed
ggfan wants to merge 3 commits intoplaygameservices:masterfrom
ggfan:master
Closed

Fix ButtonClicker random crash issue [ the crash happens on 64 bit gpg sdk ]#20
ggfan wants to merge 3 commits intoplaygameservices:masterfrom
ggfan:master

Conversation

@ggfan
Copy link
Contributor

@ggfan ggfan commented Aug 31, 2015

  1. initialize the jui_helper::JUIWindow::init() before trying to display Toast. GetInstance()->GetContext() needs it inside InitToast()
    2)Synchronize UI init with Google Play Games authentication UI with a mutex

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep this at 9?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, sure

@ggfan
Copy link
Contributor Author

ggfan commented Sep 1, 2015

there are 2 scenarios:

  1. if the app is not logged in last time, there is no impact -- user will need to log in explicitly; the lock does not matter.
  2. if app already logged in last time, when app starts up, gpg will try silent login, and it will try to display pop-up UI. this is the period that we dedicate the UI to gpg so it could display its login UI, not complicate it with UI thread sharing the display with it.

For the above case 1), you could not initDisplay after authentication: I think user need to click/tap a button to start login process
For the above case 2), we do not have much control of the gpg because gpg init is inside android_main() loop, it is a head of UI initialization.

It might make sense to force gpg init after UI is initialized, but that would need somewhat re-layout / evaluate overall UI and gpg login code. that would need more experiment. Current fix will make sure we are forcing the thing done in the thread that originated the action [ I think this simplify things ]

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants