Repository navigation
fix(android): crash when changing Polygon render position in example app - #4362
Merged
Merged
Conversation
5 of 8 tasks
mfazekas
approved these changes
Oct 22, 2026
mfazekas
left a comment
Contributor
There was a problem hiding this comment.
Thanks, the fix is right. Two things before it can go in:
- The layer managers are generated, so CI's
yarn generatecheck reverts the change. Please make it in the shared template,android/src/main/java/com/rnmapbox/rnmbx/components/styles/layers/codeparts/LayerManagerCommonProps.codepart-kt.ejs, and runyarn generate. That also applies it to the other layer managers with the same pattern:RNMBXBackgroundLayerManager,RNMBXCircleLayerManager,RNMBXFillExtrusionLayerManager,RNMBXHeatmapLayerManager,RNMBXHillshadeLayerManager,RNMBXLineLayerManager,RNMBXModelLayerManager,RNMBXRasterLayerManager,RNMBXSkyLayerManagerandRNMBXSymbolLayerManager. - Yes, please use
asStringOrNull()forsourceLayerIDandslottoo. Both setters take aString?and the props can be removed the same way.
lochstar
force-pushed
the
android-layer-crash-fix
branch
from
October 25, 2026 22:37
2f1e19a to
6e1af7b
Compare
lochstar
force-pushed
the
android-layer-crash-fix
branch
from
October 25, 2026 22:39
6e1af7b to
12bda86
Compare
Contributor
Author
|
@mfazekas Have updated the PR with the requested changes. |
5 of 8 tasks
mfazekas
added a commit
that referenced
this pull request
Oct 27, 2026
BackgroundLayer, FillExtrusionLayer and SkyLayer managers don't use the LayerManagerCommonProps codepart, so they still called Dynamic.asString() on aboveLayerID/belowLayerID/sourceLayerID, which throws when a prop goes from a value to undefined. Follow-up to #4362.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I've added
asStringOrNullcheck tosetAboveLayerID,setBelow,sourceLayerIDandslot.Steps to reproduce
Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)