fix: pause app hang detection when going on the background - #1506
fix: pause app hang detection when going on the background#1506bitsandfoxes wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1e1ac54. Configure here.
| OnWillEnterBackgroundDelegateHandle = FCoreDelegates::ApplicationWillEnterBackgroundDelegate.AddLambda([this]() | ||
| { | ||
| bAppIsForeground.AtomicSet(false); | ||
| PauseAppHangTracking(); |
There was a problem hiding this comment.
Android pause silently never applies
High Severity
On Android, backgrounding stops heartbeats via bAppIsActive/bAppIsForeground while PauseAppHangTracking only runs if dlsym finds sentry_app_hang_pause. The bundled Java SDK NDK is still native 0.16.0, so that symbol is missing, pause is a silent no-op, and the watchdog stays armed without heartbeats—so false app-hang events can still fire (or start firing if frames continue in the background).
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 1e1ac54. Configure here.
There was a problem hiding this comment.
Fair. We would need to wait for a sentry-java release. Or bump it's dependency.


Relies on getsentry/sentry-native#1928
To prevent false positives like reporting an app hang event because the game went on the background.