You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
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.
MGLOpenGLStyleLayer is released prior to calling MGLFinishCustomStyleLayer #10755
Changes to core GL for asynchronous rendering changed when the mbgl::style::CustomLayer's CustomLayerDeinitializeFunction callback method is invoked.
This callback is now invoked after the layer is removed from a style, and when it's corresponding RenderCustomLayer instance is destroyed.
The [MGLOpenGLStyleLayer setStyle:] method is releasing itself as soon as the layer is removed from the style, which leaves the underlying CustomLayer::Impl instance holding on to a dangling pointer.
This leads to EXC_BAD_ACCESS exceptions with call stack:
#1 0x00000001008745d8 in MGLFinishCustomStyleLayer(void*)
#2 0x0000000100a5ca20 in mbgl::RenderCustomLayer::~RenderCustomLayer()
#3 0x0000000100a5caa0 in mbgl::RenderCustomLayer::~RenderCustomLayer()
#4 0x0000000100a5cad4 in mbgl::RenderCustomLayer::~RenderCustomLayer()
#5 0x0000000100b637ec in std::__1::default_delete<mbgl::RenderLayer>::operator()(mbgl::RenderLayer*) const
...
#20 0x0000000100b50b60 in mbgl::Renderer::Impl::render(mbgl::UpdateParameters const&)
#21 0x0000000100b484f0 in mbgl::Renderer::render(mbgl::UpdateParameters const&)
#22 0x000000010077ac7c in MGLRenderFrontend::render()
Activity
friedbunny commentedon Dec 21, 2017
Fixed in #10765 and the forthcoming v3.7.2 release.