fix: resolve_process JNI 空指针导致 :remote 进程 SIGABRT#1996
Open
TuTouPower wants to merge 1 commit into
Open
Conversation
在后台管理激进的设备(如魅族)上,:remote 进程被系统杀掉重启后, resolveProcess 回调的 jobject 可能为 null,导致 CallObjectMethod 触发 SIGABRT,进程进入崩溃-重启死循环。 修复: - lib.go: handleResolveProcess 增加 callback nil 检查 - core.cpp: call_tun_interface_resolve_process_impl 增加 nullptr 检查 Closes chen08209#1995
oviron
added a commit
to oviron/FlClash
that referenced
this pull request
May 7, 2026
Backport chen08209#1996 (TuTouPower). Two-layer defence against the ':remote' core process SIGABRT that hits ~2s after VPN start on Android 14+ when the ':remote' subprocess is killed and respawned: Go side does not invoke a nil callback, C++ side does not call JNI methods on a null jobject.
oviron
added a commit
to oviron/FlClash
that referenced
this pull request
May 8, 2026
Backport chen08209#1996 (TuTouPower). Two-layer defence against the ':remote' core process SIGABRT that hits ~2s after VPN start on Android 14+ when the ':remote' subprocess is killed and respawned: Go side does not invoke a nil callback, C++ side does not call JNI methods on a null jobject.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Android 端启动 VPN 代理后,
:remote进程在约 2 秒内以 SIGABRT 崩溃。退出应用重新打开代理同样 2 秒内再次崩溃。VPN 完全无法使用。详细分析见 #1995
崩溃信息
修复内容
两处空指针检查:
core/lib.go—handleResolveProcess增加th.callback == nil检查,避免将空指针传入 CGOandroid/core/src/main/cpp/core.cpp—call_tun_interface_resolve_process_impl增加tun_interface == nullptr检查,避免对空 jobject 调用 JNI 方法测试计划