Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Google play game services crash app.
Started by egnech Aug 08 2013 08:02 AM

- - - - -
10 replies to this topic
google play game service gamenetwork
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

egnech

[GLOBAL: userInfoPane.html]
egnech
  • Observer

  • 11 posts
  • Enterprise

Hi, all!
 
I found a problem, google play game service that cause application crash. If user sign out from gpgs (settings -> sign out). And after this make any request (gameNetwork.request) application will crashed with "Java.lang.SecurityExeption."
 
How can I handle sign out action? Or maybe there is another solution?
 
This issue prevents me to submit a build to play market. So any advice will be helpful! 


[TOPIC: post.html]
#2

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

@egnech, I don't seem to be able to replicate the issue you raised with my GPGS implementation.  Do you mind writing out some step-by-step instructions for reproducing this problem?  

 

I'm not especially sure what you mean by sign out from GPGS (settings -> sign out).  I did a quick check and on my test device (Nexus 7), when I tap on settings > Google > Google+, it says "You are not signed into Google+".  Is it that I need to sign in to Google+ outside of my game app, then launch my app, sign in to Google+ inside my app, and then suspend my app, sign out from Google+ via settings > Google > Google+ before I can ever see the issue you are raising?

 

Naomi



[TOPIC: post.html]
#3

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

BTW, I released Jackpot Words with GPGS leaderboards, achievements and head-to-head match game feature.  Do you mind downloading it and see if the signing out you do would cause my game to crash:

 

https://play.google.com/store/apps/details?id=com.lavamind.jackpotwords

 

If it doesn't crash, then perhaps there's something else you are doing that causes the issue.  If it does crash, then I would really want to reproduce the issue so that we can sort out what has to be done to fix it.

 

Naomi



[TOPIC: post.html]
#4

egnech

[GLOBAL: userInfoPane.html]
egnech
  • Observer

  • 11 posts
  • Enterprise

Hi, Naomi!

 

I download you game, and reproduce the same exeption.

Here is step-by-step instructions:

  1. Start game 8)
  2. Sign in with google play
  3. Open achievement / leader board popup (I mean gpgs native popup)
  4. Tap on icon at left top side of screen -> settings ->  sign out -> OK

And now open achievement or leader board popup, application will crash. Here I make some screenshots. 



[TOPIC: post.html]
#5

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Ah, yes, thank you for the step-by-step instruction, @egnech.  I have not thought to test it that way.  Interesting.  It's definitely an edge case, but it would be good if this can be fixed somehow.  

 

The terminal output suggests no errors until after the runtime java.lang.SecurityException occurs -- so I don't see how we could handle this edge case on our end.

 

I'll alert this as a bug.  (Also it might be a good idea to have this thread moved to Plugins / Gluon subforum.)

 

Naomi



[TOPIC: post.html]
#6

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

So, I've filed the bug report (case #25522)
 
And here's what I filed (testing with my own app):
 
1)  Start the app
 
2)  Tap on the trophy button (the button in the bottom middle)
 
3)  Tap on Google Play button
 
4)  Sign in to Google+
 
5)  Tap on Leaderboard
 
6)  Tap on upper right (with three dots)
 
7)  Tap on Settings
 
8) Tap on Sign out
 
9)  You are back on Google Play menu (with Achievement, Leaderboard and Sign Out buttons.)
 
10)  Tapping on Achievement or Leaderboard appears to do nothing (until I leave the menu and return back in) -- but tapping on Sign Out results in  java.lang.SecurityException immediately.
 
The function that launches upon tapping on the Sign Out (as well as Sign In) is googleLogin (which calls clearRoom first) :
 


local function clearRoom()
    if googleRoomID ~= nil then
        gameNetwork.request( "leaveRoom", { roomID = googleRoomID })        
        googleRoomID = nil
    end
end

local function googleLogin()
    clearRoom()
    local function loginListener(event)
        -- Checks to see if there was an error with the login.
        if event.isError then
            txt.login.text = "SIGN IN"
            updateButton() -- this updates the button label from SIGN IN
            _G.myGoogle.userID = nil;
            _G.myGoogle.userAlias = nil;
        else
            googleLocalUser()
        end
    end
 
    if gameNetwork.request("isConnected") then
        gameNetwork.request("logout")
        txt.login.text = "SIGN IN"
        updateButton()
        _G.myGoogle.userID = nil;
        _G.myGoogle.userAlias = nil;
 
    else
        -- Tries to login the user, if there is a problem then it will try to resolve it.
        -- eg. Show the log in screen.
        gameNetwork.request("login",
            {
                listener = loginListener,
                userInitiated = true
            })
    end
end

 
11)  Here's the full terminal log starting from the moment I tap on Sign out under step #8 above
 
D/dalvikvm(  481): GC_FOR_ALLOC freed 727K, 22% free 14597K/18644K, paused 55ms, total 56ms
D/dalvikvm(11120): GC_CONCURRENT freed 993K, 36% free 8816K/13584K, paused 3ms+2ms, total 48ms
D/dalvikvm(11120): WAIT_FOR_CONCURRENT_GC blocked 16ms
D/dalvikvm(11120): GC_CONCURRENT freed 541K, 36% free 8740K/13584K, paused 6ms+2ms, total 28ms
D/dalvikvm(11120): GC_FOR_ALLOC freed 72K, 36% free 8713K/13584K, paused 21ms, total 21ms
I/dalvikvm-heap(11120): Grow heap (frag case) to 9.847MB for 1249456-byte allocation
D/dalvikvm(11120): GC_CONCURRENT freed <1K, 27% free 9933K/13584K, paused 3ms+2ms, total 23ms
D/dalvikvm(11120): WAIT_FOR_CONCURRENT_GC blocked 20ms
D/dalvikvm(11120): GC_FOR_ALLOC freed <1K, 27% free 9933K/13584K, paused 21ms, total 21ms
I/dalvikvm-heap(11120): Grow heap (frag case) to 11.038MB for 1249456-byte allocation
D/dalvikvm(11120): GC_FOR_ALLOC freed <1K, 18% free 11153K/13584K, paused 17ms, total 17ms
D/dalvikvm(11120): GC_CONCURRENT freed 1220K, 27% free 9933K/13584K, paused 3ms+2ms, total 23ms
D/dalvikvm(11120): GC_CONCURRENT freed 1596K, 34% free 9088K/13584K, paused 2ms+1ms, total 21ms
D/dalvikvm(11120): WAIT_FOR_CONCURRENT_GC blocked 9ms
D/dalvikvm(11120): GC_FOR_ALLOC freed 601K, 36% free 8713K/13584K, paused 16ms, total 16ms
I/dalvikvm-heap(11120): Grow heap (frag case) to 9.265MB for 640016-byte allocation
D/dalvikvm(11120): GC_FOR_ALLOC freed <1K, 32% free 9338K/13584K, paused 19ms, total 19ms
D/dalvikvm(11120): GC_CONCURRENT freed <1K, 32% free 9338K/13584K, paused 3ms+2ms, total 18ms
D/dalvikvm(11120): GC_CONCURRENT freed 625K, 32% free 9338K/13584K, paused 2ms+2ms, total 19ms
D/dalvikvm(11120): WAIT_FOR_CONCURRENT_GC blocked 6ms
I/dalvikvm-heap(11120): Grow heap (frag case) to 12.571MB for 3465616-byte allocation
D/dalvikvm(11120): GC_CONCURRENT freed 625K, 29% free 12097K/16972K, paused 3ms+2ms, total 18ms
D/dalvikvm(11120): GC_FOR_ALLOC freed <1K, 29% free 12097K/16972K, paused 15ms, total 16ms
I/dalvikvm-heap(11120): Grow heap (frag case) to 15.265MB for 3465616-byte allocation
D/dalvikvm(11120): GC_FOR_ALLOC freed <1K, 24% free 15481K/20360K, paused 16ms, total 16ms
D/dalvikvm(11120): GC_CONCURRENT freed 0K, 24% free 15482K/20360K, paused 3ms+2ms, total 22ms
D/dalvikvm(11120): GC_FOR_ALLOC freed 8796K, 33% free 9220K/13584K, paused 17ms, total 17ms
D/dalvikvm(11120): GC_CONCURRENT freed 507K, 33% free 9220K/13584K, paused 1ms+2ms, total 19ms
D/dalvikvm(11120): WAIT_FOR_CONCURRENT_GC blocked 6ms
I/dalvikvm-heap(11120): Grow heap (frag case) to 9.760MB for 640016-byte allocation
D/dalvikvm(11120): GC_FOR_ALLOC freed 506K, 32% free 9338K/13584K, paused 16ms, total 16ms
D/dalvikvm(11120): GC_CONCURRENT freed 625K, 32% free 9338K/13584K, paused 3ms+2ms, total 20ms
D/dalvikvm(11120): GC_CONCURRENT freed 625K, 32% free 9338K/13584K, paused 2ms+2ms, total 17ms
D/dalvikvm(11120): GC_CONCURRENT freed 625K, 32% free 9338K/13584K, paused 1ms+2ms, total 18ms
D/dalvikvm(11120): WAIT_FOR_CONCURRENT_GC blocked 6ms
D/dalvikvm(11120): GC_FOR_ALLOC freed 625K, 33% free 9219K/13584K, paused 15ms, total 15ms
W/libc    (11120): pthread_create sched_setscheduler call failed: Operation not permitted
I/OpenAL_SLES(11120): playback_function started
D/FlurryAgent(11120): Starting new session
D/dalvikvm(11120): GC_CONCURRENT freed 512K, 33% free 9221K/13584K, paused 1ms+2ms, total 20ms
I/Corona  (11120): Runtime error
I/Corona  (11120): java.lang.SecurityException
I/Corona  (11120): Java Stack Trace:
I/Corona  (11120):     android.os.Parcel.readException(Parcel.java:1425)
I/Corona  (11120):     android.os.Parcel.readException(Parcel.java:1379)
I/Corona  (11120):     com.google.android.gms.internal.bm$a$a.a(Unknown Source)
I/Corona  (11120):     com.google.android.gms.internal.bj.signOut(Unknown Source)
I/Corona  (11120):     com.google.android.gms.games.GamesClient.signOut(Unknown Source)
I/Corona  (11120):     CoronaProvider.gameNetwork.google.GameHelper.signOut(GameHelper.java:579)
I/Corona  (11120):     CoronaProvider.gameNetwork.google.LuaLoader.logout(LuaLoader.java:201)
I/Corona  (11120):     CoronaProvider.gameNetwork.google.LuaLoader.request(LuaLoader.java:399)
I/Corona  (11120):     CoronaProvider.gameNetwork.google.LuaLoader$RequestWrapper.invoke(LuaLoader.java:706)
I/Corona  (11120):     com.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)
I/Corona  (11120):     com.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:282)
I/Corona  (11120):     com.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)
I/Corona  (11120):     com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:153)
I/Corona  (11120):     com.ansca.corona.events.EventManager.sendEve
I/Corona  (11120): errorMessage = "java.lang.SecurityException\nJava Stack Trace:\n\tandroid.os.Parcel.readException(Parcel.java:1425)\n\tandroid.os.Parcel.readException(Parcel.java:1379)\n\tcom.google.android.gms.internal.bm$a$a.a(Unknown Source)\n\tcom.google.android.gms.internal.bj.signOut(Unknown Source)\n\tcom.google.android.gms.games.GamesClient.signOut(Unknown Source)\n\tCoronaProvider.gameNetwork.google.GameHelper.signOut(GameHelper.java:579)\n\tCoronaProvider.gameNetwork.google.LuaLoader.logout(LuaLoader.java:201)\n\tCoronaProvider.gameNetwork.google.LuaLoader.request(LuaLoader.java:399)\n\tCoronaProvider.gameNetwork.google.LuaLoader$RequestWrapper.invoke(LuaLoader.java:706)\n\tcom.ansca.corona.JavaToNativeShim.nativeTouchEvent(Native Method)\n\tcom.ansca.corona.JavaToNativeShim.touchEvent(JavaToNativeShim.java:282)\n\tcom.ansca.corona.input.RaiseTouchEventTask.executeUsing(RaiseTouchEventTask.java:39)\n\tcom.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:153)\n\tcom.ansca.corona.events.EventManager.sendEvents(EventManager.java:229)\n\tcom.ansca.corona.Controller.onDrawFrame(Controller.java:220)\n\tcom.ansca.corona.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:400)\n\tcom.ansca.corona.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622)\n\tcom.ansca.corona.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)"
D/dalvikvm(11120): GC_CONCURRENT freed 814K, 34% free 8968K/13584K, paused 2ms+3ms, total 25ms
I/Corona  (11120): Runtime error
I/Corona  (11120): 
I/Corona  (11120): stack traceback:
I/Corona  (11120):     [C]: ?
I/Corona  (11120):     [C]: in function 'request'
I/Corona  (11120):     ?: in function 'onRelease'
I/Corona  (11120):     ?: in function <?:223>
I/Corona  (11120):     ?: in function <?:218>
I/Corona  (11120): errorMessage = "\nstack traceback:\n\t[C]: ?\n\t[C]: in function 'request'\n\t?: in function 'onRelease'\n\t?: in function <?:223>\n\t?: in function <?:218>"
 

 



[TOPIC: post.html]
#7

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

BTW, I have not tested it with Corona supplied sample code, but I believe it would behave the same way.

 

Naomi



[TOPIC: post.html]
#8

heindl.kathrin

[GLOBAL: userInfoPane.html]
heindl.kathrin
  • Observer

  • 1 posts
  • Corona SDK

I have the exact same problem! I can not check if the user is actually signed in, only if the gamesClient is connected, which he is although I logged out.


Any progress so far?



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,922 posts
  • Enterprise

Naomi, don't feel like we are ignoring you.  The engineers are very slammed at the moment and I'm sure Danny will look at this as soon as he can. 



[TOPIC: post.html]
#10

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Thank you, Rob.  I understand.  Hopefully, Danny will soon have a moment to take a breath and get back to look at multiplayer related items again. 

 

Naomi



[TOPIC: post.html]
#11

Naomi

[GLOBAL: userInfoPane.html]
Naomi
  • Corona Geek

  • 2,303 posts
  • Corona SDK

Great news.  Corona Labs fixed the case 25522.  I'm assuming the fix is down with the plugin and I don't need to download new daily build for the fix.

 

Anyhow, I have not tested this yet, but good to know we don't need to worry about this any more.

 

Cheers,

Naomi




[topic_controls]
[/topic_controls]