iOS 16 crashing upon Pause and Resume #702
Labels
bug
This issue refers to a bug in the plugin
ios
This issue is specific to the iOS/iPadOS Platform.
more info wanted
This issue means we need more info to help
Currently, within my onUnityCreated callback, I'm calling controller.pause(), then controller.resume() to ensure Unity is ready to go (not doing this prevents messages from passing properly to Unity).
Up until iOS 16, this was working properly. But, now the call to Pause crashes the app. I've included the stack trace from Xcode below.
I've tried both stable and master channels of Flutter, as well as 2020.3.25f1 and 2021.3.11f1 versions of Unity - with no difference.
--
Hardware Model: iPhone15,2
Process: Runner [2646]
Path: /private/var/containers/Bundle/Application/13B32700-8961-4EEE-8AA3-2C6979ED7EB6/Runner.app/Runner
Identifier: com.Saganworks.SaganworksTest
Version: 1.34 (1)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.Saganworks.SaganworksTest [1052]
Date/Time: 2022-10-18 13:14:29.7559 -0400
Launch Time: 2022-10-18 13:14:28.8858 -0400
OS Version: iPhone OS 16.1 (20B5072b)
Release Type: Beta
Baseband Version: 1.13.02
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000000005d
Exception Codes: 0x0000000000000001, 0x000000000000005d
VM Region Info: 0x5d is not in any region. Bytes before following region: 68719476643
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
commpage (reserved) 1000000000-7000000000 [384.0G] ---/--- SM=NUL ...(unallocated)
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler [2646]
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 UnityFramework 0x101d581a0 AudioManager::SetApplicationPause(bool) + 0
1 UnityFramework 0x101b37f48 SetPlayerPause(PlayerPause, bool) + 184
2 UnityFramework 0x10206d728 UnityPause + 140
3 flutter_unity_widget 0x1083ee850 FLTUnityWidgetController.methodHandler(_:result:) + 1700
4 flutter_unity_widget 0x1083f0d54 partial apply for implicit closure #2 in implicit closure #1 in FLTUnityWidgetController.init(frame:viewIdentifier:arguments:registrar:) + 20
5 flutter_unity_widget 0x1083f0d98 partial apply for thunk for @escaping @callee_guaranteed (@guaranteed FlutterMethodCall, @unowned @callee_guaranteed (@in_guaranteed Any?) -> ()) -> () + 20
6 flutter_unity_widget 0x1083ee0a4 thunk for @escaping @callee_guaranteed (@guaranteed FlutterMethodCall, @guaranteed @escaping @callee_guaranteed (@in_guaranteed Any?) -> ()) -> () + 108
7 Flutter 0x108a4c9e4 0x1084d4000 + 5736932
8 Flutter 0x10851968c 0x1084d4000 + 284300
9 libdispatch.dylib 0x19a3f04b4 _dispatch_call_block_and_release + 32
10 libdispatch.dylib 0x19a3f1fdc _dispatch_client_callout + 20
11 libdispatch.dylib 0x19a4007f4 _dispatch_main_queue_drain + 928
12 libdispatch.dylib 0x19a400444 _dispatch_main_queue_callback_4CF + 44
13 CoreFoundation 0x192eae6f8 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
14 CoreFoundation 0x192e90058 __CFRunLoopRun + 2036
15 CoreFoundation 0x192e94ed4 CFRunLoopRunSpecific + 612
16 GraphicsServices 0x1cc0ca368 GSEventRunModal + 164
17 UIKitCore 0x195379028 -[UIApplication _run] + 888
18 UIKitCore 0x195378c8c UIApplicationMain + 340
19 Runner 0x10066c9e4 main + 64
20 dyld 0x1b14a5960 start + 2528
The text was updated successfully, but these errors were encountered: