Fixed
Status Update
Comments
nj...@google.com <nj...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
ss...@google.com <ss...@google.com>
ap...@google.com <ap...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
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: