Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes on iOS16 with Xcode 14 #703

Closed
timbotimbo opened this issue Oct 23, 2022 · 3 comments
Closed

App crashes on iOS16 with Xcode 14 #703

timbotimbo opened this issue Oct 23, 2022 · 3 comments
Labels
ios This issue is specific to the iOS/iPadOS Platform.

Comments

@timbotimbo
Copy link
Collaborator

timbotimbo commented Oct 23, 2022

[Update: this was fixed in newer Unity versions, see the comments below]

Describe the bug
Unity will instantly crash when ran on an iOS 16 device using Xcode 14.
This will cause an app using flutter_unity_widget to crash on the splash screen.
The exact same project will run like normal with Xcode 14 on iPadOS 15, and probably iOS 15 too.

Looks like the issue was already reported to Flutter here by @RoyalCoder88, but it was closed because it is a Unity issue.
Given that we use Unity here, it is important to document this crash here.

I'm not sure which exact Unity versions have this error, but I've seen multiple 2021.3.x versions mentioned.

To Reproduce
My setup:

  • Unity 2021.3.6
  • flutter_unity_widget 2022.2.0
  • iPhone XS with iOS16
  • Xcode 14.0.1
  1. Setup the example project, and export iOS in the Unity project.
  2. Click run in Xcode.
  3. Xcode will throw errors when the app starts.

Solution
This unity forum thread has a workaround.

In Xcode go to Product > Scheme > Edit Scheme > Run > Diagnostics (shortcut ⌘ <).
Now disable Thread Performance Checker.
scheme

Changing this setting has stopped the crash for me.

Related
For another iOS 16 crash, this other Unity forum thread mentions random crashes in AR on iOS 16. Here disabling Multi-threaded rendering in the Unity player settings seems to get rid of the crashes.

Error messages
Some text visible in Xcode for Future search engine hits:

~AutoLock [inlined]
Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1115cccb0)

warning: UnityFramework was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb) 
@timbotimbo
Copy link
Collaborator Author

  • Confirmed the same issue & solution for iPadOS 16.1.
  • Setting Run to release mode doesn't seem to crash either.

Looks like this Is also a duplicate of #693.

@alicanyimaz

This comment was marked as off-topic.

@timbotimbo
Copy link
Collaborator Author

This was fixed by Unity.

Fix is available since:
2021.3.17f1
2022.2.2f1
2023.1.0a20

@timbotimbo timbotimbo mentioned this issue May 21, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ios This issue is specific to the iOS/iPadOS Platform.
Projects
None yet
Development

No branches or pull requests

2 participants