Skip to content

StringIndexOutOfBoundsException聽#638

Description

@TheCarpetMerchant

馃悰 Bug Report

I'm getting this kind of exception all the time and I have no idea what causes it. If this is something known I'd love to know, if this is as much a mystery to everyone as it is to me feel free to close this.

This is also something that's happening a lot at once, not only once per session across a lot of sessions. I have users getting this same error like 50 times in a very short span of time.

If I had to guess this would be the line at fault :

It would be advisable to check if the index is still valid, and if not restart at index 0.

Thanks.

PlatformException: PlatformException(error, length=127; index=199, null, java.lang.StringIndexOutOfBoundsException: length=127; index=199
	at java.lang.String.substring(String.java:2910)
	at y1.g.onMethodCall(SourceFile:1458)
	at l1.c.J(SourceFile:21)
	at w4.b.run(SourceFile:62)
	at android.os.Handler.handleCallback(Handler.java:995)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loopOnce(Looper.java:273)
	at android.os.Looper.loop(Looper.java:363)
	at android.app.ActivityThread.main(ActivityThread.java:10060)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
)
  base.apk            0x6c2c53b4c4 StandardMethodCodec.decodeEnvelope (message_codecs.dart:653)
  base.apk            0x6c2c6871d0 MethodChannel._invokeMethod (platform_channel.dart:366)
  File "<asynchronous suspension>"
  base.apk            0x6c2c620f28 FlutterTts.pause (flutter_tts.dart:366)

StringIndexOutOfBoundsException: length=127; index=199
    at java.lang.String.substring(String.java:2910)
    at y1.g.onMethodCall(SourceFile:1458)
    at l1.c.J(SourceFile:21)
    at w4.b.run(SourceFile:62)
    at android.os.Handler.handleCallback(Handler.java:995)
    at android.os.Handler.dispatchMessage(Handler.java:103)
    at android.os.Looper.loopOnce(Looper.java:273)
    at android.os.Looper.loop(Looper.java:363)
    at android.app.ActivityThread.main(ActivityThread.java:10060)
    at java.lang.reflect.Method.invoke
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

Version: 4.2.5

Platform:

  • 馃摫 iOS
  • 馃 Android

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions