java.lang.IndexOutOfBoundsException: 98, -81

Stack Overflow | Ankush Chugh | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Error java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 in fragment by viewPager

    Stack Overflow | 9 months ago | Nabia Saroosh
    java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255) at java.util.ArrayList.get(ArrayList.java:308) at com.example.saroosh.masjidnow.Tabs.AddMasjid$1.onClick(AddMasjid.java:61) at android.view.View.performClick(View.java:5184) at android.view.View$PerformClick.run(View.java:20910) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5942) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1389)

    Root Cause Analysis

    1. java.lang.IndexOutOfBoundsException

      98, -81

      at android.text.PackedIntVector.deleteAt()
    2. Android Platform
      TextView.onTextContextMenuItem
      1. android.text.PackedIntVector.deleteAt(PackedIntVector.java:218)
      2. android.text.DynamicLayout.reflow(DynamicLayout.java:308)
      3. android.text.DynamicLayout.access$000(DynamicLayout.java:41)
      4. android.text.DynamicLayout$ChangeWatcher.reflow(DynamicLayout.java:650)
      5. android.text.DynamicLayout$ChangeWatcher.onSpanChanged(DynamicLayout.java:679)
      6. android.text.SpannableStringBuilder.sendSpanChanged(SpannableStringBuilder.java:1019)
      7. android.text.SpannableStringBuilder.sendToSpanWatchers(SpannableStringBuilder.java:601)
      8. android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:532)
      9. android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:465)
      10. android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:38)
      11. android.widget.TextView.paste(TextView.java:9130)
      12. android.widget.TextView.onTextContextMenuItem(TextView.java:8940)
      12 frames
    3. com.paprbit.dcoder
      DcoderEditor.onTextContextMenuItem
      1. com.paprbit.dcoder.ui.widget.DcoderEditor.onTextContextMenuItem(DcoderEditor.java:881)
      1 frame
    4. Android Platform
      ActivityThread.main
      1. android.widget.Editor$ActionPopupWindow.onClick(Editor.java:3047)
      2. android.view.View.performClick(View.java:4825)
      3. android.view.View$PerformClick.run(View.java:20144)
      4. android.os.Handler.handleCallback(Handler.java:815)
      5. android.os.Handler.dispatchMessage(Handler.java:104)
      6. android.os.Looper.loop(Looper.java:194)
      7. android.app.ActivityThread.main(ActivityThread.java:5537)
      7 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Method.java)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:956)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:751)
      2 frames