maps
maps copied to clipboard
[Bug]: insertReactSubview crash if rapidly changed markers
Mapbox Implementation
Mapbox
Mapbox Version
11.12.0
React Native Version
0.80.0
Platform
iOS
@rnmapbox/maps version
10.1.39
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertObject:atIndex:]: index 7 beyond bounds [0 .. 5]' *** First throw call stack:
@objc open override func insertReactSubview(_ subview: UIView!, at atIndex: Int) {
addToMap(subview)
super.insertReactSubview(subview, at: atIndex)
}
Expected behavior
No response
Notes / preliminary analysis
No response
Additional links and references
No response
I think our issues are related. #3886
@Willham12 is this still relevant? Can you reproduce it?! You should be able to programatically change a lot of markers, to emulate this scenario.
Idk, switched to another library. Sorry and thanks for you effort.