Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Communications error: OS_xpc_error in Xcode 6?

Tags:

xcode

swift

I got this error this morning and can't find a reasonable explanation:

Communications error: <OS_xpc_error: <error: 0x3b3c2614> { count = 1, contents =
    "XPCErrorDescription" => <string: 0x3b3c286c> { length = 22, contents = "Connection interrupted" }
}>

I think this happen when I am taking a photo. I can show the complete snippet upon request. However, it's example code from a tutorial. It only showed up once, and there is not much explanation online either.

I have turned on breakpoint at all exception and symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints. But this error showed too without these breakpoints set.

Neither of the breakpoint invoked when this error showed up.

What is this?

like image 883
donkey Avatar asked Mar 01 '15 15:03

donkey


2 Answers

XPC is Apple's inter-process communication (IPC) system. Some functionality (such as h.264 encoding/decoding, or interacting with camera hardware) is handled by a separate app - a daemon - that runs all the time in the background.

Connection interrupted means that the IPC connection was interrupted for some reason. Perhaps it took too long, perhaps the timing was just bad and the daemon or your app needed to urgently do something else.

It's probably not an error per se. When dealing with IPC, the daemon should be considered a black box, and your connection to it, somewhat flimsy. In this case you're talking to the daemon indirectly (via Apple's libraries), and it's likely they've designed it to work asynchronously and automatically recover from errors.

like image 115
damian Avatar answered Oct 19 '22 02:10

damian


I encountered the same Error. My mistake was to load an URL of a specific gif (http://whyd.com/uCoverImg/bd1833e6afe5a8ae9c9aff4177d3f80d_960x.gif) with SDWebImage in a imageView

NSURL *url = NSURL urlFromString:@"image.gif"];
[myImageView sd_setImageWithURL:imageCoverUrl];

This crash isn't exist for all GIF pictures, I have to find the right rule

like image 37
Damien Romito Avatar answered Oct 19 '22 02:10

Damien Romito