什么是通信错误:Xcode 6 中的 OS_xpc_error? [英] What is Communications error: OS_xpc_error in Xcode 6?

查看:21
本文介绍了什么是通信错误:Xcode 6 中的 OS_xpc_error?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上我遇到了这个错误,但找不到合理的解释:

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.

我在 UIViewAlertForUnsatisfiableConstraints 处打开了断点 at all exception 和符号断点.但是在没有设置这些断点的情况下也会显示此错误.

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.

这是什么?

推荐答案

XPC 是 Apple 的进程间通信 (IPC) 系统.某些功能(例如 h.264 编码/解码,或与相机硬件交互)由一个单独的应用程序处理 - 一个守护进程 - 一直在后台运行.

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 表示 IPC 连接由于某种原因中断.也许时间太长了,也许时机不好,守护程序或您的应用程序需要紧急执行其他操作.

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.

这本身可能不是错误.在处理 IPC 时,守护进程应该被视为一个黑匣子,并且您与它的连接有些脆弱.在这种情况下,您是在间接地(通过 Apple 的库)与守护程序对话,并且很可能他们已将其设计为异步工作并自动从错误中恢复.

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.

这篇关于什么是通信错误:Xcode 6 中的 OS_xpc_error?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆