App crashes when started from TestFlight and closed again

We see a strange problem with TestFlight.

Our app just works fine, but every time the user closes it (swipes it out), a crash message appears after about 10 seconds. Even if I share the crash report with TestFlight, it only includes a simple JSON file, but no detailed description what happened, so I have no clue what is going on.

The app does not show crash messages if opened from Xcode or from the App Store. Only TestFlight seems to be affected.

If I look at the device logs, I can see this entry:

[application<com.my.app>:1447] failed to terminate gracefully after 10.0s

I did some more tests and noticed that the problem appears less likely when you bring the application to the background first and then - after a while - close it completely. If you do close it directly - by flicking it out of the screen - the error message appears nearly every time. It seems as if some Unity-internal teardown needs longer than 10s in this case.

How was the problem finally solved

How did you solved?

I have the same issue

Nope, unfortunately not. It is pretty annoying.

I learned in the meantime that this problem also affects the production app. In this case, the crash message is not being shown. However, if you try to open the app again before waiting 10 seconds, nothing will happen. Only after this time period, the app will show up again. You only notice this if you close the app and try to open it again immediately.

Have you encountered this problem on the lower version of unity?

I’m on 2019.4.

I’m experiencing the exact same thing on 2018.4.34f1

1 Like

Glad I am not alone. Any chance to raise this to Unity’s attention? It’s pretty annoying that a production app gets delayed on startup just because a previous instance is somehow running in the background. I am using some networking code based on BestHTTP, maybe that’s the reason? Does anybody else use this kind of async code?

I got the same problem with the release app on Testflight with [Unity-2018.4.10f1] but it just crashed when I kill the app in landscape mode, no crash if I kill the app in portrait mode. If I build the app directly into the phone via Xcode, the crash also won’t happen.

Are you sure the crash doesn’t happen? I noticed that it does, but it is not reported (at least if I open the app from the App Store). You can test it easily: Open your app, and close it completely. Then, try to start it again. If this second start takes approx 10 secs (and nothing is happening), then iOS is waiting for the timeout and will let the app crash internally afterwards. Only then it actually starts up.

Just to add some comments, my project does not suffer from this kind of behavior. I’m on 2019.4.15.

I assume this read may help with the issue:

Hi, were you able solve this problem?

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application<com.....>:451] failed to terminate gracefully after 5.0s
ProcessVisibility: Background
ProcessState: Running
WatchdogEvent: process-exit
WatchdogVisibility: Background
WatchdogCPUStatistics: (
"Elapsed total CPU time (seconds): 11.280 (user 11.280, system 0.000), 37% CPU",
"Elapsed application CPU time (seconds): 0.179, 1% CPU"
) reportType:CrashLog maxTerminationResistance:Interactive>

Triggered by Thread:  0

Hi Are you able to solve this issue? I am also facing same issue.

@[waldgeist]( App crashes when started from TestFlight and closed again members/waldgeist.1371619/) seems to be the same one we are having, correct?

Date/Time: 2022-03-15 18:00:45.2775 +0100
Launch Time: 2022-03-15 18:00:38.7179 +0100
OS Version: iPhone OS 15.0.2 (19A404)
Release Type: User
Baseband Version: 4.00.00
Report Version: 104

Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: FRONTBOARD 2343432205
<RBSTerminateContext| domain:10 code:0x8BADF00D explanation:[application:3246]
failed to terminate gracefully after 5.0s
ProcessVisibility: Background
ProcessState: Running
WatchdogEvent: process-exit
WatchdogVisibility: Background
WatchdogCPUStatistics: (
“Elapsed total CPU time (seconds): 9.570 (user 9.570, system 0.000), 31% CPU”,
“Elapsed application CPU time (seconds): 3.687, 12% CPU”
) reportType:CrashLog maxTerminationResistance:Interactive>

same here. Unity 2020.3.41

failed to terminate gracefully after 5.0s

Any fix or any way to investigate this issue? Maybe some long running code in OnDestroy on OnApplicationQuit ?

I am encountering the exact same issue: crash 5s after closing the application. Using Unity 2021.3.2f1 & Xcode 14.1.

Like @waldgeist ,our app is on Testflight and I also noticed that bringing the app to background first, waiting a bit, and then closing it does not result in a crash. Worth noting is that the crash popup only appears for our users on testflight but not on our adhoc dev builds. But crash logs on the device confirm that it occurs for both.

Would really appreciate any help I can get on this.

8742753–1184079–Crash.log.txt (21.6 KB)