Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
498 views
in Technique[技术] by (71.8m points)

swift - What is Communications error: OS_xpc_error in Xcode 6?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...