CheckVersionLib icon indicating copy to clipboard operation
CheckVersionLib copied to clipboard

android.app.RemoteServiceException

Open yaolv7 opened this issue 7 years ago • 1 comments

E: version service destroy I: Thread[3,tid=11608,WaitingInMainSignalCatcherLoop,Thread*=0xe4cc1000,peer=0x13080ba8,"Signal Catcher"]: reacting to signal 3 I: Wrote stack traces to '[tombstoned]' D: Shutting down VM E: FATAL EXCEPTION: main Process: , PID: 11602 android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{db10e64 u0 /com.allenliu.versionchecklib.v2.ui.VersionService} at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1737) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

V2.1.7 安卓9.0上偶现(有时候一天好几次,有时候一天都遇不上),出现原因不明,我自己试了好久也无法复现这个问题

抱歉,帮不到大神,只能猜测可能的原因

  1. VersionService#onDestroy后才执行 VersionService#onReceiveDownloadBuilder
  2. EventBus粘性事件丢失

愚见: 把 startForeground 放到 VersionService#onStartCommand里

如果找到原因,请大神回复告知,非常感谢

yaolv7 avatar Jan 02 '19 09:01 yaolv7

感谢,已经取消了粘性事件

SunOfBeach2 avatar Jan 16 '19 14:01 SunOfBeach2