java.lang.IndexOutOfBoundsException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • cutting text at the end of textarea with big content crashed ============================================== Code to reproduce the bug + Logcat are on github: - https://github.com/bdedardel/cordova-test Description ----------- When I cut some text at the end of a textarea with big content, using android native copy/cut/paste, application crashes. - If I build android app with cordova, it seems ok. - If I build android app with crosswalk plugin, application crashes (IndexOutOfBoundsException). ### Steps - run ./bin/build.sh - install and open cordova-test-nok.apk on the android mobile phone - goto line 1951/2000 and cut it, everything is ok - close app and reopen it - goto line 1952/2000 and cut it, application crashes ### Environment - cordova 5.1.1 Tested on: - Wiko Darkmoon, android 4.2.2 - LG G2, android 5.0.2 Debug ------ ### Stack trace Trace (from Logcat, see: https://github.com/bdedardel/cordova-test/blob/master/bugs/BUG001.md) ``` W/System.err(18785): java.lang.IndexOutOfBoundsException: setSpan (-26377 ... -26377) starts before 0 W/System.err(18785): at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1021) W/System.err(18785): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:592) W/System.err(18785): at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:484) W/System.err(18785): at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:435) W/System.err(18785): at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:30) W/System.err(18785): at org.chromium.content.browser.input.AdapterInputConnection.updateState(AdapterInputConnection.java:184) W/System.err(18785): at org.chromium.content.browser.ContentViewCore.updateImeAdapter(ContentViewCore.java:2322) W/System.err(18785): at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) W/System.err(18785): at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53) W/System.err(18785): at android.os.Handler.dispatchMessage(Handler.java:107) W/System.err(18785): at android.os.Looper.loop(Looper.java:194) W/System.err(18785): at android.app.ActivityThread.main(ActivityThread.java:5391) W/System.err(18785): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err(18785): at java.lang.reflect.Method.invoke(Method.java:525) W/System.err(18785): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) W/System.err(18785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) W/System.err(18785): at dalvik.system.NativeStart.main(Native Method) F/chromium(18785): [FATAL:jni_android.cc(295)] Check failed: false. Please include Java exception stack in crash report F/libc (18785): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 18785 (del.CordovaTest) F/libc (18785): Send stop signal to pid:18785 in debugger_signal_handler ```
    via by bdedardel,
  • cutting text at the end of textarea with big content crashed ============================================== Code to reproduce the bug + Logcat are on github: - https://github.com/bdedardel/cordova-test Description ----------- When I cut some text at the end of a textarea with big content, using android native copy/cut/paste, application crashes. - If I build android app with cordova, it seems ok. - If I build android app with crosswalk plugin, application crashes (IndexOutOfBoundsException). ### Steps - run ./bin/build.sh - install and open cordova-test-nok.apk on the android mobile phone - goto line 1951/2000 and cut it, everything is ok - close app and reopen it - goto line 1952/2000 and cut it, application crashes ### Environment - cordova 5.1.1 Tested on: - Wiko Darkmoon, android 4.2.2 - LG G2, android 5.0.2 Debug ------ ### Stack trace Trace (from Logcat, see: https://github.com/bdedardel/cordova-test/blob/master/bugs/BUG001.md) ``` W/System.err(18785): java.lang.IndexOutOfBoundsException: setSpan (-26377 ... -26377) starts before 0 W/System.err(18785): at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1021) W/System.err(18785): at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:592) W/System.err(18785): at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:484) W/System.err(18785): at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:435) W/System.err(18785): at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:30) W/System.err(18785): at org.chromium.content.browser.input.AdapterInputConnection.updateState(AdapterInputConnection.java:184) W/System.err(18785): at org.chromium.content.browser.ContentViewCore.updateImeAdapter(ContentViewCore.java:2322) W/System.err(18785): at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) W/System.err(18785): at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53) W/System.err(18785): at android.os.Handler.dispatchMessage(Handler.java:107) W/System.err(18785): at android.os.Looper.loop(Looper.java:194) W/System.err(18785): at android.app.ActivityThread.main(ActivityThread.java:5391) W/System.err(18785): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err(18785): at java.lang.reflect.Method.invoke(Method.java:525) W/System.err(18785): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) W/System.err(18785): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) W/System.err(18785): at dalvik.system.NativeStart.main(Native Method) F/chromium(18785): [FATAL:jni_android.cc(295)] Check failed: false. Please include Java exception stack in crash report F/libc (18785): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 18785 (del.CordovaTest) F/libc (18785): Send stop signal to pid:18785 in debugger_signal_handler ```
    via by bdedardel,
  • IndexOutOfBoundsException
    via GitHub by msya
    ,
  • IndexOutOfBoundsException
    via GitHub by olegosipenko
    ,
  • Crash on long press back button
    via GitHub by madhur
    ,
    • java.lang.IndexOutOfBoundsException: setSpan (-26377 ... -26377) starts before 0 at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1021) at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:592) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:484) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:435) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:30) at org.chromium.content.browser.input.AdapterInputConnection.updateState(AdapterInputConnection.java:184) at org.chromium.content.browser.ContentViewCore.updateImeAdapter(ContentViewCore.java:2322) at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5391) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600) at dalvik.system.NativeStart.main(Native Method)

    Users with the same issue

    Unknown visitor1 times, last one,
    filpgame
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    9 more bugmates