-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Crash on launch without access token — mbgl::Style::loadJSON() #1147
Comments
Can't seem to find it now, but I had flagged an issue for @peter related to |
P.S. Isn't 4s retina? |
Whoops, you’re right, forgot to edit that part. |
I’m not sure that’s related. What I’m seeing here is that the style URL is never set by the time the Map thread tries to parse the JSON (due to the absence of a style URL). |
This is where
The iPhone 4s simulator never gets here before the Map thread tries to parse JSON out of the |
Doesn’t reproduce if I put in my access token. |
I also get this crash now when I put an |
@kkaefer Want to take a peek? |
#1163 just compounds the fact that we have too many ways to populate
Each of these ways complicates my approach of only starting the |
We are getting rid of:
And I think we should keep the IB interaction to just map ID for simplicity & not have to cover every use case. |
OK, since my refactoring mucks around with both APIs, I’m going to tackle removing them along the way. |
`Map` should be able to deal with having no access token or JSON even while it’s running. Most of `Map` accounts for this situation, but `reloadStyle()` incorrectly assumes that one or the other is set. This change corrects the assumption in `reloadStyle()`. Also expose the access token and style name to clients as ordinary KVO-compliant properties. Actually, they’re not so ordinary because they’re inspectable! Ref #1070, #1147
Every time I launch the iOS demo app in various older iOS simulators (e.g., iPhone 4s or iPad 2 with iOS 8.2), I get the following crash:
Map::data
is completely empty at this point: nojson
and nobase
. Those values wouldn’t be filled in until-[MGLMapView initWithFrame::accessToken:styleJSON:]
calls-setStyleJSON:
later on.The text was updated successfully, but these errors were encountered: