java.lang.StringIndexOutOfBoundsException: length=48; index=-1


Samebug tips2

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


,
via GitHub by Omertron

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


5 months ago
Expert tip

Solutions on the web34

Solution icon of github
via GitHub by itchix
, 5 months ago
length=48; index=-1

Solution icon of github
length=48; index=-1

Solution icon of github
length=48; index=-1

Solution icon of github
via GitHub by itchix
, 9 months ago
length=48; index=-1

Solution icon of github
length=13; index=-1

Solution icon of github
via GitHub by teolemon
, 5 months ago
length=13; index=-1

Solution icon of github
via GitHub by teolemon
, 9 months ago
length=13; index=-1

Solution icon of github
length=1; index=48

Solution icon of stackoverflow
length=1; index=-1

Solution icon of github
length=0; index=1

Stack trace

java.lang.StringIndexOutOfBoundsException: length=48; index=-1
	at java.lang.String.indexAndLength(String.java:294)
	at java.lang.String.substring(String.java:1067)
	at openfoodfacts.github.scrachx.openfood.fragments.IngredientsProductFragment.onViewCreated(IngredientsProductFragment.java:81)
	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1132)
	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1295)
	at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801)
	at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1643)
	at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:679)
	at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:166)
	at android.support.v4.view.ViewPager.populate(ViewPager.java:1272)
	at android.support.v4.view.ViewPager.populate(ViewPager.java:1120)
	at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1646)
	at android.view.View.measure(View.java:18794)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
	at android.view.View.measure(View.java:18794)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139)
	at android.view.View.measure(View.java:18794)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
	at android.view.View.measure(View.java:18794)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at android.view.View.measure(View.java:18794)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1465)
	at android.widget.LinearLayout.measureVertical(LinearLayout.java:748)
	at android.widget.LinearLayout.onMeasure(LinearLayout.java:630)
	at android.view.View.measure(View.java:18794)
	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5951)
	at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
	at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2643)
	at android.view.View.measure(View.java:18794)
	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2100)
	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1216)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1452)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
	at android.view.Choreographer.doCallbacks(Choreographer.java:670)
	at android.view.Choreographer.doFrame(Choreographer.java:606)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5461)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

2 times, 8 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 6 days ago
Samebug visitor profile picture
Unknown user
Once, 6 days ago
Samebug visitor profile picture
Unknown user
Once, 6 days ago
104 more bugmates