This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Crash at mbgl::gl::Program<mbgl::FillPatternProgram>::draw #14518
Copy link
Copy link
Closed
Description
Steps to reproduce
- Load a specific private style, linked to in https://github.com/mapbox/studio-preview-ios/issues/359#issuecomment-486849890.
- Set initial coordinates to
(37.747899, -119.587126)and zoom level to z15. - Zoom out until it crashes (~z5-6).
Unfortunately, I haven’t been able to reproduce this with iosapp — only Studio Preview (1.3.31 and 1.3.32) and ios-sdk-examples.
Crash trace
When attached to the debugger:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x28)
frame #0: 0x00000001cc23e510 GLEngine`gleRunVertexSubmitARM + 2772
frame #1: 0x00000001cc23b914 GLEngine`gleSetVertexArrayFunc + 144
frame #2: 0x00000001cc1e2884 GLEngine`glDrawElements_ACC_ES2Exec + 608
* frame #3: 0x0000000102a311e4 Mapbox`mbgl::gl::Program<mbgl::FillPatternProgram>::draw(this=0x0000000105631bb0, genericContext=0x000000010502d3d0, drawMode=0x000000016db14708, depthMode=<unavailable>, stencilMode=<unavailable>, colorMode=<unavailable>, cullFaceMode=<unavailable>, uniformValues=0x000000016db148d0, drawScope=0x0000000282a18cb8, attributeBindings=0x000000016db14a88, textureBindings=0x000000016db146e8, indexBuffer=0x0000000280c74dd8, indexOffset=0, indexLength=78) at program.hpp:153:17 [opt]
frame #4: 0x0000000102a6d7bc Mapbox`mbgl::RenderFillLayer::render(mbgl::PaintParameters&, mbgl::RenderSource*) at program.hpp:94:22 [opt]
frame #5: 0x0000000102a6d6cc Mapbox`mbgl::RenderFillLayer::render(mbgl::PaintParameters&, mbgl::RenderSource*) [inlined] auto mbgl::RenderFillLayer::render(program=<unavailable>, indexBuffer=0x0000000280c74dd8, segments=size=0)::$_1::operator()<mbgl::ProgramMap<mbgl::FillPatternProgram>, mbgl::gfx::Triangles, mbgl::gfx::DepthMode, mbgl::gfx::IndexBuffer, std::__1::vector<mbgl::Segment<mbgl::TypeList<mbgl::attributes::a_pos, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_outline_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_from> > >, std::__1::allocator<mbgl::Segment<mbgl::TypeList<mbgl::attributes::a_pos, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_outline_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_from> > > > >, mbgl::gfx::TextureBindings<mbgl::TypeList<mbgl::textures::u_image> > >(mbgl::ProgramMap<mbgl::FillPatternProgram>&, mbgl::gfx::Triangles const&, mbgl::gfx::DepthMode const&, mbgl::gfx::IndexBuffer const&, std::__1::vector<mbgl::Segment<mbgl::TypeList<mbgl::attributes::a_pos, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_outline_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_from> > >, std::__1::allocator<mbgl::Segment<mbgl::TypeList<mbgl::attributes::a_pos, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_opacity>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_outline_color>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_to>, mbgl::ZoomInterpolatedAttribute<mbgl::attributes::a_pattern_from> > > > > const&, mbgl::gfx::TextureBindings<mbgl::TypeList<mbgl::textures::u_image> >&&) const at render_fill_layer.cpp:197 [opt]
frame #6: 0x0000000102a6d4a4 Mapbox`mbgl::RenderFillLayer::render(this=<unavailable>, parameters=<unavailable>, (null)=<unavailable>) at render_fill_layer.cpp:213 [opt]
frame #7: 0x0000000102aa0cb0 Mapbox`mbgl::Renderer::Impl::render(this=<unavailable>, updateParameters=<unavailable>) at renderer_impl.cpp:547:27 [opt]
frame #8: 0x000000010294ba54 Mapbox`::-[MGLMapView glkView:drawInRect:](GLKView *, CGRect) [inlined] mbgl::Renderer::render(this=<unavailable>, updateParameters=<unavailable>) at renderer.cpp:34:11 [opt]
frame #9: 0x000000010294ba4c Mapbox`::-[MGLMapView glkView:drawInRect:](GLKView *, CGRect) [inlined] MGLRenderFrontend::render(this=0x0000000282b711c0) at MGLRendererFrontend.h:57 [opt]
frame #10: 0x000000010294ba0c Mapbox`::-[MGLMapView glkView:drawInRect:](self=<unavailable>, _cmd=<unavailable>, view=<unavailable>, rect=<unavailable>) at MGLMapView.mm:993 [opt]
frame #11: 0x00000001b7f5a8f4 GLKit`-[GLKView _display:] + 216
frame #12: 0x000000010294c378 Mapbox`::-[MGLMapView updateFromDisplayLink:](self=0x000000010a800800, _cmd=<unavailable>, displayLink=<unavailable>) at MGLMapView.mm:1168:13 [opt]
frame #13: 0x00000001af39e194 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 636
frame #14: 0x00000001af46748c QuartzCore`display_timer_callback(__CFMachPort*, void*, long, void*) + 272
frame #15: 0x00000001aafa7d30 CoreFoundation`__CFMachPortPerform + 188
frame #16: 0x00000001aafce934 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
frame #17: 0x00000001aafce080 CoreFoundation`__CFRunLoopDoSource1 + 440
frame #18: 0x00000001aafc8ea4 CoreFoundation`__CFRunLoopRun + 2096
frame #19: 0x00000001aafc8354 CoreFoundation`CFRunLoopRunSpecific + 436
frame #20: 0x00000001ad1c879c GraphicsServices`GSEventRunModal + 104
frame #21: 0x00000001d7471b68 UIKitCore`UIApplicationMain + 212
frame #22: 0x0000000102312378 StudioPreview`main at AppDelegate.swift:13:7
frame #23: 0x00000001aaa8e8e0 libdyld.dylib`start + 4
Reported by Crashlytics:
#0. Crashed: com.apple.main-thread
0 GLEngine 0x1e531e510 gleRunVertexSubmitARM
1 GLEngine 0x1e531b914 gleSetVertexArrayFunc
2 GLEngine 0x1e52c2884 glDrawElements_ACC_ES2Exec
3 Mapbox 0x100ebe4d4 MGLTimeIntervalFromDuration(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >) + 531420
4 Mapbox 0x100ef87b0 MGLTimeIntervalFromDuration(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >) + 769720
5 Mapbox 0x100f2abe0 MGLTimeIntervalFromDuration(std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> >) + 975592
6 Mapbox 0x100de6b5c MGLStringFromMetricType + 28492
7 GLKit 0x1d103a8f4 -[GLKView _display:] + 216
8 Mapbox 0x100de7480 MGLStringFromMetricType + 30832
9 QuartzCore 0x1c847e194 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 636
10 QuartzCore 0x1c854748c display_timer_callback(__CFMachPort*, void*, long, void*) + 272
11 CoreFoundation 0x1c4087d30 __CFMachPortPerform + 188
12 CoreFoundation 0x1c40ae934 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
13 CoreFoundation 0x1c40ae080 __CFRunLoopDoSource1 + 440
14 CoreFoundation 0x1c40a8ea4 __CFRunLoopRun + 2096
15 CoreFoundation 0x1c40a8354 CFRunLoopRunSpecific + 436
16 GraphicsServices 0x1c62a879c GSEventRunModal + 104
17 UIKitCore 0x1f0551b68 UIApplicationMain + 212
18 StudioPreview 0x100959208 main (OfflineStorage.swift:13)
19 libdyld.dylib 0x1c3b6e8e0 start + 4
Configuration
Mapbox SDK versions: exists at least from ios-v4.8.0 through ios-v4.11.0-beta.1
iOS/macOS versions: tested on iOS 12.1.4, 12.2
Device/simulator models: iPhone X, iPhone SE, iPad Pro 10.5
Xcode version: 10.2
Activity
friedbunny commentedon Apr 25, 2019
This reproduces in Studio Preview back to
ios-v4.8.0(which is the earliest I have easy access to).julianrex commentedon Apr 26, 2019
Looks like we're missing symbols here?
friedbunny commentedon Apr 29, 2019
The Crashlytics traces for this (easily reproducible) crash sometimes do show the wrong symbols, but local crashes consistently point to
mbgl::gl::Program<mbgl::FillPatternProgram>::draw.I fiddled with this a bit today but I’m still not able to isolate why this happens so easily in Studio Preview but not iosapp.
friedbunny commentedon May 1, 2019
Still can’t reproduce in
iosapp, but it does reproduce inios-sdk-examples. Debug build at d5822ab (~ios-v4.12.0-alpha.1):mapbox-gl-native/src/mbgl/gl/context.cpp
Lines 731 to 735 in d5822ab
... I have no idea if this is useful, but that’s where the debugger stops.