question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example app crashes on iOS 15.4, emulator only

See original GitHub issue

Describe the bug
The app crashes under very specific conditions:

  • emulator-only (it worked fine on my iPhone 13 Pro, even after upgrading to 15.4)
  • iOS 15.4 (works fine on emulator for 14.2)
  • release vs debug build : crashes in both modes
  • I first tested under tag 8.5.0 and also on main (crashes on both)

To Reproduce

  • follow steps to run example (git clone…, git checkout 8.5.0, cd example, yarn ios)
  • select Map > Show Map
  • Observe crash (crashes very consistently for me, perhaps 9/10 times)

Expected behavior
No crash.

Actual behavior
I get the crash report below.

Versions (please complete the following information):

  • Platform: iOS
  • Platform OS: 15.4
  • Device: tested on 12 and 13
  • Emulator/ Simulator: yes, emulator only
  • Dev OS: OSX 12.2.1
  • react-native-mapbox-gl Version 8.5.0 and main
  • Mapbox GL version for master: defaults for 8.5.0 / main
  • React Native Version 0.66.0
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: 3AC2B6D4-9E35-4FB4-BE98-AFFC80B5C09D
CrashReporter Key:   AA0886AE-E446-6BF9-6255-64D8EC215204
Hardware Model:      MacBookPro16,1
Process:             RNMapboxGLExample [38056]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/EAC39E15-6C3B-4801-A568-0AC82C537C13/data/Containers/Bundle/Application/963A9407-2D91-4F05-BB43-7CF2721A3659/RNMapboxGLExample.app/RNMapboxGLExample
Identifier:          org.reactjs.native.example.RNMapboxGLExample
Version:             1.0 (1)
Code Type:           X86-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [34924]
Coalition:           com.apple.CoreSimulator.SimDevice.EAC39E15-6C3B-4801-A568-0AC82C537C13 [35755]
Responsible Process: SimulatorTrampoline [7202]

Date/Time:           2022-03-16 16:28:11.1918 +0100
Launch Time:         2022-03-16 16:27:55.7853 +0100
OS Version:          macOS 12.2.1 (21D62)
Release Type:        User
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x00007fc8e2383ff0
Exception Codes: 0x0000000000000001, 0x00007fc8e2383ff0
VM Region Info: 0x7fc8e2383ff0 is not in any region.  Bytes after previous region: 1647853553  Bytes before following region: 201051942928
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      MALLOC_MEDIUM (reserved) 7fc87f800000-7fc880000000 [ 8192K] rw-/rwx SM=NUL  ...(unallocated)
--->  GAP OF 0x2f31d97000 BYTES
      Stack Guard              7ff7b1d97000-7ff7b5597000 [ 56.0M] ---/rwx SM=NUL  
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [38056]

Triggered by Thread:  0

Application Specific Information:
CoreSimulator 802.6 - Device: iPhone 13 (EAC39E15-6C3B-4801-A568-0AC82C537C13) - Runtime: iOS 15.4 (19E240) - DeviceType: iPhone 13
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libGLProgrammability.dylib    	    0x7fff4020e756 glvmRasterOpDepthStencilTest + 438
1   libGLProgrammability.dylib    	    0x7fff4025d195 glvmInterpretFPTransformFour + 2405
2   GLRendererFloat               	    0x7fff5bca3f8e gldLLVMFPTransform + 734
3   GLRendererFloat               	    0x7fff5bcb80c4 gldLLVMVecPolyRender + 23124
4   GLRendererFloat               	    0x7fff5bca0540 gldRenderFillPolygonPtr + 90
5   ???                           	       0x12c73416e ???
6   GLEngine                      	    0x7fff400fd6f7 gleFlushAtomicFunc + 15
7   GLEngine                      	    0x7fff4014a10d glDrawElements_IMM_ES2Exec + 925
8   Mapbox                        	       0x10d9fe973 mbgl::gl::Context::draw(mbgl::gfx::DrawMode const&, unsigned long, unsigned long) + 131 (context.cpp:626)
9   Mapbox                        	       0x10da525c0 mbgl::gl::Program<mbgl::LineProgram>::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, mbgl::uniforms::ratio, mbgl::uniforms::units_to_pixels, mbgl::uniforms::device_pixel_ratio, mbgl::InterpolationUniform<mbgl::attributes::blur>, mbgl::InterpolationUniform<mbgl::attributes::color>, mbgl::InterpolationUniform<mbgl::attributes::floorwidth>, mbgl::InterpolationUniform<mbgl::attributes::gapwidth>, mbgl::InterpolationUniform<mbgl::attributes::offset>, mbgl::InterpolationUniform<mbgl::attributes::opacity>, mbgl::InterpolationUniform<mbgl::attributes::pattern_to>, mbgl::InterpolationUniform<mbgl::attributes::pattern_from>, mbgl::InterpolationUniform<mbgl::attributes::width>, mbgl::uniforms::blur, mbgl::uniforms::color, mbgl::uniforms::floorwidth, mbgl::uniforms::gapwidth, mbgl::uniforms::offset, mbgl::uniforms::opacity, mbgl::uniforms::pattern_to, mbgl::uniforms::pattern_from, mbgl::uniforms::width> > const&, mbgl::gfx::DrawScope&, mbgl::gfx::AttributeBindings<mbgl::TypeList<mbgl::attributes::pos_normal, mbgl::attributes::data<unsigned char, 4ul>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::blur>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::floorwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::gapwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::offset>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_from>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::width> > > const&, mbgl::gfx::TextureBindings<mbgl::TypeList<> > const&, mbgl::gfx::IndexBuffer const&, unsigned long, unsigned long) + 784 (program.hpp:129)
10  Mapbox                        	       0x10dab9dda void mbgl::Program<mbgl::LineProgram, (mbgl::gfx::PrimitiveType)2, mbgl::TypeList<mbgl::attributes::pos_normal, mbgl::attributes::data<unsigned char, 4ul> >, mbgl::TypeList<mbgl::uniforms::matrix, mbgl::uniforms::ratio, mbgl::uniforms::units_to_pixels, mbgl::uniforms::device_pixel_ratio>, mbgl::TypeList<>, mbgl::style::LinePaintProperties>::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_normal, mbgl::attributes::data<unsigned char, 4ul>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::blur>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::floorwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::gapwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::offset>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_from>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::width> > >, std::__1::allocator<mbgl::Segment<mbgl::TypeList<mbgl::attributes::pos_normal, mbgl::attributes::data<unsigned char, 4ul>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::blur>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::floorwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::gapwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::offset>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_from>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::width> > > > > const&, mbgl::gfx::UniformValues<mbgl::TypeList<mbgl::uniforms::matrix, mbgl::uniforms::ratio, mbgl::uniforms::units_to_pixels, mbgl::uniforms::device_pixel_ratio, mbgl::InterpolationUniform<mbgl::attributes::blur>, mbgl::InterpolationUniform<mbgl::attributes::color>, mbgl::InterpolationUniform<mbgl::attributes::floorwidth>, mbgl::InterpolationUniform<mbgl::attributes::gapwidth>, mbgl::InterpolationUniform<mbgl::attributes::offset>, mbgl::InterpolationUniform<mbgl::attributes::opacity>, mbgl::InterpolationUniform<mbgl::attributes::pattern_to>, mbgl::InterpolationUniform<mbgl::attributes::pattern_from>, mbgl::InterpolationUniform<mbgl::attributes::width>, mbgl::uniforms::blur, mbgl::uniforms::color, mbgl::uniforms::floorwidth, mbgl::uniforms::gapwidth, mbgl::uniforms::offset, mbgl::uniforms::opacity, mbgl::uniforms::pattern_to, mbgl::uniforms::pattern_from, mbgl::uniforms::width> > const&, mbgl::gfx::AttributeBindings<mbgl::TypeList<mbgl::attributes::pos_normal, mbgl::attributes::data<unsigned char, 4ul>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::blur>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::floorwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::gapwidth>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::offset>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::pattern_from>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::width> > > const&, mbgl::gfx::TextureBindings<mbgl::TypeList<> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 314 (program.hpp:141)
11  Mapbox                        	       0x10dab62df _ZZN4mbgl15RenderLineLayer6renderERNS_15PaintParametersEENK3$_0clINS_11LineProgramENS_3gfx13UniformValuesINS_8TypeListIJNS_8uniforms6matrixENS9_5ratioENS9_15units_to_pixelsENS9_18device_pixel_ratioEEEEEENS6_15TextureBindingsINS8_IJEEEEEEEDaRT_OT0_RKNSt12experimental8optionalINS_13ImagePositionEEEST_OT1_ + 864 (render_line_layer.cpp:130) [inlined]
12  Mapbox                        	       0x10dab62df mbgl::RenderLineLayer::render(mbgl::PaintParameters&) + 4703 (render_line_layer.cpp:204)
13  Mapbox                        	       0x10daebceb mbgl::Renderer::Impl::render(mbgl::RenderTree const&) + 1883 (renderer_impl.cpp:168)
14  Mapbox                        	       0x10daea343 mbgl::Renderer::render(std::__1::shared_ptr<mbgl::UpdateParameters> const&) + 51 (renderer.cpp:32)
15  Mapbox                        	       0x10dd58378 MGLRenderFrontend::render() + 68 (MGLRendererFrontend.h:57) [inlined]
16  Mapbox                        	       0x10dd58378 -[MGLMapView renderSync] + 119 (MGLMapView.mm:992)
17  Mapbox                        	       0x10dd0d0b5 MGLMapViewImpl::render() + 28 (MGLMapView+Impl.mm:18) [inlined]
18  Mapbox                        	       0x10dd0d0b5 -[MGLMapViewImplDelegate glkView:drawInRect:] + 39 (MGLMapView+OpenGL.mm:30)
19  GLKit                         	    0x7fff4ef6a3f4 -[GLKView _display:] + 267
20  Mapbox                        	       0x10dd599de -[MGLMapView updateFromDisplayLink:] + 433 (MGLMapView.mm:1222)
21  QuartzCore                    	    0x7fff288d0474 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 932
22  QuartzCore                    	    0x7fff289cf9c6 display_timer_callback(__CFMachPort*, void*, long, void*) + 395
23  CoreFoundation                	    0x7fff2033fb42 __CFMachPortPerform + 157
24  CoreFoundation                	    0x7fff20374125 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
25  CoreFoundation                	    0x7fff203734cc __CFRunLoopDoSource1 + 617
26  CoreFoundation                	    0x7fff2036d901 __CFRunLoopRun + 2420
27  CoreFoundation                	    0x7fff2036ca90 CFRunLoopRunSpecific + 562
28  GraphicsServices              	    0x7fff2cb72c8e GSEventRunModal + 139
29  UIKitCore                     	    0x7fff2508e90e -[UIApplication _run] + 928
30  UIKitCore                     	    0x7fff25093569 UIApplicationMain + 101
31  RNMapboxGLExample             	       0x10a16e0c8 main + 104 (main.m:14)
32  dyld_sim                      	       0x10cb82f21 start_sim + 10
33  dyld                          	       0x10cc334fe start + 462

Thread 1:
0   libsystem_pthread.dylib       	    0x7fff6fb03fec start_wqthread + 0

Thread 2::  Dispatch queue: com.apple.opengl.cvmDoWork
0   libLLVMContainer.dylib        	    0x7fff5c397a71 (anonymous namespace)::BasicAliasAnalysis::getArgLocation(llvm::ImmutableCallSite, unsigned int, llvm::AliasAnalysis::ModRefResult&) + 97
1   libLLVMContainer.dylib        	    0x7fff5c3980c2 non-virtual thunk to (anonymous namespace)::BasicAliasAnalysis::getArgLocation(llvm::ImmutableCallSite, unsigned int, llvm::AliasAnalysis::ModRefResult&) + 18
2   libLLVMContainer.dylib        	    0x7fff5c38a87f llvm::AliasAnalysis::getModRefInfo(llvm::ImmutableCallSite, llvm::AliasAnalysis::Location const&) + 239
3   libLLVMContainer.dylib        	    0x7fff5c397308 (anonymous namespace)::BasicAliasAnalysis::getModRefInfo(llvm::ImmutableCallSite, llvm::AliasAnalysis::Location const&) + 568
4   libLLVMContainer.dylib        	    0x7fff5c4055d0 llvm::MemoryDependenceAnalysis::getPointerDependencyFrom(llvm::AliasAnalysis::Location const&, bool, llvm::ilist_iterator<llvm::Instruction>, llvm::BasicBlock*, llvm::Instruction*) + 1440
5   libLLVMContainer.dylib        	    0x7fff5c407e80 llvm::MemoryDependenceAnalysis::GetNonLocalInfoForBlock(llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*, std::__1::vector<llvm::NonLocalDepEntry, std::__1::allocator<llvm::NonLocalDepEntry> >*, unsigned int) + 176
6   libLLVMContainer.dylib        	    0x7fff5c406a6c llvm::MemoryDependenceAnalysis::getNonLocalPointerDepFromBB(llvm::PHITransAddr const&, llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&, llvm::DenseMap<llvm::BasicBlock*, llvm::Value*, llvm::DenseMapInfo<llvm::BasicBlock*> >&, bool) + 1916
7   libLLVMContainer.dylib        	    0x7fff5c406262 llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(llvm::AliasAnalysis::Location const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl<llvm::NonLocalDepResult>&) + 162
8   libLLVMContainer.dylib        	    0x7fff5c20fd8d (anonymous namespace)::GVN::processInstruction(llvm::Instruction*) + 2557
9   libLLVMContainer.dylib        	    0x7fff5c20cfb5 (anonymous namespace)::GVN::runOnFunction(llvm::Function&) + 1797
10  libLLVMContainer.dylib        	    0x7fff5c617333 llvm::FPPassManager::runOnFunction(llvm::Function&) + 739
11  libLLVMContainer.dylib        	    0x7fff5c616aa7 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 183
12  libLLVMContainer.dylib        	    0x7fff5c61699c llvm::legacy::FunctionPassManager::run(llvm::Function&) + 92
13  libGLVMPlugin.dylib           	    0x7fff4f40e167 cvmOptimizeModularFunction + 70
14  libGLVMPlugin.dylib           	    0x7fff4f427894 glvmBuildVPTransformFunction + 10740
15  libGLVMPlugin.dylib           	    0x7fff4f40d600 cvmsPluginElementBuild + 1113
16  libCoreVMClient.dylib         	    0x7fff4f4043dd cvmsCompBuildElement + 146
17  libCoreVMClient.dylib         	    0x7fff4f408e29 cvmsServerElementBuild + 1184
18  libCoreVMClient.dylib         	    0x7fff4f404c82 cvms_element_build_from_source + 118
19  libCVMSPluginSupport.dylib    	    0x7fff4f3fb776 cvm_deferred_build_modular(void*) + 413
20  libdispatch.dylib             	    0x7fff20115b25 _dispatch_client_callout + 8
21  libdispatch.dylib             	    0x7fff2011c0df _dispatch_lane_serial_drain + 753
22  libdispatch.dylib             	    0x7fff2011ccc1 _dispatch_lane_invoke + 400
23  libdispatch.dylib             	    0x7fff2012797b _dispatch_workloop_worker_thread + 779
24  libsystem_pthread.dylib       	    0x7fff6fb05074 _pthread_wqthread + 326
25  libsystem_pthread.dylib       	    0x7fff6fb03ffb start_wqthread + 15

Thread 3:
0   libsystem_pthread.dylib       	    0x7fff6fb03fec start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib       	    0x7fff6fb03fec start_wqthread + 0

Thread 5:: com.apple.uikit.eventfetch-thread
0   libsystem_kernel.dylib        	    0x7fff6faa9aba mach_msg_trap + 10
1   libsystem_kernel.dylib        	    0x7fff6faa9e2b mach_msg + 59
2   CoreFoundation                	    0x7fff20372e58 __CFRunLoopServiceMachPort + 319
3   CoreFoundation                	    0x7fff2036d46e __CFRunLoopRun + 1249
4   CoreFoundation                	    0x7fff2036ca90 CFRunLoopRunSpecific + 562
5   Foundation                    	    0x7fff20827e31 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 213
6   Foundation                    	    0x7fff208280aa -[NSRunLoop(NSRunLoop) runUntilDate:] + 72
7   UIKitCore                     	    0x7fff25151d1e -[UIEventFetcher threadMain] + 491
8   Foundation                    	    0x7fff20850f89 __NSThread__start__ + 1009
9   libsystem_pthread.dylib       	    0x7fff6fb084f4 _pthread_start + 125
10  libsystem_pthread.dylib       	    0x7fff6fb0400f thread_start + 15

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:23
  • Comments:22 (9 by maintainers)

github_iconTop GitHub Comments

6reactions
ryderdonahuecommented, Mar 17, 2022

I can report that I am seeing the same thing after my simulators updated to 15.4 this morning, it will immediately crash on startup.

The only thing I have to add is that if I take out references to <MapboxGL.Camera ... /> it will not crash on startup. And I can even add it back in via hot reloading and the app will function just fine, so maybe there is a race condition somewhere?

Hope this helps.

5reactions
jusprietcommented, May 30, 2022

MacBook pro intel macos 12.4 xcode 13.4

Same problem with Mapbox, not only maplibre ! Crashes on ios 15.5, with the simulator Work perfectly on real device ios 15.5, or with the simulator and ios 15.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

WKWebView crash on iOS 15 beta running in simulator
I built a simple demo app that implements the code that Apple provides here for instantiating an WKWebView. This code causes a crash...
Read more >
iOS app crashes at launch on Testflight for iOS 14 and below ...
We have the same problem, our app started crashing since 8.12.2021 on iOS 14 when it is installed from TestFlight. It doesn't crash...
Read more >
Maps SDK causes app crash in arm64 iOS simulator on Apple ...
When running the app in an arm64 iOS Simulator (iPhone 8, iOS 15.2, Xcode 13.2.1), the app crashes when a GMSMapView is shown...
Read more >
How To FIX iPhone Apps Crashing On iOS 15 / iOS 14!
GET SUPER CHEAP PHONES HERE: https://cheapphones.coGET AWESOME WALLPAPERS HERE: https://www.cheapphones.co/wallpapers/MY SECOND CHANNEL!
Read more >
Fix iPhone Apps Keep Crashing after iOS 16.2 Update
We will offer some flagship bug fixes that will help you quickly. For example, suppose your iPhone Apps frequently crash, and you face...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found