Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

ColorSwitcherActivity crash upon layer switch #1090

Closed
langsmith opened this issue Jun 7, 2019 · 8 comments
Closed

ColorSwitcherActivity crash upon layer switch #1090

langsmith opened this issue Jun 7, 2019 · 8 comments

Comments

@langsmith
Copy link
Contributor

Was doing 8.1.0-alpha.1 QA and saw that ColorSwitcherActivity crashes when the spinner menu is switched from Water to Building

Process: com.mapbox.mapboxandroiddemo.debug, PID: 26753
    com.mapbox.mapboxsdk.exceptions.ConversionException: Not a valid rgb/rgba value
        at com.mapbox.mapboxsdk.utils.ColorUtils.rgbaToColor(ColorUtils.java:136)
        at com.mapbox.mapboxsdk.style.layers.FillLayer.getFillColorAsInt(FillLayer.java:214)
        at com.mapbox.mapboxandroiddemo.examples.styles.ColorSwitcherActivity$1.onItemSelected(ColorSwitcherActivity.java:54)
        at android.widget.AdapterView.fireOnSelected(AdapterView.java:944)

Screen Shot 2019-06-07 at 10 25 29 AM

@langsmith
Copy link
Contributor Author

No crash for me on master. Looking into what happens on 8.1.0-alpha.1 and/or 8.1.0-alpha.2.

@langsmith
Copy link
Contributor Author

Crashing on 8.1.0-alpha.2

Seems that fill-color: rgba(233.00001525878907,233.00001525878907,231.00001525878907,1) can't be converted to an int 🤔 . building.getFillColorAsInt() leads to the 💥

Screen Shot 2019-06-07 at 1 34 23 PM
Screen Shot 2019-06-07 at 1 34 16 PM

@langsmith
Copy link
Contributor Author

Same crash on 8.1.0-alpha.1

@langsmith
Copy link
Contributor Author

cc @mapbox/maps-android as fyi that this could be something to look into before the stable 8.1.0 release.

@zugaldia
Copy link
Member

@langsmith good find - I added it to the board, I agree to prioritize.

@langsmith
Copy link
Contributor Author

ls-maps-sdk-8.1.0 is the QA branch where this crash is happening

@LukasPaczos
Copy link
Member

Nice catch @langsmith!

mapbox/mapbox-gl-native#14954 is on its way, and I'm going to verify with the snapshot when it lands.

@LukasPaczos
Copy link
Member

Fixed with mapbox/mapbox-gl-native#14954 that's going to be included in the v8.1.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants