question

Chris avatar image
Chris asked

StringIndexOutOfBoundsException from ClickableToastImpl

Several of my users are experiencing a crash related to the stack trace at the bottom of this post. It does not happen on any of my test devices, but it doesn't seem to be related to my code. I used the most recent GameCircle SDK (2.4.0). This crash seems to be related to the clickable toast that appears when the app is started, and users say that the app immediately force-closes. Have any of you seen this problem before? java.lang.StringIndexOutOfBoundsException: length=2; regionStart=0; regionLength=3 at java.lang.String.startEndAndLength(String.java:593) at java.lang.String.substring(String.java:1474) at com.amazon.ags.html5.overlay.toasts.ClickableToastImpl$ToastParams. (ClickableToastImpl.java:172) at com.amazon.ags.html5.overlay.toasts.ClickableToastFactoryImpl.getToastParams(ClickableToastFactoryImpl.java:122) at com.amazon.ags.html5.overlay.toasts.ClickableToastFactoryImpl. (ClickableToastFactoryImpl.java:61) at com.amazon.ags.html5.factory.ServiceFactory. (ServiceFactory.java:265) at com.amazon.ags.html5.factory.ServiceFactory.initialize(ServiceFactory.java:170) at com.amazon.ags.api.AmazonGamesClient$1$1$1.run(AmazonGamesClient.java:217) at android.os.Handler.handleCallback(Handler.java:605) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4429) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562) at dalvik.system.NativeStart.main(Native Method)
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
Thanks Chris for the report. Just to confirm, is that happening in "MindResolve"?
10 |5000

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

Chris avatar image
Chris answered
Yes, it is.
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 Chris, The problem is forwarded to concerned team here. Thanks.
10 |5000

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

Chris avatar image
Chris answered
What is the ETA on a fix? Does this require an update to the SDK? Several of my users are unable to play the game at all due to this problem, since it crashes on startup.
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 Chris, We understood the concern and working on the fix. I can not commit any ETA officially at this point. But I will update this thread once the fix is out in SDK. Probably this fix will require an SDK update in your app. Thanks.
10 |5000

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

Marko ��tamcar avatar image
Marko ��tamcar answered
Hello, I got a similar crash: 06-09 14:26:44.985: E/AndroidRuntime(12155): FATAL EXCEPTION: main 06-09 14:26:44.985: E/AndroidRuntime(12155): java.lang.Error: FATAL EXCEPTION [main] 06-09 14:26:44.985: E/AndroidRuntime(12155): Unity version : 4.3.4f1 06-09 14:26:44.985: E/AndroidRuntime(12155): Device model : Amazon KFJWI 06-09 14:26:44.985: E/AndroidRuntime(12155): Device fingerprint: Android/jem/jem:4.0.4/IMM76D/8.4.8_user_4849120:user/release-keys 06-09 14:26:44.985: E/AndroidRuntime(12155): Caused by: java.lang.NullPointerException 06-09 14:26:44.985: E/AndroidRuntime(12155): at com.amazon.ags.html5.overlay.toasts.ClickableToastImpl$6.run(ClickableToastImpl.java:377) 06-09 14:26:44.985: E/AndroidRuntime(12155): at android.os.Handler.handleCallback(Handler.java:605) 06-09 14:26:44.985: E/AndroidRuntime(12155): at android.os.Handler.dispatchMessage(Handler.java:92) 06-09 14:26:44.985: E/AndroidRuntime(12155): at android.os.Looper.loop(Looper.java:137) 06-09 14:26:44.985: E/AndroidRuntime(12155): at android.app.ActivityThread.main(ActivityThread.java:4533) 06-09 14:26:44.985: E/AndroidRuntime(12155): at java.lang.reflect.Method.invokeNative(Native Method) 06-09 14:26:44.985: E/AndroidRuntime(12155): at java.lang.reflect.Method.invoke(Method.java:511) 06-09 14:26:44.985: E/AndroidRuntime(12155): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 06-09 14:26:44.985: E/AndroidRuntime(12155): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
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
This is a different issue. Is that happening all the time?
10 |5000

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

Marko ��tamcar avatar image
Marko ��tamcar answered
No, it only happened once so far.
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
Please report back if you are able to reproduce the problem consistently. Thanks.
10 |5000

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