Status Update
Comments
ti...@google.com <ti...@google.com>
se...@candybytes.com <se...@candybytes.com> #2
I think this is related to src/main/AndroidManifest.xml
to src/androidTest/AndroidManifest.xml
might fix the tests and not add this to the manifest of projects using the library.
ku...@gmail.com <ku...@gmail.com> #3
Thank you for filing this bug. The intent filter element is added to queries for developer's convenience who wants to use MediaBrowser targetting Android 11 (
26...@gmail.com <26...@gmail.com> #4
Branch: androidx-main
commit bdcf20ccfe86deb50337184444d7660ad2745916
Author: Gyumin Sim <gyumin@google.com>
Date: Mon Sep 27 16:20:27 2021
Remove intent query elements from manifest of media2-session
It makes the package visibility filter opted-in by users rather than
automatically by the library.
It partially reverts If2a46bce0cdc78750d08eec66488fe3150610e5b.
Bug: 185314633
Relnote: "The library won't inject the package visibility filter for
`MediaController`, `MediaBrowser`, or `MediaSessionManager` anymore.
Please specify a `<queries>` element in your apps manifest when
targeting API level 30 or higher."
Test: ./media2/media2-session/version-compat-tests/runtest.sh 4 on API 30
Change-Id: If78589b6f645698f859c57d9013b4c7da9183236
M media2/media2-session/src/main/java/androidx/media2/session/MediaSessionManager.java
M media2/media2-session/src/main/AndroidManifest.xml
M media2/media2-session/src/main/java/androidx/media2/session/MediaController.java
jo...@gmail.com <jo...@gmail.com> #5
Branch: androidx-main
commit bc89e5d7c7785b0c4ea4842fe73a1e1324b6ea33
Author: Gyumin Sim <gyumin@google.com>
Date: Mon Sep 27 15:41:38 2021
Remove intent query element from manifest of media
It makes the package visibility filter opted-in by users rather than
automatically by the library.
It partially reverts If2a46bce0cdc78750d08eec66488fe3150610e5b.
Bug: 185314633
Relnote: "The library won't inject the package visibility filter for
`MediaBrowserCompat` anymore. Please specify a `<queries>` element
in your apps manifest when targeting API level 30 or higher."
Test: ./media/version-compat-tests/runtest.sh 4 on API 30
Change-Id: I0a964e51887211650279b9bd1efd79ce4c5bb5c2
M media/media/src/main/java/android/support/v4/media/MediaBrowserCompat.java
M media/media/src/main/AndroidManifest.xml
de...@greyarea.no <de...@greyarea.no> #6
I'm expecting the fix for androidx.media will be released with the version 1.4.3 targeting October 14th.
ja...@ntucenterprise.sg <ja...@ntucenterprise.sg> #7
We also started to receive this crash on error reports, after upgrading activity-compose
to 1.6.1.
Any update on this?
si...@google.com <si...@google.com> #8
Halil I vaguely remember that you fixed a similar issue recently or mentioned about it (a 1 off error for getHorizontalPosition).
Does this sound familiar?
java.lang.IndexOutOfBoundsException: measureLimit (120) is out of start (0) and limit (119) bounds
ha...@google.com <ha...@google.com> #9
Yes this is the same bug that we've investigated priorly. Both originate from AccessibilityDelegateCompat and use getBoundingBox
. The underlying issue is in the platform TextLayout but we can circumvent the issue by falling back to previous implementation for the last cursor position.
ha...@google.com <ha...@google.com> #10
I looked at this a bit more yesterday. Some of my findings include;
- This has always been buggy unfortunately. Previous getBoundingBox implementation also had a call to
getPrimaryHorizontal(offset)
that is the culprit from platform. getPrimaryHorizontal(offset)
always fails in a situation similar to following;- Text is ellipsized.
- Ellipsis region includes an LF character '\n'
- offset points to a character after this LF
- TextLine object in text layout is set with a start and limit on given text.
- Limit does not care about ellipsis but cares about LF characters. So, a text is always guaranteed to be partitioned into multiple lines in the existence of LF.
- Querying an ellipsized offset which would have been on a different line anyway causes a crash on TextLine since TextLine thinks that the given offset is out of bounds.
There is a comment in TextLayout.kt
that references a similar problem with platform text layout
jm...@gmail.com <jm...@gmail.com> #11
Is there a recommended work around for this? Our team is seeing a rather appreciable number of reports for this crash.
Thank you!
androidx.appcompat:appcompat:1.6.1
androidx.compose:compose-bom:2023.04.00
si...@empiriecom.com <si...@empiriecom.com> #12
we are also interested in a fix or workaround for this.
Best regards!
Versions used:
- androidx.activity:activity-compose:1.6.0
- androidx.compose.ui:ui:1.3.3
- androidx.compose.ui:ui-text:1.3.3
ap...@google.com <ap...@google.com> #13
Branch: androidx-main
commit 9e49803f6ce45ec5a3a1899101485f13036c6432
Author: Halil Ozercan <halilibo@google.com>
Date: Wed May 10 17:23:14 2023
Fix getBoundingBox crashing for some ellipsized indices
This CL fixes a bug where getBoundingBox throws an index out of bounds error when the queried offset is in the ellipsized region and comes after a LINE_FEED(\n) character.
Additionally we are converging some exception types in AndroidParagraph to use `IllegalArgumentException` via `require` function, instead of `AssertionError`.
Fix:
Relnote: "`Paragraph` methods that used to throw `AssertionError` for out of bounds offsets now throw `IllegalArgumentException` as `MultiParagraph` does."
Test: :compose:ui:ui-text:cAT
Change-Id: I549d3ec936afbd941361690d1f16fadc4998670a
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationBoundingBoxTest.kt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/ParagraphIntegrationTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/AndroidParagraph.android.kt
M text/text/src/main/java/androidx/compose/ui/text/android/LayoutHelper.kt
ha...@google.com <ha...@google.com> #14
We have attempted a blind fix since we couldn't reproduce the issue with the exact stacktrace. However, we still have high confidence that this fix should address the original issue.
Top of the stacktrace in all reported cases is a very isolated path that tells us that all crashes were highly likely resulted from querying a bounding box in an ellipsized region of a text layout. Attempted fix solves this particular issue.
wi...@dcsg.com <wi...@dcsg.com> #15
pr...@google.com <pr...@google.com> #16
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.ui:ui-text:1.6.0-alpha01
androidx.compose.ui:ui-text-android:1.6.0-alpha01
Description
Version used: androidx.activity:activity-compose:1.5.0
Theme used: -
Devices/Android versions reproduced on: Nokia 1 Android 8.1 (SDK 27) 240DPI + 480 x 854
Description: This crash log came from pre-launch report. The crash occurred only with that small device noted above. The "reviews" section is the last widget in that LazyColumn shown in screenrecord. There are no any editable textfields in that page where the app crashes.
Screenrecord of the crash:
Stacktrace:
FATAL EXCEPTION: main
Process:
java.lang.IndexOutOfBoundsException: measureLimit (120) is out of start (0) and limit (119) bounds
at android.text.TextLine.handleRun(TextLine.java:990)
at android.text.TextLine.measureRun(TextLine.java:417)
at android.text.TextLine.measure(TextLine.java:307)
at android.text.Layout.getHorizontal(Layout.java:1094)
at android.text.Layout.getHorizontal(Layout.java:1072)
at android.text.Layout.getPrimaryHorizontal(Layout.java:1043)
at android.text.Layout.getPrimaryHorizontal(Layout.java:1033)
at u1.b.a(Unknown Source:4)
at u1.b.b(Unknown Source:6)
at u1.n.g(SourceFile:2)
at b2.a.c(Unknown Source:10)
at t1.u.b(SourceFile:7)
at androidx.compose.ui.platform.r$d.addExtraDataToAccessibilityNodeInfo(SourceFile:14)
at android.view.AccessibilityInteractionController$AccessibilityNodePrefetcher.prefetchAccessibilityNodeInfos(AccessibilityInteractionController.java:980)
at android.view.AccessibilityInteractionController.findAccessibilityNodeInfoByAccessibilityIdUiThread(AccessibilityInteractionController.java:336)
at android.view.AccessibilityInteractionController.-wrap1(Unknown Source:0)
at android.view.AccessibilityInteractionController$PrivateHandler.handleMessage(AccessibilityInteractionController.java:1324)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)