Commit 55a452e
Ubuntu
fix: reset VulkanUiWatchdog pong before SetFormat to prevent 7s kill
Root cause (confirmed from new logs, build 2026.523.248.0):
The VulkanUiWatchdog fires at 7s (before the native watchdog at 10s).
PR #356 reset the native watchdog via NativeWatchdog.Heartbeat() but
did NOT reset lastPongMonotonicMs — the timestamp checked by the
VulkanUiWatchdog. SetFormat blocks the UI thread for the entire
SurfaceDestroyed→SurfaceCreated→SurfaceChanged cycle. During this
window the Handler pong cannot run. With ANGLE-GC and Veldrid-AsyncPr
threads active (extra GPU/JIT overhead on affected Adreno devices),
the block exceeds 7s, the VulkanUiWatchdog fires, and killProcess()
kills the app before the game ever renders a frame.
Fix:
- Promote lastPongMonotonicMs from a local lambda capture to an
activity field (vulkanWatchdogLastPongMs).
- Reset it via Volatile.Write alongside NativeWatchdog.Heartbeat()
at every SetFormat call site (reactive guard + proactive lambda).
This extends the effective watchdog window from 7s to 7s + (time
since reset), which is always sufficient for SetFormat to complete
and the draw thread to resume normally.1 parent 4fe73b4 commit 55a452e
1 file changed
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
408 | 411 | | |
409 | 412 | | |
410 | 413 | | |
| |||
722 | 725 | | |
723 | 726 | | |
724 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
725 | 735 | | |
726 | 736 | | |
727 | 737 | | |
| |||
909 | 919 | | |
910 | 920 | | |
911 | 921 | | |
912 | | - | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
913 | 929 | | |
914 | 930 | | |
915 | 931 | | |
| |||
1063 | 1079 | | |
1064 | 1080 | | |
1065 | 1081 | | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
1069 | 1085 | | |
1070 | 1086 | | |
1071 | 1087 | | |
| |||
0 commit comments