-
Notifications
You must be signed in to change notification settings - Fork 1.3k
MGLOpenGLStyleLayer released when removed from style #11143
Comments
For what it’s worth, #10771 is the opposite issue (an overretain). |
Unfortunately a brief spin of the run loop is required for the layer reuse test. I've tried to tune this down for my machine; YMMV
@akitchen thanks for setting up the test framework - it helps speed up debugging of this issue in a big way! For style layer types other than For
One solution to this is to revert #10765 and add matching |
Unfortunately a brief spin of the run loop is required for the layer reuse test. I've tried to tune this down for my machine; YMMV
Fixed by #11553 and |
Platform: iOS
Mapbox SDK version: v3.7.3 (also seeing in
master
)Steps to trigger behavior
MGLOpenGLStyleLayer
.mapView:didFinishLoadingStyle:
,Expected behavior
For the custom layer to be removed and added repeatedly.
Actual behavior
The custom layer is added and removed as expected a couple of times. Then I receive a bad access exception:
Message with a
weak
reference for the property:The Zombies profiling tool gives me:
An Objective-C message was sent to a deallocated ‘LimeGreenStyleLayer’ object (zombie) at address: 0x600000c72fc0.
I am able to avoid this exception by reinitializing the custom layer prior to adding it to the map's style. I do not see this behavior with other
MGLStyleLayer
s. Branch that includes a repro iniosapp
.cc @asheemmamoowala @akitchen @lilykaiser
The text was updated successfully, but these errors were encountered: