MatsuriDayo / NekoBoxForAndroid

NekoBox for Android / sing-box / universal proxy toolchain for Android
https://matsuridayo.github.io/
Other
10.69k stars 902 forks source link

BUG: Nekobox crashes when phone goes to idle mode #706

Open anyuta1166 opened 2 months ago

anyuta1166 commented 2 months ago

Describe the problem

Expected behavior:

Nekobox shouldn't crash

Actual behavior:

Nekobox crashes when phone goes to idle mode

How to reproduce

Xiaomi Redmi 9, MIUI 13, Android 12

Nekobox for Android 1.3.1

Using a VLESS profile.

How to reproduce: activate VPN and leave the phone for a while.

log

07-01 01:57:23.383 D/LocationPolicy( 1580): DeviceIdleMode changed to true
07-01 01:57:23.384 V/whetstone.activity( 1580): DeviceIdleMode changed to true
07-01 01:57:23.385 D/DaemonSensorPolicy( 1580): Device idle changed, mDeviceIdle: false
--------- beginning of crash
07-01 01:57:23.401 F/libc    ( 3791): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 3791 (moe.nb4a:bg), pid 3791 (moe.nb4a:bg)
07-01 01:57:24.596 F/DEBUG   (10561): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-01 01:57:24.596 F/DEBUG   (10561): Build fingerprint: 'Redmi/galahad_global/galahad:12/SP1A.210812.016/V13.0.4.0.SJCMIXM:user/release-keys'
07-01 01:57:24.596 F/DEBUG   (10561): Revision: '0'
07-01 01:57:24.596 F/DEBUG   (10561): ABI: 'arm64'
07-01 01:57:24.596 F/DEBUG   (10561): Timestamp: 2024-07-01 01:57:23.556308752+0300
07-01 01:57:24.596 F/DEBUG   (10561): Process uptime: 0s
07-01 01:57:24.596 F/DEBUG   (10561): Cmdline: moe.nb4a:bg
07-01 01:57:24.596 F/DEBUG   (10561): pid: 3791, tid: 3791, name: moe.nb4a:bg  >>> moe.nb4a:bg <<<
07-01 01:57:24.596 F/DEBUG   (10561): uid: 10255
07-01 01:57:24.596 F/DEBUG   (10561): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-01 01:57:24.596 F/DEBUG   (10561):     x0  0000000000000000  x1  0000000000000ecf  x2  0000000000000006  x3  0000000000000008
07-01 01:57:24.597 F/DEBUG   (10561):     x4  0000000000000001  x5  0000007ffd5ff328  x6  0000000000000000  x7  0000000000000000
07-01 01:57:24.597 F/DEBUG   (10561):     x8  0000000000000083  x9  000000000000ca57  x10 000000000000000e  x11 000000723c05ba97
07-01 01:57:24.597 F/DEBUG   (10561):     x12 0000000000000002  x13 000000723b3bda68  x14 00000000000000be  x15 00000000000000bf
07-01 01:57:24.597 F/DEBUG   (10561):     x16 0000007ffd508850  x17 0000007ffd5fefb0  x18 000000736651e000  x19 0000000000000ecf
07-01 01:57:24.597 F/DEBUG   (10561):     x20 0000007ffd5fee50  x21 000000400006e008  x22 0000007243461fea  x23 000000000000106e
07-01 01:57:24.597 F/DEBUG   (10561):     x24 00000072ba400880  x25 0000007ffd5ff670  x26 0000000000000000  x27 0000000000000010
07-01 01:57:24.597 F/DEBUG   (10561):     x28 0000004000002700  x29 000000400007dc28
07-01 01:57:24.597 F/DEBUG   (10561):     lr  000000723b4a5ac4  sp  000000400007dc30  pc  000000723b4c4ea8  pst 0000000080000000
07-01 01:57:24.597 F/DEBUG   (10561): backtrace:
07-01 01:57:24.597 F/DEBUG   (10561):       #00 pc 00000000004acea8  /data/app/~~06yInk9g698hQsEzcZWJ0w==/moe.nb4a-OktiDIU_LKdplksG5xXT0w==/lib/arm64/libgojni.so
07-01 01:57:25.668 W/ActivityManager( 1580): Exception when unbinding service moe.nb4a/io.nekohasekai.sagernet.bg.VpnService
07-01 01:57:25.668 W/ActivityManager( 1580): android.os.DeadObjectException
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.os.BinderProxy.transactNative(Native Method)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.os.BinderProxy.transact(BinderProxy.java:629)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.app.IApplicationThread$Stub$Proxy.scheduleUnbindService(IApplicationThread.java:1891)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.am.ActiveServices.removeConnectionLocked(ActiveServices.java:4513)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.am.ActiveServices.unbindServiceLocked(ActiveServices.java:3019)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.am.ActivityManagerService.unbindService(ActivityManagerService.java:12500)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.app.ContextImpl.unbindService(ContextImpl.java:2034)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.connectivity.Vpn$2.interfaceRemoved(Vpn.java:1787)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.NetworkManagementService.lambda$notifyInterfaceRemoved$3(NetworkManagementService.java:360)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.NetworkManagementService$$ExternalSyntheticLambda4.sendCallback(Unknown Source:2)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.NetworkManagementService.invokeForAllObservers(NetworkManagementService.java:321)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.NetworkManagementService.notifyInterfaceRemoved(NetworkManagementService.java:360)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.NetworkManagementService.access$700(NetworkManagementService.java:113)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.NetworkManagementService$NetdUnsolicitedEventListener.lambda$onInterfaceRemoved$6$NetworkManagementService$NetdUnsolicitedEventListener(NetworkManagementService.java:632)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.NetworkManagementService$NetdUnsolicitedEventListener$$ExternalSyntheticLambda2.run(Unknown Source:4)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.os.Handler.handleCallback(Handler.java:938)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.os.Looper.loopOnce(Looper.java:210)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.os.Looper.loop(Looper.java:299)
07-01 01:57:25.668 W/ActivityManager( 1580):    at android.os.HandlerThread.run(HandlerThread.java:67)
07-01 01:57:25.668 W/ActivityManager( 1580):    at com.android.server.ServiceThread.run(ServiceThread.java:46)
07-01 01:57:25.695 I/ActivityManager( 1580): Process moe.nb4a:bg (pid 3791) has died: prcp FGS 

If you have logs, please upload them. Please see the detailed steps for exporting logs in the documentation.

FrzMtrsprt commented 1 month ago

Same issue here.

Youxikong commented 1 month ago

Same issue #697 .