TonnyL / PaperPlane

📚 PaperPlane - An Android reading app, including articles from Zhihu Daily, Guokr Handpick and Douban Moment.
Apache License 2.0
1.14k stars 277 forks source link

Force stop occurs in certain situation #20

Closed kcschan closed 7 years ago

kcschan commented 7 years ago

How to reproduce 1:Open the app once, then return to the launcher. 2:Do anything you like without killing(Force Close) the app's process 3:After some time(don't know how much exactly), maybe hours or a day, relaunch the app and probably need open an article, the app will then be crashed several seconds after. 4:Relaunch the app again, it will work fine.

Related logcat when the crash occured:

It seems to be related to the CacheService.

08-14 09:29:25.529 3425-3655/? I/ActivityManager: Displayed com.marktony.zhihudaily/.details.DetailsActivity: +1s548ms 08-14 09:29:25.548 2015-2191/? E/AndroidRuntime: FATAL EXCEPTION: Thread-37 Process: com.marktony.zhihudaily, PID: 2015 java.lang.NullPointerException: Attempt to invoke virtual method 'int com.marktony.zhihudaily.b.q.i()' on a null object reference at com.marktony.zhihudaily.database.b.j$2.a(Unknown Source:1) at com.marktony.zhihudaily.database.b.j$2.a(Unknown Source:2) at android.a.b.b.b.a(Unknown Source:4) at com.marktony.zhihudaily.database.b.j.b(Unknown Source:7) at com.marktony.zhihudaily.service.CacheService.a(Unknown Source:83) at com.marktony.zhihudaily.service.e.run(Unknown Source:4) at java.lang.Thread.run(Thread.java:764) 08-14 09:29:25.559 3425-6845/? W/ActivityManager: Force finishing activity com.marktony.zhihudaily/.details.DetailsActivity 08-14 09:29:25.562 3425-6845/? W/ActivityManager: Force finishing activity com.marktony.zhihudaily/.ui.MainActivity 08-14 09:29:25.574 3425-3631/? I/ActivityManager: Showing crash dialog for package com.marktony.zhihudaily u0 08-14 09:29:25.623 3425-6590/? I/OpenGLRenderer: Initialized EGL, version 1.4 08-14 09:29:25.623 3425-6590/? D/OpenGLRenderer: Swap behavior 2 08-14 09:29:25.671 3425-3628/? W/BroadcastQueue: Skipping deliver [background] BroadcastRecord{f93ab1a u-1 android.net.conn.CONNECTIVITY_CHANGE} to ReceiverList{9ebc43c 2015 com.marktony.zhihudaily/10107/u0 remote:afb262f}: process gone or crashing 08-14 09:29:25.751 3425-8587/? D/ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=283, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@6cee828) 08-14 09:29:25.752 3425-15271/? D/ConnectivityService: ConnectivityService NetworkRequestInfo binderDied(NetworkRequest [ LISTEN id=284, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ], android.os.BinderProxy@7c53941) 08-14 09:29:25.752 3425-15279/? I/ActivityManager: Process com.marktony.zhihudaily (pid 2015) has died: vis +99TOP 08-14 09:29:25.752 3425-15834/? I/WindowManager: WIN DEATH: Window{9764075 u0 com.marktony.zhihudaily/com.marktony.zhihudaily.details.DetailsActivity} 08-14 09:29:25.752 3425-4026/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=283, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ] 08-14 09:29:25.752 3425-15279/? W/ActivityManager: Scheduling restart of crashed service com.marktony.zhihudaily/.service.CacheService in 19280ms 08-14 09:29:25.753 3425-4026/? E/ConnectivityService: RemoteException caught trying to send a callback msg for NetworkRequest [ LISTEN id=284, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&FOREGROUND] ] 08-14 09:29:25.756 3425-3912/? W/InputDispatcher: channel '3db5433 com.marktony.zhihudaily/com.marktony.zhihudaily.ui.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 08-14 09:29:25.756 3425-3912/? E/InputDispatcher: channel '3db5433 com.marktony.zhihudaily/com.marktony.zhihudaily.ui.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 08-14 09:29:25.756 3425-4851/? I/WindowManager: WIN DEATH: Window{3db5433 u0 com.marktony.zhihudaily/com.marktony.zhihudaily.ui.MainActivity}

TonnyL commented 7 years ago

Hi, @kcschan YES, it is a bug. But it won't be fixed anymore. If you are using PaperPlane and the bug troubles you a lot, I suggest you use the official app instead. If you are an Android developer, you could fix it by yourself. It's ok if you create a pr or not. Sorry for that again.

kcschan commented 7 years ago

Seems it's solely my misunderstanding here:

https://github.com/TonnyL/PaperPlane/issues/15

Code issues and PRs are welcomed, but you know, apk will not be upgraded and published anymore