question

Stephane D. avatar image
Stephane D. asked

NullPointerException in JavascriptInterface.java:181

Hello, I'm currently testing GameCircle, and I've got some NPE quite frequently. See the log below. 08-17 11:59:11.427 9540-14969/? D/GC_NativeKindleFireStateCallHandler﹕ Processing request [backgroundwebview-28] for call type [isGCServiceReady] 08-17 11:59:11.427 9540-14969/? D/GC_NativeKindleFireStateCallHandler﹕ Returning reply [{"value":false}] for request [backgroundwebview-28] 08-17 11:59:11.613 9540-14959/? D/GC_HttpNetworkClient﹕ Result:HTTP/1.1 200 OK 08-17 11:59:11.620 9540-14957/? D/GC_HttpNetworkClient﹕ Result:HTTP/1.1 200 OK 08-17 11:59:11.622 9540-9568/? I/AmazonInsightsSDK﹕ Event: 'GameC...' recorded to local filestore 08-17 11:59:11.627 9540-14958/? D/GC_HttpNetworkClient﹕ Result:HTTP/1.1 200 OK 08-17 11:59:11.630 9540-9568/? I/AmazonInsightsSDK﹕ Event: 'GameC...' recorded to local filestore 08-17 11:59:11.640 9540-9568/? I/AmazonInsightsSDK﹕ Event: 'GameC...' recorded to local filestore 08-17 11:59:11.674 9540-14960/? D/GC_HttpNetworkClient﹕ Result:HTTP/1.1 200 OK 08-17 11:59:11.692 9540-14969/? E/AndroidRuntime﹕ FATAL EXCEPTION: pool-11-thread-6 Process: com.[...], PID: 9540 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference at com.amazon.ags.html5.javascript.domain.JavascriptInterface$4.run(JavascriptInterface.java:181) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
10 |5000

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

Jamie Grossman avatar image
Jamie Grossman answered
Hi there, If your app's gamecircle configuration isn't affected, you shouldn't have anything to worry about. Regardless, I'll past it on to the team. Thanks for posting! Jamie
10 |5000

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

Stephane D. avatar image
Stephane D. answered
I'm affected as it crashes on users, and as I can't intercept the crash because it's not on the main thread, or on a thread I have access. So yes, for the user experience, it's bad, and so for me too!
10 |5000

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