Mapbox-gl-native: Mapbox custom annotation callout view "Command failed due to signal: Segmentation fault: 11"

Created on 31 Mar 2017  路  6Comments  路  Source: mapbox/mapbox-gl-native

iOS support

Most helpful comment

@eimantas Thank you! That was it :)

All 6 comments

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 :)

Was this page helpful?
0 / 5 - 0 ratings