Search code examples
iosxcodeunity-game-engineios14

Unity app crashes on iOS14 when transitioning to a specific scene


Environment
unity: 2019.3.15f1
Xcode: 12.0
iOS 14

Problem
I'm creating a 3D game app in unity. Just recently iOS 14 was released and I tried running the app there and found an issue where it would crash about 20% during certain scene transitions. The same version of the app did not crash on iOS 13.7 or earlier.How can I avoid a crash?

Detailed Situation
The app is divided into several scenes, but it only crashed in certain scenes and not in others. Also, that particular scene doesn't reliably crash either, which is odd because it's only about 20%. The fact that it never crashed before iOS 13.7 in the first place is also puzzling. I deleted almost all the objects in the scene to which I was transitioning to identify the problem, and it still crashed. I also ran debug logs of the various code being processed during the transition to see when it crashed, and found that it wasn't a specific code crash, but a random one. Of course, it works properly on the PC, and the crash does not happen on the android version.

Error log
I get the following error on the Xcode.

Thread 69: EXC_BAD_ACCESS (code=1, address=0x0)

Once, I also got the following error.

Thread 2: "-[OS_xpc_uint64 UpdateQueueAdd:]: unrecognized selector sent to instance 0x8f796c08526c7e77"

What I've tried

  • Deleting all objects in the scene where the crash occurs
  • Removing Firebase related objects/script
  • Changing the version of Unity (2019.4.10f)
  • Reinstalling Xcode 12.0

That didn't solve the problem.


Solution

  • I've been having the same error. I found that if I remove "VideoPlayer" in my scene, it doesn't crash anymore.

    If you are using any video/audio in your scenes, then remove "VideoPlayer" in your scene.