Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rare android crashes when map size is 0 #1521

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

mattshen
Copy link
Contributor

@mattshen mattshen commented Aug 1, 2017

This is to fix #245

This cannot be easily reproduced, and only happens in our released app from time to time (not often).

The safest way is to check width and height before calling newLatLngBounds(boundsToMove, width, height, 0)

@jeveloper
Copy link

I too have seen this in production, i think it might be related to google play service sdk bug , but thanks for doing this . Hope AirBNB will finally start pulling in code and making builds

@sytolk
Copy link

sytolk commented Aug 18, 2017

Put Map in https://github.com/jaysoo/react-native-parallax-scroll-view and issue #842 will be not so rare :)

@samthui
Copy link

samthui commented Sep 13, 2017

Hi, this issue re-appears after upgrading to RN 0.43.3.

Previously I used RN 0.42.3 & react-native-maps 0.13.1. My map is included in a View with flex=1.
Before upgrading to RN 0.43.3, this code worked fine:

<MapView
        provider={provider}
        ref="map"
         rotateEnabled={false}
         maxZoomLevel={18}
        style={{ flex: 1, width: "100%" }}
         initialRegion={this.state._region}
         onRegionChange={region => this.onRegionChange(region)}
/>

But after upgrading, same error occurs, only changing style={{ flex: 1, width: "100%" }} to style={{ width: some-hard-code-value, height: "100%" }} can remove the error, but that's not what I want.

@kozillla
Copy link

crash in RN 0.48

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

Successfully merging this pull request may close these issues.

Map size can't be 0. Most likely layout has not yet been occurred.
6 participants