You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
accessibility.rs: pending Java exceptions are not cleared #40
Priority: P2 (robustness). Code audit of gpui-mobile src/android/accessibility.rs (fork main 4dd00ad, upstream PR longbridge/gpui-mobile#25).
It calls Java through accesskit_android's jni 0.21 API (call_method for isEnabled, getContext, getSystemService, getWindow, getDecorView, findViewById; new_string; new_global_ref). On a Java exception these return Err and leave the exception pending; nothing clears it, so the next JNI call on the render thread (shared with the jni 0.22 code, which clears through or_clear) runs with an exception pending, which is undefined behaviour and aborts under CheckJNI.
Delegate set off the UI thread: checked, InjectingAdapter::new already posts setAccessibilityDelegate to the UI thread; only the read-only lookups run on the render thread.
changed the title [-]accessibility.rs: pending Java exceptions not cleared; delegate set off the UI thread[/-][+]accessibility.rs: pending Java exceptions are not cleared[/+]on Oct 9, 2026
Fixed in gpui-mobile android-a11y-clear-exceptions (#43): pending exceptions are described and cleared after the host-view lookups, isEnabled and each tree update. Code fix only; no throwing case was reproduced on the device. TalkBack still works on the build.
Activity
[-]accessibility.rs: pending Java exceptions not cleared; delegate set off the UI thread[/-][+]accessibility.rs: pending Java exceptions are not cleared[/+]Bombatomica64 commentedon Oct 9, 2026
Fixed in gpui-mobile
android-a11y-clear-exceptions(#43): pending exceptions are described and cleared after the host-view lookups,isEnabledand each tree update. Code fix only; no throwing case was reproduced on the device. TalkBack still works on the build.