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

[Android] Mapbox GL crashes on orientation change #1102

Open
fnusneha opened this issue Mar 8, 2018 · 3 comments
Open

[Android] Mapbox GL crashes on orientation change #1102

fnusneha opened this issue Mar 8, 2018 · 3 comments
Labels

Comments

@fnusneha
Copy link
Contributor

fnusneha commented Mar 8, 2018

I'm using mapbox/react-native-mapbox-gl 6.0.3 in a react native page. On multiple orientation changes, the app crashes with a SIGSEGV. This happens intermittently, and not on every orientation change.

This is the way I'm using the map in my component's render():

<Mapbox.MapView
                      styleURL={Mapbox.StyleURL.Street}
                      zoomLevel={this.props.zoomLevel}
                      centerCoordinate={[Number(location.longitude), Number(location.latitude)]}
                      style={styles.map}
                      ref={(ref) => this.map = ref}
                      zoomEnabled={this.props.zoomEnabled}
                      pitchEnabled={false}
                      scrollEnabled={this.props.scrollEnabled}
                      rotateEnabled={false}
                      logoEnabled={false}
                      onPress={() => { this.onPress() }}
                      minZoomLevel={2}
                      maxZoomLevel={15}>
                        <Mapbox.RasterSource key='d' id='aqiSource' url={url} tileSize={512}>
                          <Mapbox.RasterLayer id='aqiLayer' sourceID='aqiSource' style={{rasterOpacity:0.7}} />
                        </Mapbox.RasterSource>
                        <Mapbox.ShapeSource id='currentLocationMarkerSource' shape={this.state.featureCollection}>
                          <Mapbox.SymbolLayer
                            id='currentLocationMarkerSymbols'
                            style={[mapStyles.icon, {textField:markerText}]}
                            aboveLayerID='aqiLayer' />
                        </Mapbox.ShapeSource>
                  </Mapbox.MapView>

This is a sample seg fault I'm getting:

03-08 01:07:41.867 7061-7061/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x69747269
03-08 01:07:41.884 7061-7061/? A/DEBUG: Abort message: 'PRODUCTION: Adjust is running in Production mode. Use this setting only for the build that you want to publish. Set the environment to `sandbox` if you want to test your app!'
03-08 01:07:41.884 7061-7061/? A/DEBUG:     r0 69747265  r1 8b840700  r2 fff0dae8  r3 af8ac215
03-08 01:07:41.884 7061-7061/? A/DEBUG:     r4 fff0dafc  r5 8b840700  r6 fff0dae8  r7 fff0da78
03-08 01:07:41.885 7061-7061/? A/DEBUG:     r8 fff0dae8  r9 fff0dafc  sl 3370a6b8  fp 3373fc90
03-08 01:07:41.885 7061-7061/? A/DEBUG:     ip 9334c128  sp fff0d9d8  lr af8ac235  pc af9e8e66  cpsr a00e0030
03-08 01:07:41.890 7061-7061/? A/DEBUG: backtrace:
03-08 01:07:41.890 7061-7061/? A/DEBUG:     #00 pc 001d8e66  /data/app/com.aws.android-2/lib/arm/libmapbox-gl.so
03-08 01:07:41.890 7061-7061/? A/DEBUG:     #01 pc 0009c231  /data/app/com.aws.android-2/lib/arm/libmapbox-gl.so
03-08 01:07:41.890 7061-7061/? A/DEBUG:     #02 pc 00099249  /data/app/com.aws.android-2/lib/arm/libmapbox-gl.so
03-08 01:07:41.891 7061-7061/? A/DEBUG:     #03 pc 00099047  /data/app/com.aws.android-2/lib/arm/libmapbox-gl.so
03-08 01:07:41.891 7061-7061/? A/DEBUG:     #04 pc 000cf50d  /data/app/com.aws.android-2/lib/arm/libmapbox-gl.so
03-08 01:07:41.891 7061-7061/? A/DEBUG:     #05 pc 000cf553  /data/app/com.aws.android-2/lib/arm/libmapbox-gl.so
03-08 01:07:41.891 7061-7061/? A/DEBUG:     #06 pc 01ca5c71  /data/app/com.aws.android-2/oat/arm/base.odex (offset 0x1a84000)
@nitaliano
Copy link
Owner

is this only happening with a RasterLayer?

@L-Yeiser
Copy link
Contributor

We are seeing this and our phone is locked to portrait. Any ideas?

@kristfal
Copy link
Collaborator

Can you try defining the map view style as:

position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0,

and see if you can reproduce?

@kristfal kristfal added the bug label Mar 18, 2019
mfazekas added a commit to mfazekas/maps that referenced this issue Mar 12, 2022
* Add styleJSON functionality to MapView styleURL

* Add styleJSON example

* Added styleJSON functionality to MapView styleURL on iOS

* no need to check for JSONArray

* Cleanup and added some more comments / doc

* Update android/rctmgl/src/main/java/com/mapbox/rctmgl/components/mapview/RCTMGLMapView.java

Co-authored-by: Miklós Fazekas <mfazekas@szemafor.com>

* update docs for styleJSON

* add setStyleURL method

Co-authored-by: Mattijs Fuijkschot <mattijs@innovactory.com>
Co-authored-by: Miklós Fazekas <mfazekas@szemafor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants