I use the method bellow:
[filehandler writeData:[NSData dataWithBytesNoCopy:bytes length:size freeWhenDone:NO]];
filehandler is NSFileHandle, when my phone locked the value after some seconds arrive Null and my app crash.
Here is the crash message _:
[EXCEPTION] *** Terminating app due to uncaught exception 'NSFileHandleOperationException', reason: '*** -[NSConcreteFileHandle writeData:]: Operation not permitted'
*** Fragment of the call stack:
(
"4 libc++abi.dylib 0x1a6c398f <redacted> + 78",
"5 libc++abi.dylib 0x1a6c31a3 <redacted> + 0",
"6 libobjc.A.dylib 0x1a6cf139 <redacted> + 0",
"7 CoreFoundation 0x1b447a85 <redacted> + 0",
"8 Foundation 0x1bd3e1af <redacted> + 144",
"9 Foundation 0x1bd3ea5f <redacted> + 254",
"10 PrivateGSMEnt 0x0014acfb -[LogFileManager level:tagLevel:mainTag:append:] + 1070",
"11 PrivateGSMEnt 0x00067003 log_func + 996",
"12 PrivateGSMEnt 0x0046c451 log_writer + 166",
"13 PrivateGSMEnt 0x003dfb53 pj_log + 1284",
"14 PrivateGSMEnt 0x003dfdf7 pj_log_4 + 64",
"15 PrivateGSMEnt 0x003e0e97 replace_udp_sock + 170",
"16 PrivateGSMEnt 0x003e13f5 ioqueue_dispatch_read_event + 590",
"17 PrivateGSMEnt 0x003e32ef pj_ioqueue_poll + 898",
"18 PrivateGSMEnt 0x003f47d5 worker_proc + 84",
"19 PrivateGSMEnt 0x003de4c7 thread_main + 146",
"20 libsystem_pthread.dylib 0x1accc93b <redacted> + 216",
"21 libsystem_pthread.dylib 0x1accc85d _pthread_start + 234",
"22 libsystem_pthread.dylib 0x1acca468 thread_start + 8"
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Any ideas?
Related
I'm currently trying to play .aac audio files using the react-native-sound library. Same file works on Android with the same code. Additionally I've also tried the converted version of the audio file to .wav and this also works. Any idea what I should look for?
Raw Error:
{"code": "ENSOSSTATUSERRORDOMAIN2003334207", "domain": "NSOSStatusErrorDomain", "message": "The operation couldn’t be completed. (OSStatus error 2003334207.)", "nativeStackIOS": ["0 Biped 0x00000001016cdfbc RCTJSErrorFromCodeMessageAndNSError + 112", "1 Biped 0x00000001016cdf0c RCTJSErrorFromNSError + 236", "2 Biped 0x00000001015db688 -[RNSound prepare:withKey:withOptions:withCallback:] + 1280", "3 CoreFoundation 0x0000000180412840 __invoking___ + 144", "4 CoreFoundation 0x000000018040fa24 -[NSInvocation invoke] + 276", "5 CoreFoundation 0x000000018040fcbc -[NSInvocation invokeWithTarget:] + 60", "6 Biped 0x000000010166d9d4 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 1744", "7 Biped 0x00000001016712ec _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicEiN12_GLOBAL__N_117SchedulingContextE + 1108", "8 Biped 0x0000000101670cbc _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 144", "9 Biped 0x0000000101670c20 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28", "10 libdispatch.dylib 0x0000000180133fa4 _dispatch_call_block_and_release + 24", "11 libdispatch.dylib 0x0000000180135768 _dispatch_client_callout + 16", "12 libdispatch.dylib 0x000000018013d7f8 _dispatch_lane_serial_drain + 780", "13 libdispatch.dylib 0x000000018013e43c _dispatch_lane_invoke + 392", "14 libdispatch.dylib 0x000000018014a624 _dispatch_workloop_worker_thread + 772", "15 libsystem_pthread.dylib 0x00000001ae55eb40 _pthread_wqthread + 284", "16 libsystem_pthread.dylib 0x00000001ae55d904 start_wqthread + 8"], "userInfo": {}}
I'm developing a react-native application, I use import Share from 'react-native-share'; for sharing files.
When it open share modal on iOS and I choose Save to File ( for examples a pdf file ) it thrown this execption:
{
"code": "ENSCOCOAERRORDOMAIN3072",
"message": "The operation was cancelled.",
"nativeStackIOS": [
"0 MyApp 0x0000000109361a97 RCTJSErrorFromCodeMessageAndNSError + 135",
"1 MyApp 0x00000001093619c3 RCTJSErrorFromNSError + 275",
"2 MyApp 0x00000001092e8c81 __41-[RCTModuleMethod processMethodSignature]_block_invoke_4.110 + 161",
"3 MyApp 0x0000000109242696 __48-[RNShare open:failureCallback:successCallback:]_block_invoke_2 + 214",
"4 ShareSheet 0x00007fff4310eec7 __68-[UIActivityViewController _cleanupActivityWithSuccess:items:error:]_block_invoke + 183",
"5 UIKitCore 0x00007fff46e15f25 -[UIPresentationController transitionDidFinish:] + 978",
"6 UIKitCore 0x00007fff46e1aa61 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke.503 + 199",
"7 UIKitCore 0x00007fff46f32e2c -[_UIViewControllerTransitionContext completeTransition:] + 88",
"8 UIKitCore 0x00007fff47a0c180 -[UITransitionView notifyDidCompleteTransition:] + 247",
"9 UIKitCore 0x00007fff47a0be03 -[UITransitionView _didCompleteTransition:] + 1423",
"10 UIKitCore 0x00007fff47a45f20 -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] + 671",
"11 UIKitCore 0x00007fff47a16a11 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 268",
"12 UIKitCore 0x00007fff47a16f83 -[UIViewAnimationState animationDidStop:finished:] + 259",
"13 UIKitCore 0x00007fff47a1710a -[UIViewAnimationState animationDidStop:finished:] + 650",
"14 QuartzCore 0x00007fff2b080ac2 _ZN2CA5Layer23run_animation_callbacksEPv + 306",
"15 libdispatch.dylib 0x00007fff516ad781 _dispatch_client_callout + 8",
"16 libdispatch.dylib 0x00007fff516b9caa _dispatch_main_queue_callback_4CF + 1212",
"17 CoreFoundation 0x00007fff23b0ce49 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9",
"18 CoreFoundation 0x00007fff23b07aa9 __CFRunLoopRun + 2329",
"19 CoreFoundation 0x00007fff23b06e66 CFRunLoopRunSpecific + 438",
"20 GraphicsServices 0x00007fff38346bb0 GSEventRunModal + 65",
"21 UIKitCore 0x00007fff47578dd0 UIApplicationMain + 1621",
"22 MyApp 0x0000000109117201 main + 97",
"23 libdyld.dylib 0x00007fff516ecd29 start + 1",
"24 ??? 0x0000000000000001 0x0 + 1"
],
"domain": "NSCocoaErrorDomain",
"userInfo": {}
}
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
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.
I am trying to debug this crash. It seems to be inside Apple's framework in description method but I don't know what it's causing it.
I'm using Restkit and Core Data. I get the crash as soon as the API returns a new model "Category" with array "products" empty.
Thank you
RRCategory + RRProduct models
https://gist.github.com/imton/6f7ff91bc3f3ac25a490
Mappings
https://gist.github.com/imton/33236e0ddefef0d50a35
https://gist.github.com/imton/9baa6a35a4a8f71aa440
Api Json https://gist.github.com/imton/118736e59c1a1092dc1b
{
"categories": [
{
"token": "6G1RKVMcfNdcbAX",
"title": "Cat3",
"picture_token": "ASDFASDF",
"products": []
}
]
}
Backstack
2014-12-07 10:55:30.838 Riderr[91164:34420246] -[__NSCFBoolean length]: unrecognized selector sent to instance 0x10375c970
2014-12-07 10:55:30.862 Riderr[91164:34420246] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean length]: unrecognized selector sent to instance 0x10375c970'
*** First throw call stack:
(
0 CoreFoundation 0x00000001034b1b75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010314abb7 objc_exception_throw + 45
2 CoreFoundation 0x00000001034b8c8d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00000001034106fc ___forwarding___ + 988
4 CoreFoundation 0x0000000103410298 _CF_forwarding_prep_0 + 120
5 CoreData 0x0000000100d3135c -[NSManagedObject _descriptionValues] + 620
6 CoreData 0x0000000100d3195b -[NSManagedObject description] + 267
7 Riderr 0x000000010037393b -[NSManagedObject(FixCrashBug) description_swizzle] + 43
8 CoreFoundation 0x00000001034a3ea6 -[NSArray descriptionWithLocale:indent:] + 358
9 Foundation 0x00000001014f3524 _NSDescriptionWithLocaleFunc + 64
10 CoreFoundation 0x00000001033ac97d __CFStringAppendFormatCore + 9645
11 CoreFoundation 0x00000001034922f0 _CFStringCreateWithFormatAndArgumentsAux2 + 256
12 Foundation 0x00000001014f34b8 -[NSPlaceholderString initWithFormat:locale:arguments:] + 153
13 Riderr 0x00000001003ad29c +[DDLog log:level:flag:context:file:function:line:tag:format:] + 588
14 Riderr 0x0000000100373b6d __21-[RRHomeTableVC sync]_block_invoke + 205
15 Riderr 0x00000001003770be __72-[RRRiderrClient getAllCategoriesWithProductsSuccessBlock:failureBlock:]_block_invoke + 142
16 Riderr 0x000000010051b92b __66-[RKObjectRequestOperation setCompletionBlockWithSuccess:failure:]_block_invoke244 + 91
17 libdispatch.dylib 0x00000001041b4b06 _dispatch_call_block_and_release + 12
18 libdispatch.dylib 0x00000001041d2794 _dispatch_client_callout + 8
19 libdispatch.dylib 0x00000001041bb89b _dispatch_main_queue_callback_4CF + 949
20 CoreFoundation 0x0000000103419469 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
21 CoreFoundation 0x00000001033dc36b __CFRunLoopRun + 2043
22 CoreFoundation 0x00000001033db906 CFRunLoopRunSpecific + 470
23 GraphicsServices 0x00000001076de9f0 GSEventRunModal + 161
24 UIKit 0x0000000101e901a0 UIApplicationMain + 1282
25 Riderr 0x0000000100370fbc main + 140
26 libdyld.dylib 0x0000000104207145 start + 1
27 ??? 0x0000000000000001 0x0 + 1
)
It means that you give an NSNumber-wrapped Boolean to CoreData when it expects a string.
Then apparently you use method swizzling which is a pretty bad idea and may lead to such crashes.