1

Comment out the SceneKit line and this code works fine. But any interaction with SceneKit and Mapbox causes a crash:

import UIKit
import Mapbox
import SceneKit

class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        let mapView = MGLMapView(frame: view.bounds)
        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

        // Set the map’s center coordinate and zoom level.
        mapView.setCenter(CLLocationCoordinate2D(latitude: 59.31, longitude: 18.06), zoomLevel: 9, animated: false)
        view.addSubview(mapView)

        _ = SCNView()
    }
}

This is running on iOS 11. For me, I'm not getting an actual crash log, but on a more complicated setup I do get the error Failed to make complete framebuffer object. It always crashes within the Mapbox framework.

Andrew
  • 7,693
  • 11
  • 43
  • 81
  • 1
    It may be related to Xcode's Open GL ES Frame Capture. I resolved a crash that involved a ARSCNView and MGLMapView by [switching GPU Frame Capture to "Metal"](https://stackoverflow.com/questions/31264537/adding-google-maps-as-subview-crashes-ios-app-with-exc-bad/31445847#31445847). If that doesn't help, would you be able to share any error messages that you are seeing? – jmkiley Jul 29 '17 at 16:23

0 Answers0