question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android crash with length=15; index=-6

See original GitHub issue

I have faced this issues in android

Environment

React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
      Memory: 33.66 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.10.0 - /usr/local/bin/node
      npm: 6.5.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 25, 26, 27
        Build Tools: 27.0.3, 28.0.3
        System Images: android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3
      react-native: 0.57.8 => 0.57.8
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-rename: 2.3.2

Description

length=15; index=-6
getLineTop
    StaticLayout.java:1208
onMeasure
    TextView.java:8629
measure
    View.java:23169
updateLayout
    NativeViewHierarchyManager.java:176
execute
    UIViewOperationQueue.java:175
run
    UIViewOperationQueue.java:894
flushPendingBatches
    UIViewOperationQueue.java:1001
access$2400
    UIViewOperationQueue.java:46
doFrameGuarded
    UIViewOperationQueue.java:1061
doFrame
    GuardedFrameCallback.java:29
doFrame
    ReactChoreographer.java:134
doFrame
    ChoreographerCompat.java:105
run
    Choreographer.java:947
doCallbacks
    Choreographer.java:761
doFrame
    Choreographer.java:693
run
    Choreographer.java:935
handleCallback
    Handler.java:873
dispatchMessage
    Handler.java:99
loop
    Looper.java:193
main
    ActivityThread.java:6669
invoke
    Method.java
run
    RuntimeInit.java:493
main
    ZygoteInit.java:858

Reproducible Demo

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
luutruongcommented, Dec 30, 2018

Thank you @noahtallen for explain. After debug my code and I have found the issues.

<Text numberOfLines ={-1}>A long text here....</Text>

That crash on android but IOS did not.

Does it is bug?

0reactions
rickhanloniicommented, Dec 31, 2018

Hey @luutruong, thanks for filing

This looks like a question and not a bug. Since this issue tracker is not a help forum, we’re going to close and recommend posting to StackOverflow. If you believe this is a bug, please update the provide a way for us to reproduce/confirm and we’ll consider re-opening 👌

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android EditText on longPress - Stack Overflow
Looks like the system is trying to create a PopupWindow containing a TextView. Then it crashes when applying the theme. Do you use...
Read more >
Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >
How to make sense of Android crash logs | Bugsnag Blog
Understand how to make sense of Android crash logs, including exception stack traces, ANR traces, and NDK tombstones.
Read more >
crash in java.lang.IndexOutOfBoundsException: setSpan (N ...
Crash Signature: [@ java.lang.IndexOutOfBoundsException: setSpan (424 ... 424) ends beyond length 423 at android.text.SpannableStringBuilder.
Read more >
IndexOutOfBoundsException in RecyclerView ... - Issue Tracker
at android.support.v7.widget. ... IndexOutOfBoundsException: Invalid index 3, size is 2 ... google.com> #137 Apr 6, 2016 11:15AM.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found