I have an application setup using Parse. Recently, I started getting the following error when my app starts up.
[Error]: Caught "NSInternalInconsistencyException" with reason "Tried to save an object with a new, unsaved child."
The app doesn't crash, as the exception is caught. However, I am unable to discern the cause of the exception. Below is the stack trace that is printed to the console:
(
0 CoreFoundation 0x0000000185f802f4 <redacted> + 160
1 libobjc.A.dylib 0x0000000197c4c0e4 objc_exception_throw + 60
2 CoreFoundation 0x0000000185f80218 <redacted> + 0
3 STSI 0x0000000100305e4c -[PFPointerObjectEncoder encodeParseObject:] + 116
4 STSI 0x000000010030528c -[PFEncoder encodeObject:] + 148
5 STSI 0x00000001002d0254 __129+[PFRESTQueryCommand findCommandParametersWithOrder:conditions:selectedKeys:includedKeys:limit:skip:extraOptions:tracingEnabled:]_block_invoke97 + 1752
6 CoreFoundation 0x0000000185ed47a4 <redacted> + 88
7 CoreFoundation 0x0000000185ec1cec <redacted> + 240
8 STSI 0x00000001002cfa9c +[PFRESTQueryCommand findCommandParametersWithOrder:conditions:selectedKeys:includedKeys:limit:skip:extraOptions:tracingEnabled:] + 936
9 STSI 0x00000001002cf69c +[PFRESTQueryCommand findCommandParametersForQueryState:] + 348
10 STSI 0x00000001002cf074 +[PFRESTQueryCommand findCommandForQueryState:withSessionToken:] + 84
11 STSI 0x00000001002dccdc __78-[PFQueryController findObjectsAsyncForQueryState:withCancellationToken:user:]_block_invoke + 116
12 STSI 0x000000010034f9ec __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 + 96
13 libdispatch.dylib 0x0000000100c38fd4 _dispatch_call_block_and_release + 24
14 libdispatch.dylib 0x0000000100c38f94 _dispatch_client_callout + 16
15 libdispatch.dylib 0x0000000100c46b54 _dispatch_root_queue_drain + 2180
16 libdispatch.dylib 0x0000000100c48248 _dispatch_worker_thread3 + 132
17 libsystem_pthread.dylib 0x00000001984a922c _pthread_wqthread + 816
18 libsystem_pthread.dylib 0x00000001984a8ef0 start_wqthread + 4
).
I'm quite clueless as to what this stack trace is implying. Additionally, in the debugger, I can see many stacks of BFTasks being allocated.
What is the reason behind the exception being raised?
Related
Our app is crash online, not in debug mode.
We cannot reproduce the crash.
Here is the crash log which caught with bugly.
Anyone could help or some clue , Please!
#43 Thread
SIGSEGV
SEGV_ACCERR
0 libobjc.A.dylib objc_msgSend + 16
1 CoreFoundation ___CFPropertyListIsValidAux + 56
2 CoreFoundation ___CFPropertyListIsDictPlistAux + 188
3 CoreFoundation ___CFDictionaryApplyFunction_block_invoke + 24
4 CoreFoundation _CFBasicHashApply + 132
5 CoreFoundation CFDictionaryApplyFunction + 180
6 CoreFoundation ___CFPropertyListIsValidAux + 388
7 CoreFoundation CFPropertyListIsValid + 28
8 CFNetwork ___ZN12__CFURLCache23CreateAndStoreCacheNodeEP16__CFURLCacheNodePK20_CFCachedURLResponsePK10__CFStringPK13_CFURLRequestPKvbRb_block_invoke + 148
9 libdispatch.dylib __dispatch_call_block_and_release + 24
10 libdispatch.dylib __dispatch_client_callout + 16
11 libdispatch.dylib __dispatch_lane_serial_drain$VARIANT$mp + 592
12 libdispatch.dylib __dispatch_lane_invoke$VARIANT$mp + 432
13 libdispatch.dylib __dispatch_workloop_worker_thread + 600
14 libsystem_pthread.dylib _pthread_wqthread + 312
when I use Korean language with Firestore.
Occur exception like this...
how can I solve it?
FAILED: Read document has key () instead of expected key ().'
*** First throw call stack:
(
0 CoreFoundation 0x00000001180d81ab __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000011776df41 objc_exception_throw + 48
2 CoreFoundation 0x00000001180dd372 +[NSException raise:format:arguments:] + 98
3 Foundation 0x0000000117212089 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
4 dayView 0x000000010d69e3ea -[FSTLevelDBRemoteDocumentCache decodedMaybeDocument:withKey:] + 754
5 dayView 0x000000010d69ddcf -[FSTLevelDBRemoteDocumentCache documentsMatchingQuery:] + 488
6 dayView 0x000000010d69ec69 -[FSTLocalDocumentsView documentsMatchingCollectionQuery:] + 171
7 dayView 0x000000010d69ea6f -[FSTLocalDocumentsView documentsMatchingQuery:] + 210
8 dayView 0x000000010d6a3f01 -[FSTLocalStore executeQuery:] + 79
9 dayView 0x000000010d68946c -[FSTSyncEngine listenToQuery:] + 273
10 dayView 0x000000010d68132d -[FSTEventManager addListener:] + 469
11 dayView 0x000000010d6831da __64-[FSTFirestoreClient listenToQuery:options:viewSnapshotHandler:]_block_invoke + 62
12 libdispatch.dylib 0x00000001196ca3f7 _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x00000001196cb43c _dispatch_client_callout + 8
14 libdispatch.dylib 0x00000001196d395b _dispatch_queue_serial_drain + 1162
15 libdispatch.dylib 0x00000001196d42df _dispatch_queue_invoke + 336
16 libdispatch.dylib 0x00000001196d007d _dispatch_queue_override_invoke + 733
17 libdispatch.dylib 0x00000001196d71f9 _dispatch_root_queue_drain + 772
18 libdispatch.dylib 0x00000001196d6e97 _dispatch_worker_thread3 + 132
19 libsystem_pthread.dylib 0x0000000119b931ca _pthread_wqthread + 1387
20 libsystem_pthread.dylib 0x0000000119b92c4d start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I have a crash in
-[__NSArrayM removeObjectAtIndex:] + 262
However my code does not use removeObjectAtIndex:. Are there any other functions which might call removeObjectAtIndex: internally?
My guess is replaceObjectAtIndex: which I use.
Also, is there some documentation source where I can get information like this?
here is the complete stack trace:
Thread : Fatal Exception: NSRangeException
0 CoreFoundation 0x00000001860fe59c __exceptionPreprocess + 132
1 libobjc.A.dylib 0x000000019685c0e4 objc_exception_throw + 60
2 CoreFoundation 0x0000000185fe362c -[__NSArrayM removeObjectAtIndex:]
3 Musixmatch 0x0000000100b9da24 +[MyController updateMessage:] + 1011504
4 Musixmatch 0x0000000100b95dc8 -[MyAPICalls sendNewMessage:] + 979668
5 libdispatch.dylib 0x0000000196ea13ac _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x0000000196ea136c _dispatch_client_callout + 16
7 libdispatch.dylib 0x0000000196eab4c0 _dispatch_queue_drain + 1216
8 libdispatch.dylib 0x0000000196ea4474 _dispatch_queue_invoke + 132
9 libdispatch.dylib 0x0000000196ead224 _dispatch_root_queue_drain + 664
10 libdispatch.dylib 0x0000000196eae75c _dispatch_worker_thread3 + 108
11 libsystem_pthread.dylib 0x000000019707d2e4 _pthread_wqthread + 816
12 libsystem_pthread.dylib 0x000000019707cfa8 start_wqthread + 4
So the last method called from the app is updateMessage:. Update message itself only has a objectAtIndex:. It then makes a call to two methods in other classes. But if they were causing the crash, I believe they should have been included in the stack trace.
I'm getting many crash reports from my iOS today extension in Crashlytics which I can't make any sense of. The extension retrieves the user's current location and saves it inside the app. The crashes look like this:
Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x174132fc0.events
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000f2cdbeb8
0 libobjc.A.dylib 0x0000000194d7fbd0 objc_msgSend + 16
1 CoreFoundation 0x00000001834823f8 CFDictionaryApplyFunction + 236
2 CoreLocation 0x0000000183d1c09c (null) + 54344
3 CoreLocation 0x0000000183d1adf0 (null) + 49564
4 libxpc.dylib 0x00000001955c4ccc _xpc_connection_call_event_handler + 68
5 libxpc.dylib 0x00000001955c8a18 do_mach_notify_port_destroyed + 124
6 libxpc.dylib 0x00000001955c8970 _Xmach_notify_port_destroyed + 96
Here is another one:
Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x1743221c0.events
EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x0000000000000008
0 CoreFoundation 0x0000000186678640 CFBasicHashGetBucket + 28
1 CoreFoundation 0x00000001866785c4 CFBasicHashApply + 100
2 CoreFoundation 0x00000001866785c4 CFBasicHashApply + 100
3 CoreFoundation 0x00000001866823d8 CFDictionaryApplyFunction + 204
4 CoreLocation 0x0000000186f1c09c (null) + 54344
5 CoreLocation 0x0000000186f1adf0 (null) + 49564
6 libxpc.dylib 0x0000000198814ccc _xpc_connection_call_event_handler + 68
7 libxpc.dylib 0x0000000198818a18 do_mach_notify_port_destroyed + 124
8 libxpc.dylib 0x0000000198818970 _Xmach_notify_port_destroyed + 96
9 libxpc.dylib 0x00000001988188e4 notify_server + 100
10 libxpc.dylib 0x0000000198812a98 _xpc_connection_mach_event + 1848
11 libdispatch.dylib 0x000000019860da28 _dispatch_client_callout4 + 16
12 libdispatch.dylib 0x0000000198611140 _dispatch_mach_msg_invoke + 492
13 libdispatch.dylib 0x00000001986182d4 _dispatch_queue_drain + 2008
14 libdispatch.dylib 0x0000000198610668 _dispatch_mach_invoke + 136
15 libdispatch.dylib 0x00000001986182d4 _dispatch_queue_drain + 2008
16 libdispatch.dylib 0x0000000198610a5c _dispatch_queue_invoke + 132
17 libdispatch.dylib 0x00000001986182d4 _dispatch_queue_drain + 2008
18 libdispatch.dylib 0x0000000198610a5c _dispatch_queue_invoke + 132
19 libdispatch.dylib 0x000000019861a318 _dispatch_root_queue_drain + 720
20 libdispatch.dylib 0x000000019861bc4c _dispatch_worker_thread3 + 108
21 libsystem_pthread.dylib 0x00000001987ed22c _pthread_wqthread + 816
As you can see none of my own classes is visible in the stack trace.
How can I debug this? Do these crashes appear to the user?
Thanks for your help!
I installed Crashlytics on my iOS Today Extension, and I am getting this strange crash. Does anyone know why this might be happening?
Fatal Exception: NSInternalInconsistencyException
removing inactive plug-in com.somecompany.someapp.TodayExtension(1.0)>
The line that it is crashing on is
11 PlugInKit -[PKService unregisterPersonality:] + 188
In my today extension, in viewDidLoad, it will get the user's current location, and then make a network request to fetch data about that location. Is this happening because my operation is taking too long and iOS is killing my extension? I haven't been able to reproduce this, but I think what user's see is a blank space where the extension should be or it doesn't show anything but the title of the extension.
Thread : Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x0000000181cc2530 __exceptionPreprocess + 132
1 libobjc.A.dylib 0x0000000192c980e4 objc_exception_throw + 60
2 CoreFoundation 0x0000000181cc23f0 +[NSException raise:format:]
3 Foundation 0x0000000182b6dc34 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 112
4 PlugInKit 0x000000018d1c04a0 __35-[PKService unregisterPersonality:]_block_invoke + 488
5 libdispatch.dylib 0x00000001932e9954 _dispatch_client_callout + 16
6 libdispatch.dylib 0x00000001932f31e4 _dispatch_barrier_sync_f_invoke + 76
7 PlugInKit 0x000000018d1c024c -[PKService unregisterPersonality:] + 188
8 PlugInKit 0x000000018d1bdfec -[PKServicePersonality shutdownPlugIn] + 108
9 CoreFoundation 0x0000000181cc8350 __invoking___ + 144
10 CoreFoundation 0x0000000181bc621c -[NSInvocation invoke] + 296
11 Foundation 0x0000000182c9d33c __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT__ + 24
12 Foundation 0x0000000182b4b8c8 -[NSXPCConnection _decodeAndInvokeMessageWithData:] + 1604
13 Foundation 0x0000000182accbd4 message_handler + 708
14 libxpc.dylib 0x00000001934f0c78 _xpc_connection_call_event_handler + 68
15 libxpc.dylib 0x00000001934eeb7c _xpc_connection_mach_event + 2160
16 libdispatch.dylib 0x00000001932e9a28 _dispatch_client_callout4 + 16
17 libdispatch.dylib 0x00000001932ed140 _dispatch_mach_msg_invoke + 492
18 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
19 libdispatch.dylib 0x00000001932ec668 _dispatch_mach_invoke + 136
20 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
21 libdispatch.dylib 0x00000001932eca5c _dispatch_queue_invoke + 132
22 libdispatch.dylib 0x00000001932f6318 _dispatch_root_queue_drain + 720
23 libdispatch.dylib 0x00000001932f7c4c _dispatch_worker_thread3 + 108
24 libsystem_pthread.dylib 0x00000001934c922c _pthread_wqthread + 816
25 libsystem_pthread.dylib 0x00000001934c8ef0 start_wqthread + 4
Thread : Crashed: service sync
0 libsystem_kernel.dylib 0x000000019342f270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x00000001934cd170 pthread_kill + 112
2 libsystem_c.dylib 0x00000001933a6b18 abort + 112
3 libc++abi.dylib 0x0000000192465418 __cxa_bad_cast
4 libc++abi.dylib 0x0000000192484b8c default_unexpected_handler()
5 libobjc.A.dylib 0x0000000192c983c0 _objc_terminate() + 128
6 libc++abi.dylib 0x0000000192481bb4 std::__terminate(void (*)()) + 16
7 libc++abi.dylib 0x0000000192481c24 std::terminate() + 64
8 libobjc.A.dylib 0x0000000192c98318 _destroyAltHandlerList
9 libdispatch.dylib 0x00000001932e9968 _dispatch_client_callout + 36
10 libdispatch.dylib 0x00000001932f31e4 _dispatch_barrier_sync_f_invoke + 76
11 PlugInKit 0x000000018d1c024c -[PKService unregisterPersonality:] + 188
12 PlugInKit 0x000000018d1bdfec -[PKServicePersonality shutdownPlugIn] + 108
13 CoreFoundation 0x0000000181cc8350 __invoking___ + 144
14 CoreFoundation 0x0000000181bc621c -[NSInvocation invoke] + 296
15 Foundation 0x0000000182c9d33c __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT__ + 24
16 Foundation 0x0000000182b4b8c8 -[NSXPCConnection _decodeAndInvokeMessageWithData:] + 1604
17 Foundation 0x0000000182accbd4 message_handler + 708
18 libxpc.dylib 0x00000001934f0c78 _xpc_connection_call_event_handler + 68
19 libxpc.dylib 0x00000001934eeb7c _xpc_connection_mach_event + 2160
20 libdispatch.dylib 0x00000001932e9a28 _dispatch_client_callout4 + 16
21 libdispatch.dylib 0x00000001932ed140 _dispatch_mach_msg_invoke + 492
22 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
23 libdispatch.dylib 0x00000001932ec668 _dispatch_mach_invoke + 136
24 libdispatch.dylib 0x00000001932f42d4 _dispatch_queue_drain + 2008
25 libdispatch.dylib 0x00000001932eca5c _dispatch_queue_invoke + 132
26 libdispatch.dylib 0x00000001932f6318 _dispatch_root_queue_drain + 720
27 libdispatch.dylib 0x00000001932f7c4c _dispatch_worker_thread3 + 108
28 libsystem_pthread.dylib 0x00000001934c922c _pthread_wqthread + 816
My main thread (did not crash here though):
Thread : com.apple.main-thread
0 TodayExtension 0x00000001000ae370 -[TodayViewController normalView] (TodayViewController.m:32)
1 TodayExtension 0x00000001000adf58 __36-[TodayViewController showErrorView]_block_invoke (TodayViewController.m:173)
2 libdispatch.dylib 0x00000001932e9994 _dispatch_call_block_and_release + 24
3 libdispatch.dylib 0x00000001932e9954 _dispatch_client_callout + 16
4 libdispatch.dylib 0x00000001932ee20c _dispatch_main_queue_callback_4CF + 1608
5 CoreFoundation 0x0000000181c7a2ec __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
6 CoreFoundation 0x0000000181c78394 __CFRunLoopRun + 1492
7 CoreFoundation 0x0000000181ba51f4 CFRunLoopRunSpecific + 396
8 GraphicsServices 0x000000018afc76fc GSEventRunModal + 168
9 UIKit 0x000000018653610c UIApplicationMain + 1488
10 libxpc.dylib 0x00000001934fc250 _xpc_objc_main + 768
11 libxpc.dylib 0x00000001934fdf38 xpc_main + 200
12 Foundation 0x0000000182ca1818 service_connection_handler
13 PlugInKit 0x000000018d1be910 -[PKService run] + 600
14 PlugInKit 0x000000018d1be548 +[PKService main] + 64
15 PlugInKit 0x000000018d1be938 +[PKService _defaultRun:arguments:] + 24
16 libextension.dylib 0x00000001924f9960 NSExtensionMain + 68
17 libdyld.dylib 0x0000000193316a08 start + 4
I see exactly the same thing on Crashlytics.
According to Apple this crash is a known bug in iOS 8 (including the 8.3 beta). The crash only occurs when the extension is shutting down, which means that the user doesn't see the extension crash.
So the only thing we can do right now is ignoring this crash