Gio's GioView.onDestroyView sends ViewEvent{View: 0} as its detach signal when the view is destroyed - i.e. the activity going away on a recents-wipe. handleEvent passed that zero straight through to InitPgp/registerFragment, whose GetObjectClass(null) aborts the process:
A fatal error has been detected by the Java Runtime Environment:
Internal Error (cgo/go.go:942), pid=27286, tid=0x0000b40562753b00
Detected error: JNI DETECTED ERROR IN APPLICATION: java_object == null
in call to GetObjectClass
from void registerFragment(_jobject*)
Reproduced on a Pixel 9 Pro (Android 17) with the equivalent app (pad): swiping the app away in recents crashes it. The pinned gio versions (2020-08) send the same empty ViewEvent{View: 0} from Java_org_gioui_GioView_onDestroyView.
Guard on both sides:
cmd/passgo-gui: handleEvent ignores the View == 0 detach signal (a re-attach arrives as a fresh event with a live view).
InitPgp returns early on a zero view, so callers that forward the event unfiltered are covered.
registerFragment null-checks as defense in depth.
Same fix as pad (gmp/pad@fdbffc9), verified there on-device: recents swipe closes cleanly, no tombstone.
Gio's `GioView.onDestroyView` sends `ViewEvent{View: 0}` as its detach signal when the view is destroyed - i.e. the activity going away on a recents-wipe. `handleEvent` passed that zero straight through to `InitPgp`/`registerFragment`, whose `GetObjectClass(null)` aborts the process:
A fatal error has been detected by the Java Runtime Environment:
Internal Error (cgo/go.go:942), pid=27286, tid=0x0000b40562753b00
Detected error: JNI DETECTED ERROR IN APPLICATION: java_object == null
in call to GetObjectClass
from void registerFragment(_jobject*)
Reproduced on a Pixel 9 Pro (Android 17) with the equivalent app (pad): swiping the app away in recents crashes it. The pinned gio versions (2020-08) send the same empty `ViewEvent{View: 0}` from `Java_org_gioui_GioView_onDestroyView`.
Guard on both sides:
- `cmd/passgo-gui`: `handleEvent` ignores the `View == 0` detach signal (a re-attach arrives as a fresh event with a live view).
- `InitPgp` returns early on a zero view, so callers that forward the event unfiltered are covered.
- `registerFragment` null-checks as defense in depth.
Same fix as pad (gmp/pad@fdbffc9), verified there on-device: recents swipe closes cleanly, no tombstone.
Gio's GioView.onDestroyView sends ViewEvent{View: 0} as its detach
signal when the view is destroyed — i.e. the activity going away on a
recents-wipe. handleEvent passed that zero straight through to
InitPgp/registerFragment, whose GetObjectClass(null) aborts the process
(JNI DETECTED ERROR: java_object == null in call to GetObjectClass).
Guard on both sides: handleEvent ignores the View == 0 detach signal
(a re-attach arrives as a fresh event with a live view), InitPgp
returns early on a zero view so unfiltered callers are covered, and
registerFragment null-checks as defense in depth. Same fix as pad
(fdbffc9); verified there on a Pixel 9 Pro / Android 17 where the
recents swipe used to crash the app.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Gio's
GioView.onDestroyViewsendsViewEvent{View: 0}as its detach signal when the view is destroyed - i.e. the activity going away on a recents-wipe.handleEventpassed that zero straight through toInitPgp/registerFragment, whoseGetObjectClass(null)aborts the process:Reproduced on a Pixel 9 Pro (Android 17) with the equivalent app (pad): swiping the app away in recents crashes it. The pinned gio versions (2020-08) send the same empty
ViewEvent{View: 0}fromJava_org_gioui_GioView_onDestroyView.Guard on both sides:
cmd/passgo-gui:handleEventignores theView == 0detach signal (a re-attach arrives as a fresh event with a live view).InitPgpreturns early on a zero view, so callers that forward the event unfiltered are covered.registerFragmentnull-checks as defense in depth.Same fix as pad (gmp/pad@fdbffc9), verified there on-device: recents swipe closes cleanly, no tombstone.
Gio's GioView.onDestroyView sends ViewEvent{View: 0} as its detach signal when the view is destroyed — i.e. the activity going away on a recents-wipe. handleEvent passed that zero straight through to InitPgp/registerFragment, whose GetObjectClass(null) aborts the process (JNI DETECTED ERROR: java_object == null in call to GetObjectClass). Guard on both sides: handleEvent ignores the View == 0 detach signal (a re-attach arrives as a fresh event with a live view), InitPgp returns early on a zero view so unfiltered callers are covered, and registerFragment null-checks as defense in depth. Same fix as pad (fdbffc9); verified there on a Pixel 9 Pro / Android 17 where the recents swipe used to crash the app.Pull request closed