Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

SetSignedInListener Crash
Started by jandjstudiosllc Nov 14 2014 01:40 PM

1 reply to this topic
[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

jandjstudiosllc

[GLOBAL: userInfoPane.html]
jandjstudiosllc
  • Enthusiast

  • 56 posts
  • Corona SDK

I'm working on adding GameCircle to one of my apps and have most things working but I'm having issues with the SetSignedInListener crashing.  I copy/pasted the example directly into my main.lua so it's one of the first things that executes and when it does I get the following errors.  I'm using the latest public release, build 2393.

 

V/Corona  ( 9526): > Class.forName: plugin.gamecircle.LuaLoader
V/Corona  ( 9526): < Class.forName: plugin.gamecircle.LuaLoader
V/Corona  ( 9526): Loading via reflection: plugin.gamecircle.LuaLoader
I/Corona  ( 9526): Runtime error
I/Corona  ( 9526): java.lang.NullPointerException
I/Corona  ( 9526): Java Stack Trace:
I/Corona  ( 9526):      plugin.gamecircle.LuaLoader.SetSignedInListener(LuaLoader.java:1383)
I/Corona  ( 9526):      plugin.gamecircle.LuaLoader$SetSignedInListenerWrapper.invoke(LuaLoader.java:2393)
I/Corona  ( 9526):      com.ansca.corona.JavaToNativeShim.nativeResize(Native Method)
I/Corona  ( 9526):      com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:381)
I/Corona  ( 9526):      com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:374)
I/Corona  ( 9526):      com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1611)
I/Corona  ( 9526):      com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)
I/Corona  ( 9526): stack traceback:
I/Corona  ( 9526):      [C]: in function 'SetSignedInListener'
I/Corona  ( 9526):      ?: in main chunk
 
For the record here's the block of code from the example I'm using:
 
local gamecircle = require("plugin.gamecircle")
gamecircle.Init(false, false, true)
function SignedInCallback(result)
  if result then
    print("Player Signed In")
  else
    print("Player SIgned Out")
  end
end
gamecircle.SetSignedInListener(SignedInCallback)


[TOPIC: post.html]
#2

jflowers45

[GLOBAL: userInfoPane.html]
jflowers45
  • Contributor

  • 320 posts
  • Enterprise

I'm betting  you need to check gamecircle.isReady() before you call setSignedInListener




[topic_controls]
[/topic_controls]