Periodic crash in networking code, iOS simulator
Periodic crash in networking code, iOS simulator
- Subject: Periodic crash in networking code, iOS simulator
- From: Rick Mann <email@hidden>
- Date: Mon, 17 Jul 2017 16:37:56 -0700
I work on an app that talks to a special camera over Wi-Fi. We use HTTP[S] to
control the camera and get data from it. We use NSURLConnection with a
delegate. Network operations are called from the main queue and call back on
the main queue. This has been working well for years. But recently, we're
making enhancements to the camera that result in fast data acquisition times,
and some of the sets of transfers we do has changed.
Every now and again (while running in the iPad simulator on macOS 10.12.5), the
simulator crashes as shown below, with EXC_BAD_ACCESS (code=EXC_i386_GPFLT).
%rsi seems completely bogus (0x894c27ebeb74c084). %rax is 0xfb8be8e6894cff00.
None of my other stacks are any more useful than this one, in that none of them
shows execution in my own code beyond main(), except for one thread that's
doing processing (via dispatch_async()) of the data that was returned in the
network call, on a concurrent queue. That processing is completely
self-contained, and the result is handled via dispatch_async() to the main
queue.
Any suggestions on what might be causing this? Thanks!
libBacktraceRecording.dylib`__gcd_queue_item_enqueue_hook_block_invoke:
0x10f49ce32 <+0>: pushq %rbp
0x10f49ce33 <+1>: movq %rsp, %rbp
-> 0x10f49ce36 <+4>: movq 0x20(%rsi), %rax
0x10f49ce3a <+8>: movq 0x20(%rdi), %rcx
0x10f49ce3e <+12>: cmpq 0x8(%rcx), %rax
0x10f49ce42 <+16>: sete %al
0x10f49ce45 <+19>: popq %rbp
0x10f49ce46 <+20>: retq
Thread 26Queue : com.apple.CFNetwork.Connection (serial)
#0 0x000000010f49ce36 in __gcd_queue_item_enqueue_hook_block_invoke ()
#1 0x000000010f49c4c5 in gcd_queue_item_enqueue_hook ()
#2 0x00000001173afc91 in _dispatch_introspection_queue_item_enqueue_hook ()
#3 0x000000011738a188 in _dispatch_queue_push ()
#4 0x00000001178cd78a in nw_connection_read ()
#5 0x00000001178d90bc in tcp_connection_read ()
#6 0x000000010fda9dd1 in TCPIOConnection::read(unsigned long, unsigned
long, void (dispatch_data_s*, CFStreamError) block_pointer) ()
#7 0x000000010fdacae0 in HTTPEngine::_getBodyIntelligently(void
(dispatch_data_s*, CFStreamError, bool) block_pointer) ()
#8 0x000000010fdac656 in HTTPEngine::_readBodyStartNextRead() ()
#9 0x000000010ff85fbb in
___ZN10HTTPEngine21_getBodyIntelligentlyEU13block_pointerFvP15dispatch_data_s13CFStreamErrorbE_block_invoke
()
#10 0x000000010fdab55a in
___ZN15TCPIOConnection4readEmmU13block_pointerFvP15dispatch_data_s13CFStreamErrorE_block_invoke
()
#11 0x00000001173854a6 in _dispatch_call_block_and_release ()
#12 0x00000001173ae05c in _dispatch_client_callout ()
#13 0x000000011738c94f in _dispatch_queue_serial_drain ()
#14 0x000000011738d669 in _dispatch_queue_invoke ()
#15 0x000000011738fec4 in _dispatch_root_queue_drain ()
#16 0x000000011738fbef in _dispatch_worker_thread3 ()
#17 0x00000001177455a2 in _pthread_wqthread ()
#18 0x000000011774507d in start_wqthread ()
Enqueued from com.apple.network.connections (Thread 34)Queue :
com.apple.network.connections (serial)
#0 0x000000011738a188 in _dispatch_queue_push ()
#1 0x00000001178cdb49 in __nw_connection_read_block_invoke.122 ()
#2 0x0000000117617564 in nw_read_request_complete ()
#3 0x000000011761829a in nw_read_request_consume_data ()
#4 0x0000000117898cf3 in nw_endpoint_flow_service_reads ()
#5 0x00000001178bcf25 in nw_socket_update_input_source ()
#6 0x00000001173ae05c in _dispatch_client_callout ()
#7 0x000000011738ac6e in _dispatch_continuation_pop ()
#8 0x000000011739f9fc in _dispatch_source_latch_and_call ()
#9 0x00000001173984f1 in _dispatch_source_invoke ()
#10 0x000000011738cc47 in _dispatch_queue_serial_drain ()
#11 0x000000011738d669 in _dispatch_queue_invoke ()
#12 0x000000011738fec4 in _dispatch_root_queue_drain ()
#13 0x000000011738fbef in _dispatch_worker_thread3 ()
#14 0x00000001177455a2 in _pthread_wqthread ()
#15 0x000000011774507d in start_wqthread ()
--
Rick Mann
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden