Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IndexOutOfBoundsException: offset(32) should be less than line limit(31) #20222

Closed
thomashorta opened this issue Feb 20, 2024 · 4 comments

Comments

@thomashorta
Copy link
Contributor

thomashorta commented Feb 20, 2024

This issue was found in Google Play's pre-launch report for 24.3-rc-1 beta, and only happened once in one device tested by Google Play. Internal ref: p1708470532207739-slack-C012H19SZQ8

Exception java.lang.IndexOutOfBoundsException: offset(32) should be less than line limit(31)
  at android.text.TextLine.measure (TextLine.java:389)
  at android.text.Layout.getHorizontal (Layout.java:1390)
  at android.text.Layout.getHorizontal (Layout.java:1366)
  at android.text.Layout.getPrimaryHorizontal (Layout.java:1336)
  at android.text.Layout.getPrimaryHorizontal (Layout.java:1325)
  at ezy.d (PG:1)
  at ezy.a (PG:38)
  at fap.e (PG:1)
  at ezj.l (PG:11)
  at eog.r (PG:27)
  at enl.addExtraDataToAccessibilityNodeInfo (PG:3)
  at android.view.AccessibilityInteractionController.populateAccessibilityNodeInfoForView (AccessibilityInteractionController.java:439)
  at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread (AccessibilityInteractionController.java:372)
  at android.view.AccessibilityInteractionController.-$$Nest$mfindAccessibilityNodeInfoByAccessibilityIdUiThread
  at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage (AccessibilityInteractionController.java:1719)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:205)
  at android.os.Looper.loop (Looper.java:294)
  at android.app.ActivityThread.main (ActivityThread.java:8177)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:552)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:971)
@dangermattic
Copy link
Collaborator

dangermattic commented Feb 20, 2024

Thanks for reporting! 👍

@thomashorta
Copy link
Contributor Author

For some reason, the stack trace from the pre-launch report is obfuscated (even with R8 mapping file properly uploaded), so it's hard to know exactly where this happened, but that's likely not important since based on the discussion in this Google Issue this is a (somewhat rare) bug inside the Compose library. Thanks @RenanLukas for finding that thread.

I was able to find just 1 other occurrence of that issue, in Sentry WORDPRESS-ANDROID-2TZJ which seems to confirm that this is not a new bug AND is very low impact, so I'm setting the priority to LOW.

From the last message in that thread, a possible fix for that bug is available in:

androidx.compose.ui:ui-text:1.6.0-alpha01
androidx.compose.ui:ui-text-android:1.6.0-alpha01

We are currently using Compose BOM 2023.10.00, which uses version 1.5.3, and according to the BOM mapping document we would need to use at least version 2024.01.00 for getting the 1.6.0 versions of the libs above.

Copy link

sentry-io bot commented Feb 20, 2024

Sentry Issue: WORDPRESS-ANDROID-2TZJ

@jkmassel jkmassel added UI and removed Compose labels Jul 3, 2024
@jkmassel
Copy link
Contributor

This issue doesn't appear to be relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants