java.lang.StringIndexOutOfBoundsException: length=0; regionStart=0; regionLength=2

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

This is a bug when using Micromax devices with VideoView. You can either exclude these devices or look at this workaround: http://stackoverflow.com/a/31942841/4347859

,
via GitHub by Omertron

You need to make sure that capitalisation of the case for the plugin in the properties file is exactly: "AllocinePlugin" and not "allocineplugin"

Solutions on the web

via Stack Overflow by Farhan Shah
, 1 year ago
length=0; regionStart=0; regionLength=2
via mibqyyo.com by Unknown author, 2 years ago
via Stack Overflow by João Nobre
, 1 year ago
length=0; regionStart=0; regionLength=-2
via Stack Overflow by Vinay Wadhwa
, 2 years ago
via Stack Overflow by Dahnark
, 2 months ago
length=0; regionStart=0; regionLength=1
java.lang.StringIndexOutOfBoundsException: length=0; regionStart=0; regionLength=2
at java.lang.String.startEndAndLength(String.java:583)
at java.lang.String.substring(String.java:1464)
at com.buzzador.profile.getValidPhoneNumber(profile.java:1966)
at com.buzzador.profile.setDataForServer(profile.java:1717)
at com.buzzador.profile$5.onClick(profile.java:236)
at android.view.View.performClick(View.java:4377)
at android.view.View$PerformClick.run(View.java:18044)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
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:1102)

Users with the same issue

2 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
59 times, 1 month ago
Once, 4 months ago
36 times, 5 months ago
109 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.