我目前在使用 HEREMaps 的两个不同项目中遇到问题。在通过 NMAApplicationContext.set(...) 初始化后,应用程序正在崩溃,并给出以下日志:
2017-05-02 10:15:25.372 ANIO[3574:431630]-[ NSCFString hac_toVariant]:无法识别的选择器发送到实例 0x618000027560 2017-05-02 10:15:25.403 ANIO[3574:431630] *** 终止应用程序到期to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString hac_toVariant]: unrecognized selector sent to instance 0x618000027560' *** First throw call stack: ( 0 CoreFoundation 0x000000010edccb0b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010e41c141 objc_exception_throw + 48 2 CoreFoundation 0x000000010ee3c134-[NSObject(NSObject) 不识别选择器:] + 132 3 核心基础 0x000000010ed53840 ___forwarding_+ 1024 4 CoreFoundation 0x000000010ed533b8 _CF_forwarding_prep_0 + 120 5 ANIO 0x000000010d67819a _Z29PathToFileInWritableDirectoryP8NSString + 19706 6 ANIO 0x000000010d6bd98c _ZN6smart518segments_intersectExxxxxxxxPxS0_ + 55445 7 ANIO 0x000000010d6cdd8a _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 13288 8 ANIO 0x000000010d6cd1bb _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 10265 9 ANIO 0x000000010d6ee8a9 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97469 10 ANIO0x000000010d6ee778 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97164 11 ANIO 0x000000010d6ee93e _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97618 12 ANIO 0x000000010d6ef293 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 100007 13 ANIO 0x000000010d6ecebc _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 90832 14 libdispatch.dylib 0x00000001122c44a6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x00000001122ed05c _dispatch_client_callout + 8 16 libdispatch.dylib 0x00000001122cb94f _dispatch_queue_serial_drain + 221 17 libdispatch.dylib 0x00000001122cc669 _dispatch_queue_invoke + 1084 18 libdispatch.dylib 0x00000001122ceec4 _dispatch_root_queue_drain + 634 19 libdispatch.dylib 0x00000001122cebef _dispatch_worker_thread3 + 123 20 libsystem_pthread.dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止dylib 0x00000001122cc669 _dispatch_queue_invoke + 1084 18 libdispatch.dylib 0x00000001122ceec4 _dispatch_root_queue_drain + 634 19 libdispatch.dylib 0x00000001122cebef _dispatch_worker_thread3 + 123 20 libsystem_pthread.dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x00000001122cc669 _dispatch_queue_invoke + 1084 18 libdispatch.dylib 0x00000001122ceec4 _dispatch_root_queue_drain + 634 19 libdispatch.dylib 0x00000001122cebef _dispatch_worker_thread3 + 123 20 libsystem_pthread.dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13) libc++abi.dylib: 以 NSException 类型的未捕获异常终止dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13) libc++abi.dylib: 以 NSException 类型的未捕获异常终止
有人面临同样的问题吗?任何想法?摆脱此错误的唯一方法是卸载/安装应用程序。
亲切的问候,
迈克尔
好的,简短的更新...该错误很容易重现。
1.)从 [link] https://developer.here.com/mobile-sdks/documentation/ios-starter/topics/quick-start.html下载示例代码
2.)按照步骤包含 NMAKit-framework 和 NMAKit-bundle
3.)构建并运行(Xcode 版本 8.3.2 (8E2002))。目标模拟器/硬件无关紧要(尝试过 iPhone 6/7/s 模拟器和硬件)。即使使用 Obj-c 或 Swift 示例也没有任何区别。
第一次开始一切都很好。第二次启动导致崩溃。
2017-05-02 13:38:34.331 HelloMap[16821:1642096]-[ NSCFString hac_toVariant]:无法识别的选择器发送到实例 0x7f80266079a0 2017-05-02 13:38:34.342 HelloMap[16821:1642096] *** 终止应用程序to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString hac_toVariant]: unrecognized selector sent to instance 0x7f80266079a0' *** First throw call stack: ( 0 CoreFoundation 0x000000010d9d9d85 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010d44ddeb objc_exception_throw + 48 2 CoreFoundation 0x000000010d9e2d3d -[NSObject(NSObject) 不识别选择器:] + 205 3 核心基础 0x000000010d928cfa ___forwarding_+ 970 4 CoreFoundation 0x000000010d9288a8 _CF_forwarding_prep_0 + 120 5 HelloMap 0x000000010cb6e9de _Z29PathToFileInWritableDirectoryP8NSString + 19706 6 HelloMap 0x000000010cbb41cc _ZN6smart518segments_intersectExxxxxxxxPxS0_ + 55445 7 HelloMap 0x000000010cbc4534 _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 13288 8 HelloMap 0x000000010cbc3965 _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 10265 9 HelloMap 0x000000010cbe5009 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97469 10 HelloMap0x000000010cbe4ed8 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97164 11 HelloMap 0x000000010cbe509e _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97618 12 HelloMap 0x000000010cbe59f3 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 100007 13 HelloMap 0x000000010cbe361c _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 90832 14 libdispatch.dylib 0x000000010fe90d9d _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x000000010feb13eb _dispatch_client_callout + 8 16 libdispatch.dylib 0x000000010fe9782c _dispatch_queue_drain + 2215 17 libdispatch.dylib 0x000000010fe96d4d _dispatch_queue_invoke + 601 18 libdispatch.dylib 0x000000010fe99996 _dispatch_root_queue_drain + 1420 19 libdispatch.dylib 0x000000010fe99405 _dispatch_worker_thread3 + 111 20 libsystem_pthread.dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止dylib 0x000000010fe96d4d _dispatch_queue_invoke + 601 18 libdispatch.dylib 0x000000010fe99996 _dispatch_root_queue_drain + 1420 19 libdispatch.dylib 0x000000010fe99405 _dispatch_worker_thread3 + 111 20 libsystem_pthread.dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x000000010fe96d4d _dispatch_queue_invoke + 601 18 libdispatch.dylib 0x000000010fe99996 _dispatch_root_queue_drain + 1420 19 libdispatch.dylib 0x000000010fe99405 _dispatch_worker_thread3 + 111 20 libsystem_pthread.dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止