Fixed
Status Update
Comments
nj...@google.com <nj...@google.com> #2
Sergio, this looks shapes related, can you take a look?
ss...@google.com <ss...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 1cda0316a07f206426e5483aaa55fd9aac49b5f3
Author: Sergio Sancho <ssancho@google.com>
Date: Wed Aug 21 10:49:27 2024
Make RoundedPolygon creation more robust.
Ensure that when a polygon is created empty, or some of the sides are empty,
we produce a result.
Relnote: Make RoundedPolygon creation more robust.
Test: Added
Bug: 360888486
Change-Id: Ib862c9c59537f28a2cd3ac469ce883734add1269
M graphics/graphics-shapes/src/androidInstrumentedTest/kotlin/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt
https://android-review.googlesource.com/3235682
Branch: androidx-main
commit 1cda0316a07f206426e5483aaa55fd9aac49b5f3
Author: Sergio Sancho <ssancho@google.com>
Date: Wed Aug 21 10:49:27 2024
Make RoundedPolygon creation more robust.
Ensure that when a polygon is created empty, or some of the sides are empty,
we produce a result.
Relnote: Make RoundedPolygon creation more robust.
Test: Added
Bug: 360888486
Change-Id: Ib862c9c59537f28a2cd3ac469ce883734add1269
M graphics/graphics-shapes/src/androidInstrumentedTest/kotlin/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/commonMain/kotlin/androidx/graphics/shapes/RoundedPolygon.kt
ss...@google.com <ss...@google.com>
pr...@google.com <pr...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.graphics:graphics-shapes:1.1.0-alpha01
androidx.graphics:graphics-shapes-android:1.1.0-alpha01
androidx.graphics:graphics-shapes-desktop:1.1.0-alpha01
androidx.graphics:graphics-shapes-iosarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-iossimulatorarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-iosx64:1.1.0-alpha01
androidx.graphics:graphics-shapes-linuxarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-linuxx64:1.1.0-alpha01
androidx.graphics:graphics-shapes-macosarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-macosx64:1.1.0-alpha01
androidx.graphics:graphics-shapes-tvosarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-tvossimulatorarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-tvosx64:1.1.0-alpha01
androidx.graphics:graphics-shapes-watchosarm32:1.1.0-alpha01
androidx.graphics:graphics-shapes-watchosarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-watchossimulatorarm64:1.1.0-alpha01
androidx.graphics:graphics-shapes-watchosx64:1.1.0-alpha01
Description
Component used: Graphics
Version used: 1.0.0-rc01
Devices/Android versions reproduced on: Pixel 8, Xiaomi 11T, Samsung S22. Seen on Android 13 and 14 so far.
Since updating my compose-foundation version to 1.7.0-beta07 I've started getting a crash in the graphics library when trying to construct a RoundedPolygon shape (a hexagon):
Fatal Exception: java.lang.IllegalArgumentException Can't get the direction of a 0-length vector
Here is the code for creating my shape:
And here's roughly how it's used:
As I mentioned that code was working perfectly until I updated my compose version and is now intermittently crashing – not on first draw, but seemingly when returning to a screen after a while (e.g. after backgrounding).
Here's a stack trace: