'Communications error: <OS_xpc_error:'

2019-01-25 00:54发布

I am recording video using my application for 4-5 minutes, each time application shows following message in console and crashes.

warning: could not load any Objective-C class information from the dyld shared cache. This will significantly reduce the quality of type information available.

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

iOS version : 9.1
Device : iPhone 5S, 6 and 6+.

Same thing works like charm in other version below 9.1.

is anyone aware about this error or any resolution for same?

2条回答
闹够了就滚
2楼-- · 2019-01-25 01:35

Finally after 3 days of sweating & findings, it proven worthy.

Outline about XPC error :

'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.

More detail about XPC services

Solution

Its internal communication error, when your app communicates with device hardware such error occurs. Wait for apple to release new update of OS, when available download it. As most of the time it happens due to some glich in release OS version.

I faced same issue in iOS 9.1. Downloaded new version iOS 9.2 and it fixed without writing single line of code.

Thanks.

查看更多
【Aperson】
3楼-- · 2019-01-25 01:42

I was getting this error even in the simulator. It took me a minute but I found a complicated block retain cycle. Here's my issue vastly simplified:

blockA = ^{
    //do block A stuff
    blockB()
}

blockB = ^{
    //do block B stuff
    blockA()
}

This seems like a simple mistake but this application has been going on for 4 years and this particular section is worked on roughly once a year so it's easy to lose track of what's going on in 20,000 lines. Anyway, one thing that tipped me off to this is that some of my variables inside another block (inside "blockA") had variables that were printing memory addresses instead of values. eg

NSString email prints to something like 0xAC08F298 when instead it should be printing something like user@mail.net

查看更多
登录 后发表回答