flitsmeister / maplibre-navigation-ios

Repo is moved to https://github.com/maplibre/maplibre-navigation-ios
Other
6 stars 5 forks source link

Sample-Swift crash randomly #17

Closed odemolliens closed 1 year ago

odemolliens commented 2 years ago

Navigation SDK version: latest

Sample-Swift works and then crash randomly, at launch or during usage

Screenshot 2022-08-24 at 12 49 11

odemolliens commented 2 years ago

FYI: I created a fresh clone project in parallel, setup the library and then put the code from Sample-Swift and it's crashing too

Svantulden commented 2 years ago

Thanks for reporting this issue odemolliens 👍

We have seen this issue too. It seems to happen on Apple Silicon for simulators running on XCode 13 versions, related to the Map view dependency that uses OpenGL drawing. For this specific issues, there is one @ the upstream Maplibre library: https://github.com/maplibre/maplibre-gl-native-distribution/issues/7

The crash (not the warning spam in the debug console yet) seems absent when using an iOS 14.5 simulator to test stuff, or with a newer (currently in bèta) 16.0 simulator.

We want to transition the Maplibre SDK dependency to Metal (instead of OpenGL) drawing in the near-future, which is Apple's recommended way and prevents these warnings/crashes from happening on an Apple Silicon system. But that variant is currently not ready for production yet.

Svantulden commented 1 year ago

The map doesn't crash anymore in the iOS 16 simulator. It does have visual artefacts (as described in this issue https://github.com/maplibre/maplibre-gl-native-distribution/issues/7)