I've got a symbolicated stack trace that's giving me a headache! Annoyingly, I can't reproduce this on any of our test devices so I only have the crash reports to work from.
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSURLResponseInternal)'
Last Exception Backtrace: CoreFoundation
0x2ac7af8f __exceptionPreprocess + 126 libobjc.A.dylib
0x3932bc8b objc_exception_throw + 38 CoreFoundation
0x2ac7aed5 -[NSException initWithCoder:] + 0 Foundation
0x2ba218d1 0x2b8ef000 + 632 Foundation
0x2ba23463 ___writeJSONObject_block_invoke + 186 CoreFoundation
0x2ab96f5d __65-[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke + 92 CoreFoundation
0x2ab96e7f -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 174 Foundation
0x2ba230e3 _writeJSONObject + 414 Foundation
0x2ba2180f _writeJSONValue + 438 Foundation
0x2ba21625 -[_NSJSONWriter dataWithRootObject:options:error:] + 128 Foundation
0x2ba224bf +[NSJSONSerialization dataWithJSONObject:options:error:] + 338 whats-new
0x00315fa3 0xc9000 (WNLoadingView.m:28) whats-new
0x00318683 0xc9000 (WNLoadingView.m:28) whats-new
0x003199fb 0xc9000 (WNLoadingView.m:28) libdispatch.dylib
0x398bc2cf _dispatch_client_callout + 22 libdispatch.dylib
0x398c3a3d _dispatch_barrier_sync_f_invoke + 48 whats-new
0x00319911 0xc9000 (WNLoadingView.m:28) whats-new
0x003185bb 0xc9000 (WNLoadingView.m:28) whats-new
0x0031fac3 0xc9000 (WNLoadingView.m:28) whats-new
0x0031f97f 0xc9000 (WNLoadingView.m:28) whats-new
0x0031dce3 0xc9000 (WNLoadingView.m:28) libdispatch.dylib
0x398bc2e3 _dispatch_call_block_and_release + 10 libdispatch.dylib
0x398c3dff _dispatch_after_timer_callback + 66 libdispatch.dylib
0x398ce173 _dispatch_source_latch_and_call + 1606 libdispatch.dylib
0x398bde15 _dispatch_source_invoke + 212 libdispatch.dylib
0x398c4397 _dispatch_queue_drain + 554 libdispatch.dylib
0x398beaad _dispatch_queue_invoke + 84 libdispatch.dylib
0x398c5f9f _dispatch_root_queue_drain + 394 libdispatch.dylib
0x398c73c3 _dispatch_worker_thread3 + 94 libsystem_pthread.dylib
0x39a20db5 _pthread_wqthread + 668 libsystem_pthread.dylib
0x39a20b08 start_wqthread + 8
The reason for the crash is pretty obvious (and isn't my question!) - I'm trying to write a non-jsonable object into json data. The tricky part is working out exactly where this is happening.
All the references to WNLoadingView.m
are a complete red herring - that line of WNLoadingView
is just @implementation WNLoadingView
and the address 0xc9000
is just the starting point of our binary in memory. However, 0x00315fa3
looks like it's in our space but I don't know how to see what's actually there :)
Sigh.
My current theory is that the crash is occurring in a library that I don't have debug information for (i.e. a 3rd party .a
linked from a pod).
I guess I have two questions;
How can I use this stack trace to find out which library is causing this?
or
If my theory isn't correct, does anyone know another approach to try or have another theory?