iOS/Swift :: HERE Maps sporadicly crashing during init => [NSCFString hac_toVariant] - ios

i'm currently facing an issue in two different projects using HEREMaps. Right after initializing via NMAApplicationContext.set(...) the app is crashing giving the following log:
2017-05-02 10:15:25.372 ANIO[3574:431630] -[NSCFString hac_toVariant]: unrecognized selector sent to instance 0x618000027560
2017-05-02 10:15:25.403 ANIO[3574:431630] *** Terminating app due 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) doesNotRecognizeSelector:] + 132
3 CoreFoundation 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 ANIO 0x000000010d6ee778 _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: terminating with uncaught exception of type NSException
anyone facing the same problems? any idea?
the only way to get rid of this error is de-/installing the app.
Kind regards,
Michael
OK, short update... the bug is easily reproducible.
1.)Download sample code from [link]https://developer.here.com/mobile-sdks/documentation/ios-starter/topics/quick-start.html
2.)Follow steps to include NMAKit-framework & NMAKit-bundle
3.)Build and run (Xcode Version 8.3.2 (8E2002)). Target simulator/hardware doesn't matter (tried iPhone 6/7/s simulator and hardware). Even using Obj-c or Swift sample makes no difference at all.
On first start everything's fine. Second start leads to crash.
2017-05-02 13:38:34.331 HelloMap[16821:1642096] -[NSCFString hac_toVariant]: unrecognized selector sent to instance 0x7f80266079a0
2017-05-02 13:38:34.342 HelloMap[16821:1642096] *** Terminating app due 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) doesNotRecognizeSelector:] + 205
3 CoreFoundation 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 HelloMap 0x000000010cbe4ed8 _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: terminating with uncaught exception of type NSException

Thanks for reporting this, this is caused by us using Objective-C Categories in the HERE SDK and shipping it as a static library. One thing you can do is add the -ObjC linker flag to your build (OTHER_LDFLAGS) to get around this.
More info here: Categories In Static Libraries
This will be fixed in a future release.

Related

NSInternalInconsistencyException Cannot set the result on a completed task

Getting this crash sometimes, while trying to sign in. Using Amplify pod version 1.0.5. This was preceded by (1) auth session expired, (2) password reset. Probably, something left not cleaned up. What I am looking for is, are there any additional debugs I can enable in AWS/Amplify SDK?
2020-10-13 12:36:45.287376-0700 MyApp[41441:3203375] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot set the result on a completed task.'
*** First throw call stack:
(
0 CoreFoundation 0x00000001165c78db __exceptionPreprocess + 331
1 libobjc.A.dylib 0x00000001155b0ac5 objc_exception_throw + 48
2 CoreFoundation 0x00000001165c7735 +[NSException raise:format:] + 197
3 AWSCore 0x0000000110a1e52d -[AWSTaskCompletionSource setResult:] + 173
4 AWSMobileClient 0x0000000110c38135 $s15AWSMobileClientAAC6signIn8username8password14validationData17completionHandlerySS_SSSDyS2SGSgyAA04SignD6ResultVSg_s5Error_pSgtctF + 2773
5 AmplifyPlugins 0x0000000111477315 $s14AmplifyPlugins22AWSMobileClientAdapterC6signIn8username8password14validationData17completionHandlerySS_SSSDyS2SGSgy0cD004SignG6ResultVSg_s5Error_pSgtctF + 197
6 AmplifyPlugins 0x0000000111478809 $s14AmplifyPlugins22AWSMobileClientAdapterCAA0cD8BehaviorA2aDP6signIn8username8password14validationData17completionHandlerySS_SSSDyS2SGSgy0cD004SignH6ResultVSg_s5Error_pSgtctFTW + 41
7 AmplifyPlugins 0x00000001114162bf $s14AmplifyPlugins29AuthenticationProviderAdapterC6signIn7request17completionHandlery0A008AuthSignG7RequestV_ys6ResultOyAG0klgN0VAG0K5ErrorOGctF + 1439
8 AmplifyPlugins 0x0000000111422a80 $s14AmplifyPlugins29AuthenticationProviderAdapterCAA0cD8BehaviorA2aDP6signIn7request17completionHandlery0A008AuthSignH7RequestV_ys6ResultOyAI0lmhO0VAI0L5ErrorOGctFTW + 16
9 AmplifyPlugins 0x000000011145ad35 $s14AmplifyPlugins22AWSAuthSignInOperationC4mainyyF + 789
10 AmplifyPlugins 0x000000011145b0ab $s14AmplifyPlugins22AWSAuthSignInOperationC4mainyyFTo + 43
11 Amplify 0x00000001110dc5dc $s7Amplify21AsynchronousOperationC5startyyF + 172
12 Amplify 0x00000001110dc61b $s7Amplify21AsynchronousOperationC5startyyFTo + 43
13 Foundation 0x000000011293de87 __NSOQSchedule_f + 227
14 libdispatch.dylib 0x0000000118121d7f _dispatch_call_block_and_release + 12
15 libdispatch.dylib 0x0000000118122db5 _dispatch_client_callout + 8
16 libdispatch.dylib 0x0000000118125c95 _dispatch_continuation_pop + 552
17 libdispatch.dylib 0x000000011812508f _dispatch_async_redirect_invoke + 849
18 libdispatch.dylib 0x0000000118133632 _dispatch_root_queue_drain + 351
19 libdispatch.dylib 0x0000000118133fca _dispatch_worker_thread2 + 130
20 libsystem_pthread.dylib 0x00000001185149f7 _pthread_wqthread + 220
21 libsystem_pthread.dylib 0x0000000118513b77 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException

How do i resolve this error while running react-native project in Xcode?

Here is the log in Xcode
2017-09-05 11:12:06.477 AppDemo[5064:29077] -[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa303036383231327
2017-09-05 11:12:06.642 AppDemo[5064:29077] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedIntValue]: unrecognized selector sent to instance 0xa303036383231327'
*** First throw call stack:
(
0 CoreFoundation 0x0000000110564b0b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010f41a141 objc_exception_throw + 48
2 CoreFoundation 0x00000001105d4134 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x00000001104eb840 ___forwarding___ + 1024
4 CoreFoundation 0x00000001104eb3b8 _CF_forwarding_prep_0 + 120
5 AppDemo 0x000000010e7cfc94 -[RCTMultipartStreamReader emitProgress:contentLength:final:callback:] + 244
6 AppDemo 0x000000010e7d048a -[RCTMultipartStreamReader readAllPartsWithCompletionCallback:progressCallback:] + 1610
7 AppDemo 0x000000010e81fdbc -[RCTMultipartDataTask URLSession:streamTask:didBecomeInputStream:outputStream:] + 444
8 CFNetwork 0x000000010ffc4c51 __88-[NSURLSession delegate_streamTask:didBecomeInputStream:outputStream:completionHandler:]_block_invoke + 51
9 Foundation 0x000000010ef243b7 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7
10 Foundation 0x000000010ef240bb -[NSBlockOperation main] + 101
11 Foundation 0x000000010ef22877 -[__NSOperationInternal _start:] + 627
12 Foundation 0x000000010ef1e5fc __NSOQSchedule_f + 198
13 libdispatch.dylib 0x000000011424605c _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000011422494f _dispatch_queue_serial_drain + 221
15 libdispatch.dylib 0x0000000114225669 _dispatch_queue_invoke + 1084
16 libdispatch.dylib 0x0000000114227ec4 _dispatch_root_queue_drain + 634
17 libdispatch.dylib 0x0000000114227bef _dispatch_worker_thread3 + 123
18 libsystem_pthread.dylib 0x00000001145dd712 _pthread_wqthread + 1299
19 libsystem_pthread.dylib 0x00000001145dd1ed start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

react native terminating with uncaught exception of type NSException

I have an error when running my app after I upgrade the ReactNative to 0.17
I was work fine with 0.13
Error code is
2016-01-04 12:22:37.405 myapp [16916:350051] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSCFString substringFromIndex:]: Index 175 out of bounds; string length 174'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ea9ce65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010dca0deb objc_exception_throw + 48
2 CoreFoundation 0x000000010ea9cd9d +[NSException raise:format:] + 205
3 Foundation 0x000000010d84811d -[NSString substringFromIndex:] + 126
4 myapp 0x000000010d5e15f5 RCTBundlePathForURL + 293
5 myapp 0x000000010d5e167d RCTIsXCAssetURL + 45
6 myapp 0x000000010d6336d0 -[RCTXCAssetImageLoader canLoadImageURL:] + 48
7 myapp 0x000000010d62ac77 -[RCTImageLoader imageURLLoaderForURL:] + 615
8 myapp 0x000000010d62c070 __87-[RCTImageLoader loadImageWithTag:size:scale:resizeMode:progressBlock:completionBlock:]_block_invoke_2125 + 368
9 libdispatch.dylib 0x000000011201fe5d _dispatch_call_block_and_release + 12
10 libdispatch.dylib 0x000000011204049b _dispatch_client_callout + 8
11 libdispatch.dylib 0x00000001120268ec _dispatch_queue_drain + 2215
12 libdispatch.dylib 0x0000000112025e0d _dispatch_queue_invoke + 601
13 libdispatch.dylib 0x0000000112028a56 _dispatch_root_queue_drain + 1420
14 libdispatch.dylib 0x00000001120284c5 _dispatch_worker_thread3 + 111
15 libsystem_pthread.dylib 0x000000011237868f _pthread_wqthread + 1129
16 libsystem_pthread.dylib 0x0000000112376365 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
original code here
https://gist.github.com/AhmedMAtia/141208f80e28a4343e26
I've had trouble upgrading from 0.13 as well. I solved this by creating a new project, then moving my custom app code over.

NSRangeException at particular Segue

I have this particular segue that keeps giving me NSRangeException. I have no code at all in prepareForSegue. I put a break point in viewdidload of that view controller and it is executed with no problem. Seems that the exception occurs in IOS system code.
This is detail of exception
2015-09-16 07:21:24.939 Vote Strategic[7523:1117149] * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x000000010a699c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010c204bb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010a583093 -[__NSArrayM objectAtIndex:] + 227
3 My Strategic 0x000000010a008cfa _TPAo13 + 42
4 My Strategic 0x000000010a009c35 _TTRXFo_dSi_aPSs9AnyObject__XFo_dSi_oPS_ + 21
5 My Strategic 0x000000010a0094ec _TFFC14My_Strategic4Rest9getRidingFS0_FSST_U_FTGSQCSo13NSURLResponse_GSQCSo6NSData_GSQCSo7NSError__T_ + 1260
6 My Strategic 0x000000010a009cea _TTRXFo_oGSQCSo13NSURLResponse_oGSQCSo6NSData_oGSQCSo7NSError__dT__XFdCb_dGSQS__dGSQS0__dGSQS1___dT__ + 90
7 CFNetwork 0x000000010c8a98c5 67+[NSURLConnection sendAsynchronousRequest:queue:completionHandler:]_block_invoke_2 + 155
8 Foundation 0x000000010ab5a57f __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK + 7
9 Foundation 0x000000010aa9b0b2 -[NSBlockOperation main] + 98
10 Foundation 0x000000010aa7d774 -[__NSOperationInternal _start:] + 645
11 Foundation 0x000000010aa7d383 __NSOQSchedule_f + 184
12 libdispatch.dylib 0x000000010dcfe614 _dispatch_client_callout + 8
13 libdispatch.dylib 0x000000010dce56a7 _dispatch_queue_drain + 2176
14 libdispatch.dylib 0x000000010dce4cc0 _dispatch_queue_invoke + 235
15 libdispatch.dylib 0x000000010dce83b9 _dispatch_root_queue_drain + 1359
16 libdispatch.dylib 0x000000010dce9b17 _dispatch_worker_thread3 + 111
17 libsystem_pthread.dylib 0x000000010e06b637 _pthread_wqthread + 729
18 libsystem_pthread.dylib 0x000000010e06940d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Please put exception breakpoint and run in debug mode to stop at the exact line of crash.
Clearly you are trying to access objects from an empty array which is bound to crash. It is always advisable to put a check on array size before accessing its elements.

SimpleLogin facebook wont login

i'm using the firebase simpleLogin for facebook login, but there seem to be an issue. i'm not sure how to debug this. What seem to be the issue here?
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
*** First throw call stack:
(
0 CoreFoundation 0x02c331e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x029b28e5 objc_exception_throw + 44
2 CoreFoundation 0x02bf9376 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 390
3 CoreFoundation 0x02c26c29 +[NSDictionary dictionaryWithObjects:forKeys:count:] + 73
4 app 0x000257b5 ParseUserData + 373
5 app 0x000982a6 __38-[LoginViewController actionFacebook:]_block_invoke + 358
6 app 0x00148647 __89-[FirebaseSimpleLogin loginToFacebookAppWithId:permissions:audience:withCompletionBlock:]_block_invoke245 + 83
7 app 0x00149068 __86-[FirebaseSimpleLogin requestFacebookAccountWithPermissions:audience:appId:withBlock:]_block_invoke + 245
8 Accounts 0x012cc91f __69-[ACAccountStore requestAccessToAccountsWithType:options:completion:]_block_invoke_2 + 85
9 libdispatch.dylib 0x02f917b8 _dispatch_call_block_and_release + 15
10 libdispatch.dylib 0x02fa64d0 _dispatch_client_callout + 14
11 libdispatch.dylib 0x02f92fe0 _dispatch_async_redirect_invoke + 202
12 libdispatch.dylib 0x02fa64d0 _dispatch_client_callout + 14
13 libdispatch.dylib 0x02f94eb7 _dispatch_root_queue_drain + 291
14 libdispatch.dylib 0x02f95127 _dispatch_worker_thread2 + 39
15 libsystem_pthread.dylib 0x032d5dab _pthread_wqthread + 336
16 libsystem_pthread.dylib 0x032d9cce start_wqthread + 30
)

Resources