Skip to content

Commit 6355dae

Browse files
philipphofmannkahestcoolguyzone
authored
fix(apple): Add reasons for watchdog terminations (#11460)
Explain that some crashes might lead to watchdog termination events. Co-authored-by: Karl Heinz Struggl <[email protected]> Co-authored-by: Alex Krawiec <[email protected]>
1 parent 8520d47 commit 6355dae

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/platforms/apple/common/configuration/watchdog-terminations.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ description: "Learn how to turn off Watchdog Termination tracking"
1313

1414
This integration tracks [watchdog terminations](https://developer.apple.com/documentation/xcode/addressing-watchdog-terminations) based on heuristics. This feature is available for iOS, tvOS, and Mac Catalyst, works only if the application was in the foreground, and doesn't track watchdog terminations for unit tests.
1515

16-
When a typical unhandled error occurs, the Apple SDK writes a report to disk with the current state of your application, with details like the stack trace, tags, breadcrumbs, and so on, before the app terminates. When the watchdog terminates your app this happens without further notice, which means the SDK can't write a report to disk. A common reason the watchdog can terminate your app is an Out Of Memory problem. If the app is terminated because it hangs, we don't create a watchdog termination event, but instead an `AppHangs` event is created.
16+
When a typical unhandled error occurs, the Apple SDK writes a report to disk before the app terminates. It includes the current state of your application with details like the stack trace, tags, breadcrumbs, and so on.
17+
18+
The watchdog terminates your app without notice, which means the SDK can't write a report to disk.
19+
A common reason for the watchdog to terminate your app is an Out Of Memory problem.
20+
21+
Note, that there are some security-related types of crashes where the OS immediately terminates the app. These are usually infrequent, and include stack buffer overflows or exceptions with a termination reason related to code signing. Third-party libraries like Sentry can't report these incidents.
22+
23+
Those types of crashes can sometimes be visible in the [Xcode Organizer](https://developer.apple.com/documentation/xcode/acquiring-crash-reports-and-diagnostic-logs), though.
24+
If the app is terminated because it hangs, we won't create a watchdog termination event. An `AppHangs` event will be created instead.
1725

1826
As a result, in the Apple SDK, we track watchdog terminations during the app start based on heuristics, but getting the state of the app when a watchdog termination occurs is challenging. The SDK adds breadcrumbs to watchdog termination events by appending the breadcrumbs to an open file, which should have a marginal impact on your app's performance. Still, it skips adding some frequently changing context to avoid extra I/O, such as free memory, free storage, device orientation, charging status, battery level, etc.
1927

0 commit comments

Comments
 (0)