Skip to content

Instantly share code, notes, and snippets.

@AndrewLipscomb
Created April 11, 2019 04:27
Show Gist options
  • Save AndrewLipscomb/433ea7ed0290bb541077e2e6d8b20e12 to your computer and use it in GitHub Desktop.
Save AndrewLipscomb/433ea7ed0290bb541077e2e6d8b20e12 to your computer and use it in GitHub Desktop.
CoreLocation stack trace
2019-04-11 14:21:42.525 BugTest[25240:2608649] +[NSValue valueWithMKCoordinate:]: unrecognized selector sent to class 0x7fff872763a8
2019-04-11 14:21:42.526 BugTest[25240:2608649] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSValue valueWithMKCoordinate:]: unrecognized selector sent to class 0x7fff872763a8'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2eeb0cf9 __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff59a44a17 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2ef2aa56 __CFExceptionProem + 0
3 CoreFoundation 0x00007fff2ee530ef ___forwarding___ + 1485
4 CoreFoundation 0x00007fff2ee52a98 _CF_forwarding_prep_0 + 120
5 libswiftCoreLocation.dylib 0x00007fff5ad61664 globalinit_33_25AD2332B1DC67E23B54508C4A7DAD45_func0 + 132
6 libdispatch.dylib 0x00007fff5b22563d _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff5b226d4c _dispatch_once_callout + 20
8 libswiftCore.dylib 0x00007fff5acb27e9 swift_once + 25
9 libswiftCoreLocation.dylib 0x00007fff5ad616e0 $sSo22CLLocationCoordinate2DV12CoreLocationE19_bridgeToObjectiveCSo7NSValueCyF + 48
10 BugTest 0x00000001024aac8e main + 238
11 libdyld.dylib 0x00007fff5b2723d5 start + 1
12 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
import Foundation
import CoreLocation
let pt1 = CLLocationCoordinate2D(latitude: 20, longitude: 50)
let pt2 = CLLocationCoordinate2D(latitude: 20, longitude: 50)
let ob1 = pt1 as? NSObjectProtocol
let ob2 = pt2 as? NSObjectProtocol
print(ob1?.isEqual(ob2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment