What is the Core Audio 561015905 error and why does this happen when I use the lock button?

Starting with the upgrade to iOS 10 and Xcode 8, the iOS application gives an error and crash every time the screen is turned off using the lock button. Error:

*** Application termination due to the uncaught exception "com.apple.coreaudio.avfaudio", reason: "error 561015905"

I do not use Core Audio or any sound whatsoever. But I use SceneKit, which I assume uses Core Audio.

In fact, this behavior does not seem to be related to my code at all. This is happening on the brand new pristine SceneKit template! This does not happen in the simulator, but it is constantly being tested with the iPhone 5. I have not tried it with another model.

Steps to play: Create a new project in Xcode 8.0 using the Game template using SceneKit. Set the command in the project editor to sign the code. Connect your iPhone 5 for testing. Build and run the application. As soon as it starts (and you see a rotating plane), press the lock button. An error has occurred and the application will not return from the lock screen.

The Google results for the error message seem to belong to people using Core Audio or trying to play sound that is not applicable here.

What is this mistake and what can be done with it?

+5
source share
1 answer

This is an Apple bug that has 2 workarounds while we wait for a fix in iOS 10.2:

(1) (worse) enable background sound

(2) (better) see Apple post below

Message from Apple: This is a known issue that will be fixed in 10.2. At the same time, another simplified workaround should work: First, start creating a sound engine before entering the background mode (for example, during setup). You can call it simply by getting the sound engine from SCNView:

scnView.audioEngine;

+3
source

All Articles