getsentry / getsentry/sentry-java
Capture Android 17 MemoryLimiter process kills
- 主要语言
- Kotlin
- 星标
- 1.4k
- 派生
- 478
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 67
描述
### Problem Statement
Android 17 (API 37) enforces per-app memory limits based on the device's total RAM. When an app exceeds its limit, the system terminates the process.
This is not a `java.lang.OutOfMemoryError`. No exception is thrown, no signal is raised, and no stack trace is produced — the process simply disappears. Neither `UncaughtExceptionHandlerIntegration` nor the NDK handler sees anything, so the SDK reports nothing at all.
### Solution Brainstorm
AnrV2Integration already polls ActivityManager#getHistoricalProcessExitReasons() at startup and discards everything that isn't REASON_ANR. Memory-limiter kills show up in that same list as REASON_OTHER with getDescription() containing "MemoryLimiter:AnonSwap"
So using that same mechanism doesn't sound too challenging.
贡献指南
评估
这个 Issue 还没有评估数据。