I have several viewcontrollers which unwind to the root viewcontroller. With most of the viewcontrollers the unwind segue works well without crashing the app. Only the viewcontrollers using a CLlocationmanager cannot perform the unwind segue to the root viewcontroller. These are the lines which makes the difference in my code:
//Init the location Manager
locationManager = [[CLLocationManager alloc] init];
[locationManager requestWhenInUseAuthorization];
locationManager.distanceFilter = kCLDistanceFilterNone;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
locationManager.delegate = self;
By commenting this section of my code the unwind works. Especially the last line makes the difference. I tried to release the locationmanager before unwinding. Sometimes it works. Somtimes it doesn`t. The debug console says:
0x10bfe1005: movq (%rdi), %r11
0x10bfe1008: movq %rsi, %r10
0x10bfe100b: andl 0x18(%r11), %r10d<---Thread 1: EXC Bad_Access(code=1, adress=0x18)
0x10bfe100f: shlq $0x4, %r10
0x10bfe1013: addq 0x10(%r11), %r10
Whatever that means. I have no idea what to do.
Aucun commentaire:
Enregistrer un commentaire