question

tuokiodev avatar image
tuokiodev asked

Unity plugin crash on submit hiscore

Unity plugin crashes when trying to post hiscore on draft leaderboard. Any ideas whats wrong? Log: W/dalvikvm( 6354): threadid=11: thread exiting with uncaught exception (group=0x40b251f8) E/AndroidRuntime( 6354): FATAL EXCEPTION: GLThread 1387 E/AndroidRuntime( 6354): java.lang.NullPointerException E/AndroidRuntime( 6354): at com.amazon.ags.api.unity.LeaderboardsClientProxyImpl.requestLeaderboards(LeaderboardsClientProxyImpl.java:94) E/AndroidRuntime( 6354): at com.unity3d.player.UnityPlayer.nativeRender(Native Method) E/AndroidRuntime( 6354): at com.unity3d.player.UnityPlayer.nativeRender(Native Method) E/AndroidRuntime( 6354): at com.unity3d.player.UnityPlayer.onDrawFrame(Unknown Source) E/AndroidRuntime( 6354): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462) E/AndroidRuntime( 6354): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216) W/ActivityManager( 206): Force finishing activity com.tuokio.smashtheoffice/com.unity3d.player.UnityPlayerNativeActivity V/ActivityStack( 206): Prepare close transition: finishing ActivityRecord{417d67b8 com.tuokio.smashtheoffice/com.unity3d.player.UnityPlayerNativeActivity}
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tuokiodev avatar image
tuokiodev answered
I actually pasted wrong log, Log in previous post is from requestAllLeaderBoards witch also fails. GameCircle service fires correctly service became ready event (AGSClient.ServiceReadyEvent) and I can show leaderboards overlay and it shows correctly my leaderboard (naturally without scores since I cant't post them). -Samuli
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Tuokiodev, Thank you for posting. Are you using the GameCircle 2.0 SDK?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tuokiodev avatar image
tuokiodev answered
We are using gamecircle 2.0 SDK and Unity. Seems that there is just something wrong in our setup. While reading log bit further there seems to be related error. W/dalvikvm(12755): No implementation found for native Lcom/amazon/ags/jni/AGSJniHandler;.isLoaded:()V E/AGSJniHandler(12755): Could not load AmazonGamesJni E/AGSJniHandler(12755): java.lang.UnsatisfiedLinkError: Couldn't load AmazonGamesJni: findLibrary returned null E/AGSJniHandler(12755): at java.lang.Runtime.loadLibrary(Runtime.java:365) E/AGSJniHandler(12755): at java.lang.System.loadLibrary(System.java:535) E/AGSJniHandler(12755): at com.amazon.ags.jni.AGSJniHandler.loadLibrary(AGSJniHandler.java:49) E/AGSJniHandler(12755): at com.amazon.ags.api.AmazonGamesClient. (AmazonGamesClient.java:61) E/AGSJniHandler(12755): at com.amazon.ags.api.unity.UnityClientProxyBase. (UnityClientProxyBase.java:15) E/AGSJniHandler(12755): at com.amazon.ags.api.unity.ProfilesClientProxyImpl. (ProfilesClientProxyImpl.java:18) E/AGSJniHandler(12755): at com.amazon.ags.api.unity.ProfilesClientProxyImpl.getInstance(ProfilesClientProxyImpl.java:24) E/AGSJniHandler(12755): at com.unity3d.player.UnityPlayer.nativeRender(Native Method) E/AGSJniHandler(12755): at com.unity3d.player.UnityPlayer.onDrawFrame(Unknown Source) E/AGSJniHandler(12755): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Tuokiodev, Thank you bringing this into our notice. I have forwarded this issue to the concerned team. I will get back after getting update from them.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Tuokiodev, UnsatisfiedLinkError is not an issue and can safely be ignored. As for the crash - looking at your previous posts it looks like you are not checking to see if the initialization comes back successfully before calling leaderboard methods. You should check for null or wait for the callback as initialization is asynchronous as it makes a call to the server. If they try to call GameCircle methods before initialization returns, they will cause a null pointer exception and a crash if this is not caught.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

billhilly123 avatar image
billhilly123 answered
> Hi Tuokiodev, > > UnsatisfiedLinkError is not an issue and can safely > be ignored. As for the crash - looking at your > previous posts it looks like you are not checking to > see if the initialization comes back successfully > before calling leaderboard methods. You should check > for null or wait for the callback as initialization > is asynchronous as it makes a call to the server. If > they try to call GameCircle methods before > initialization returns, they will cause a null > pointer exception and a crash if this is not caught. Hi guys, I also have this problem. What do you mean initialization? Game circle says "Service is Ready", but the crash still occur. Thank you. [b]Kris[/b]
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Billhilly123, I have sent mail to your registered mail id. Please check and reply back.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.