If segfault is in Google's code, how is it related to Mapbox? Can you confirm it's still segfaulting if you remove the dependency on GoogleMaps framework?
@eimantas Yes, it's still segfaulting even when I delete the Google Maps framework. The code I've added isn't related to Google Maps. It's something in Mapbox. Any idea?
Can you post the segfault trace when you removed the GoogleMaps framework?
@eimantas I've added the whole trace (without Google Maps), please take a look. Thanks!
lazy var leftAccessoryView = UIView()/* unused */
Reading stack trace it points to the line above. What particularly got my attention was lazy keyword. Looking at the example provided by mapbox, it has this line:
// Lazy initialization of optional vars for protocols causes segmentation fault: 11s in Swift 3.0. https://bugs.swift.org/browse/SR-1825
So it seems that this is the bug in Swift compiler rather than Mapbox. Remove the lazy modifier and you should be good to go.
@eimantas Thank you! That was it :)
Most helpful comment
@eimantas Thank you! That was it :)