Repro: outlineColor crashes on Android (New Architecture) [#57190]#57451
Repro: outlineColor crashes on Android (New Architecture) [#57190]#57451slvvn wants to merge 1 commit into
Conversation
… Arch
RNTesterPlayground renders a View with outlineColor set, which crashes on
mount on Android + New Architecture with:
java.lang.Double cannot be cast to java.lang.Integer
at com.facebook.react.uimanager.BaseViewManagerDelegate.setProperty
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Hi @slvvn! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
|
Closing — my repro does not actually reproduce the crash. Running it locally in RNTester on
The bug still exists (the line is unchanged from v0.86.0 through main), but a static I'll open a fresh issue comment on #57190 with a runnable Reanimated-based repro and a proposed one-line fix (route |
Summary
Reproduction for #57190.
On Android + New Architecture, setting
outlineColoron any view crashes on mount:Root cause: in
BaseViewManagerDelegate.kt, the outline color prop is cast directly toInt:while the sibling color props go through
ColorPropConverter.getColor(...):Under Fabric, color props are delivered as
java.lang.Double, sovalue as Int?throws. Likely introduced in #46934; reproduces on 0.85+.This PR edits
RNTesterPlayground.jsto reproduce the crash, per the contributing guidelines.Changelog:
[INTERNAL] [CHANGED] - Repro for outlineColor ClassCastException in RNTesterPlayground
Test Plan
java.lang.Double cannot be cast to java.lang.IntegerfromBaseViewManagerDelegate.setProperty.Not reproducible on iOS, and not on the legacy architecture when the packed ARGB color fits in a signed 32-bit int.