maplibre-react-native
maplibre-react-native copied to clipboard
App quite unexpectedly on IOS simulator when loading mapview
Hello I recently update react native to highest version, and mac os to Sonoma version when open a scene containing mapview, the app quit unexpectedly Can I do now to fix?
I think I'm seeing the same thing. I don't believe it's related to react native version (I'm on 0.72). For me, it happened after upgrading to sonoma and getting on xcode 15.
I ran through the debugger in xcode and it looks like some sort of opengl thread is crashing. Here's a screen shot of the crashed thread, which is ultimately breaking in a memmove which seems to be triggered from opengl rendering:
I'll try to get more information on this and am happy to try to diagnose and debug this more, but would also appreciate any suggestions / pointers.
Here's the full callstack Im seeing:
Thread 7 Queue : com.apple.opengl.cvmDoWork (serial)
#0 0x000000010356f410 in _platform_memmove ()
#1 0x00000001b8650ff8 in cvmsServerElementBuild ()
#2 0x00000001b864ce34 in cvms_element_build_from_source ()
#3 0x00000001b8643854 in cvm_deferred_build_modular(void*) ()
#4 0x000000010365d73c in _dispatch_client_callout ()
#5 0x0000000103665a30 in _dispatch_lane_serial_drain ()
#6 0x0000000103666774 in _dispatch_lane_invoke ()
#7 0x00000001036731a8 in _dispatch_root_queue_drain_deferred_wlh ()
#8 0x0000000103672604 in _dispatch_workloop_worker_thread ()
#9 0x000000010358f814 in _pthread_wqthread ()
Enqueued from com.apple.main-thread (Thread 1) Queue : com.apple.main-thread (serial)
#0 0x00000001036621d0 in _dispatch_async_f_slow ()
#1 0x00000001b8642df8 in cvmObtainMonolithicFunction ()
#2 0x00000001a5dd33a8 in gleBuildPrimitiveRenderFunc ()
#3 0x00000001a5dd39fc in gleBeginTrianglesRender ()
#4 0x00000001a5d76d84 in gleDrawArraysOrElements_ExecCore ()
#5 0x00000001a5d75fd0 in glDrawElements_ES2Exec ()
#6 0x00000001061b1a68 in mbgl::gl::Context::draw(mbgl::gfx::DrawMode const&, unsigned long, unsigned long) ()
#7 0x00000001061f109c in mbgl::gl::Program<mbgl::ClippingMaskProgram>::draw(mbgl::gfx::Context&, mbgl::gfx::RenderPass&, mbgl::gfx::DrawMode const&, mbgl::gfx::DepthMode const&, mbgl::gfx::StencilMode const&, mbgl::gfx::ColorMode const&, mbgl::gfx::CullFaceMode const&, mbgl::gfx::UniformValues<mbgl::TypeList<mbgl::uniforms::matrix>> const&, mbgl::gfx::DrawScope&, mbgl::gfx::AttributeBindings<mbgl::TypeList<mbgl::attributes::pos>> const&, mbgl::gfx::TextureBindings<mbgl::TypeList<>> const&, mbgl::gfx::IndexBuffer const&, unsigned long, unsigned long) ()
#8 0x000000010626e960 in void mbgl::Program<mbgl::ClippingMaskProgram, (mbgl::gfx::PrimitiveType)2, mbgl::TypeList<mbgl::attributes::pos>, mbgl::TypeList<mbgl::uniforms::matrix>, mbgl::TypeList<>, mbgl::style::Properties<>>::draw<mbgl::gfx::Triangles>(mbgl::gfx::Context&, mbgl::gfx::RenderPass&, mbgl::gfx::Triangles const&, mbgl::gfx::DepthMode const&, mbgl::gfx::StencilMode const&, mbgl::gfx::ColorMode const&, mbgl::gfx::CullFaceMode const&, mbgl::gfx::IndexBuffer const&, std::__1::vector<mbgl::Segment<mbgl::TypeList<mbgl::attributes::pos>>, std::__1::allocator<mbgl::Segment<mbgl::TypeList<mbgl::attributes::pos>>>> const&, mbgl::gfx::UniformValues<mbgl::TypeList<mbgl::uniforms::matrix>> const&, mbgl::gfx::AttributeBindings<mbgl::TypeList<mbgl::attributes::pos>> const&, mbgl::gfx::TextureBindings<mbgl::TypeList<>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&) ()
#9 0x000000010626e7e8 in mbgl::PaintParameters::renderTileClippingMasks(std::__1::shared_ptr<std::__1::vector<std::__1::reference_wrapper<mbgl::RenderTile const>, std::__1::allocator<std::__1::reference_wrapper<mbgl::RenderTile const>>> const> const&) ()
#10 0x0000000106242968 in mbgl::RenderFillLayer::render(mbgl::PaintParameters&) ()
#11 0x0000000106285548 in mbgl::Renderer::Impl::render(mbgl::RenderTree const&) ()
#12 0x0000000106283f38 in mbgl::Renderer::render(std::__1::shared_ptr<mbgl::UpdateParameters> const&) ()
#13 0x00000001064c81d4 in MGLRenderFrontend::render() [inlined] at /Users/ec2-user/actions-runner/_work/maplibre-gl-native/maplibre-gl-native/platform/ios/platform/darwin/src/MGLRendererFrontend.h:57
#14 0x00000001064c8190 in -[MGLMapView renderSync] at /Users/ec2-user/actions-runner/_work/maplibre-gl-native/maplibre-gl-native/platform/ios/platform/ios/src/MGLMapView.mm:1025
#15 0x0000000106489500 in MGLMapViewImpl::render() [inlined] at /Users/ec2-user/actions-runner/_work/maplibre-gl-native/maplibre-gl-native/platform/ios/platform/ios/src/MGLMapView+Impl.mm:14
#16 0x00000001064894f0 in -[MGLMapViewImplDelegate glkView:drawInRect:] at /Users/ec2-user/actions-runner/_work/maplibre-gl-native/maplibre-gl-native/platform/ios/platform/ios/src/MGLMapView+OpenGL.mm:26
#17 0x00000001b80d156c in -[GLKView _display:] ()
#18 0x000000018a1b9518 in CA::Layer::layout_and_display_if_needed(CA::Transaction*) ()
#19 0x000000018a0f2d30 in CA::Context::commit_transaction(CA::Transaction*, double, double*) ()
#20 0x000000018a122aa8 in CA::Transaction::commit() ()
#21 0x000000018a026f0c in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
#22 0x000000018a127a70 in display_timer_callback(__CFMachPort*, void*, long, void*) ()
#23 0x00000001803d8a60 in __CFMachPortPerform ()
#24 0x000000018040f5c8 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#25 0x000000018040eb98 in __CFRunLoopDoSource1 ()
#26 0x00000001804091a8 in __CFRunLoopRun ()
#27 0x0000000180408514 in CFRunLoopRunSpecific ()
#28 0x000000018ef06ae4 in GSEventRunModal ()
#29 0x00000001853e8040 in -[UIApplication _run] ()
#30 0x00000001853ebcc8 in UIApplicationMain ()
#31 0x0000000100638eb4 in main at /Users/samchristiansen/projects/ioverlander-client-react/ios/iov/main.m:7
#32 0x00000001035cd544 in start_sim ()
#33 0x00000001037160e0 in start ()
#34 0xa20e000000000000 in 0xa20e000000000000 ()
I had the same problem, with the configuration:
macOS Sonoma 14.5 React Native 0.74.1 MapLibre React Native 10.0.0-alpha.4 xcode 15.4
I don't have this issue anymore.
@ErTurco That is fantastic to hear! Thanks for reporting back. It looks like the issue was revolved with MapLibre iOS native 6.2. Shoutout to @sjchristi!