fix: make mapboxMap property optional in map view accessor#3377
Open
krystofcelba wants to merge 2 commits intornmapbox:mainfrom
Open
fix: make mapboxMap property optional in map view accessor#3377krystofcelba wants to merge 2 commits intornmapbox:mainfrom
krystofcelba wants to merge 2 commits intornmapbox:mainfrom
Conversation
Contributor
|
@krystofcelba thanks much for looking into. My main concern is that with those fixes, we'll just skip some operations. Can you share a stack trace or anything regarding the original issue? |
Contributor
|
I've the exact same issue on iOS with latest update. |
Contributor
|
@Gp2mv3 can you reproduce the issue? Can you share a stack trace? |
Contributor
|
Yes I did, here is the stacktrace (before applying this PR): It's indeed in the accessor of mapboxMap for the getZoom() that the crashes occurs. Hope it helps ! |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hi, I have recently encoutered this crash caused by some race condition when the JS code wants to access the zoom but the mapboxMap is not initialized yet. So I have made this fix. I simply changed the
mapboxMapgetter ofRNMBXMapViewto optional.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)