Customizable, performant and vendor-free vector and raster maps, flutter wrapper for maplibre-native and maplibre-gl-js (fork of flutter-mapbox-gl/maps)
When we modify a geoJsonSource with mapcontroller.setGeoJsonSource, it occasionally (though not often) causes the app to crash completely (on an iPhone 13 Pro running iOS 18). In Firebase, we see the following crash:
Platforms
iOS
Version of flutter maplibre_gl
0.20
Bug Description
When we modify a geoJsonSource with mapcontroller.setGeoJsonSource, it occasionally (though not often) causes the app to crash completely (on an iPhone 13 Pro running iOS 18). In Firebase, we see the following crash:
Crashed: com.apple.main-thread 0 AGXMetalG14 0x374974 + 64
1 MapLibre 0x401170 mbgl::mtl::BufferResource::bindVertex(NS::SharedPtr const&, unsigned long, unsigned long, unsigned long) const + 52
2 MapLibre 0x406744 mbgl::mtl::Drawable::draw(mbgl::PaintParameters&) const + 368
3 MapLibre 0x42b6e8 mbgl::mtl::TileLayerGroup::render(mbgl::RenderOrchestrator&, mbgl::PaintParameters&) + 720
4 MapLibre 0x22c954 mbgl::Renderer::Impl::render(mbgl::RenderTree const&, std::__1::shared_ptr const&) + 3104
5 MapLibre 0x22ad60 mbgl::Renderer::render(std::__1::shared_ptr const&) + 72
6 MapLibre 0xa200c MLNUnitBezierForMediaTimingFunction(CAMediaTimingFunction) + 15052
7 MapLibre 0xa1f78 MLNUnitBezierForMediaTimingFunction(CAMediaTimingFunction) + 14904
8 MapLibre 0xc2d24 MLNMapViewImpl::render() + 28
9 MetalKit 0x7570 -[MTKView draw] + 160
10 QuartzCore 0x782fc + 416
11 QuartzCore 0xcf29c + 472
12 QuartzCore 0x4e0d4 + 648
13 QuartzCore 0x91398 + 88
14 UIKitCore 0xaeb78 + 52
15 UIKitCore 0xac174 + 332
16 UIKitCore 0xabfe8 + 84
17 UIKitCore 0xabc38 + 172
18 UIKitCore 0xacbac + 92
19 CoreFoundation 0x57088 + 28
20 CoreFoundation 0x5701c + 176
21 CoreFoundation 0x54b08 + 244
22 CoreFoundation 0x53d04 + 840
23 CoreFoundation 0x535b8 CFRunLoopRunSpecific + 572
24 GraphicsServices 0x11c4 GSEventRunModal + 164
25 UIKitCore 0x3de5f0 + 816
26 UIKitCore 0x48d10c UIApplicationMain + 340
27 UIKitCore 0x7b9e50 + 10212
28 Runner 0x8610 main + 120 (AppDelegate.swift:120)
29 ??? 0x1ab4b3d34 (Missing)
Steps to Reproduce
Expected Results
Map is rendered with updated geojson data.
Actual Results
App is crashing very rarely.
Code Sample