Crashes in Unity iOS - are they during exit from App?

Hi guys,

I am wondering whether the following crashe we receive from users happen while user shut off the iOS app or whether this crash is a more crucial one:

Crashed: com.apple.main-thread
0  ourAppName                    0x100766ac0 UnityWebStream::Release() (UnityWebStream.cpp:70)
1  ourAppName                    0x1007669f0 CleanupUnityWebStreams(void*) (LinkedList.h:138)
2  ourAppName                    0x100b09fe8 RegisterRuntimeInitializeAndCleanup::ExecuteCleanup() (RegisterRuntimeInitializeAndCleanup.cpp:67)
3  ourAppName                    0x100b66244 RuntimeCleanup() (Player.cpp:589)
4  ourAppName                    0x1000897c4 -[UnityAppController applicationWillTerminate:] (UnityAppController.mm:401)
5  ourAppName                    0x10127c078 -[UIApplication(Swizzling) oneSignalApplicationWillTerminate:] (OneSignal.m:1471)
6  UIKit                          0x1973ae704 -[UIApplication _terminateWithStatus:] + 244
7  UIKit                          0x1975b07cc __102-[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:]_block_invoke.2100 + 792
8  UIKit                          0x1975b3fdc _runAfterCACommitDeferredBlocks + 292
9  UIKit                          0x1975a5d50 _cleanUpAfterCAFlushAndRunDeferredBlocks + 560
10 UIKit                          0x1973150b4 _afterCACommitHandler + 168
11 CoreFoundation                 0x19141a0c0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
12 CoreFoundation                 0x191417cf0 __CFRunLoopDoObservers + 372
13 CoreFoundation                 0x191418180 __CFRunLoopRun + 1024
14 CoreFoundation                 0x1913462b8 CFRunLoopRunSpecific + 444
15 GraphicsServices               0x192dfa198 GSEventRunModal + 180
16 UIKit                          0x19738d7fc -[UIApplication _run] + 684
17 UIKit                          0x197388534 UIApplicationMain + 208
18 ourAppName                    0x100074e6c main (main.mm:32)
19 libdispatch.dylib              0x1903295b8 (Missing)

I believe this bug was resolved in 5.3.6p8. Are you using an earlier version?

5.5.0f3.

I saw that issue. I also sent a bug report to Unity. It’s not clear if it was reopened or it’s a new one.

It’s clear this happen when the App terminates. The thing is I am not sure about the reason for the termination (is it because the user requested it or is it an iOS reason).

Do you have a “quit” option in your game? if not then obviously there’s no termination made by your users.

From what i remember - this looks very similar to the bug that was resolved (we had it in our game and it was fixed after upgrading to 5.3.6p8).

There is no termination by the user from within an iOS app anyways.

I am referring to the task being closed by the users which will also cause “applicationWillTerminate”.

You can always call Application.Quit() which will kill the game.
This looks like the same bug that was resolved - you should ping them to get a response whether this is a regression.

Maybe @Mantas-Puida can comment ?

I can also hit them on the head with a stick perhaps ;)? (I personally don’t regard the Quit() as a viable option in iOS)

Quite possible. I’ve opened a bug for this already. I’ll note them this might be connected to the previous issue.

Thanks for the input!

BTW - i just noticed that we’re still getting similar crashes, even after the upgrade to 5.3.6p8… maybe we should also report it.

Unless something has changed and I missed it, you should not use Application.Quit() on iOS because of Apple’s usability rules.