Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kill the process from the background, from the new entry NullPointerException error #53

Open
silence17 opened this issue Jun 26, 2018 · 1 comment

Comments

@silence17
Copy link

签名打包安装进入应用,从后台杀掉应用。从新进入就报NullPointerException error。cookie反序列化的时候失败,导致cookie为空。我打印了日志貌似从sp中获取到的字符串,就不是正常的cookie序列化后的字符串。烦请有知道原因的帮忙解决一下。多谢

06-26 10:08:00.289 18000-18000/? E/HuiMai.go: crash result ==java.lang.ExceptionInInitializerError
at cn.hhealth.shop.net.k.(Novate.java:104)
at cn.hhealth.shop.net.c.(BaseRequest.java:24)
at cn.hhealth.shop.d.l.(CommonRequest.java:27)
at cn.hhealth.shop.service.SettingService.onCreate(SettingService.java:54)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2990)
at android.app.ActivityThread.access$1900(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5542)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:962)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String okhttp3.Cookie.name()' on a null object reference
at cn.hhealth.shop.net.a.e.hashCode(IdentifiableCookie.java:57)
at java.util.Collections.secondaryHash(Collections.java:3405)
at java.util.HashMap.remove(HashMap.java:616)
at java.util.HashSet.remove(HashSet.java:173)
at java.util.Collections$SynchronizedCollection.remove(Collections.java:422)
at cn.hhealth.shop.net.a.c.a(CookieCacheImpl.java:36)
at cn.hhealth.shop.net.a.f.(NovateCookieManager.java:28)
at cn.hhealth.shop.net.s.a(RetrofitBuilder.java:85)
at cn.hhealth.shop.net.s.(RetrofitBuilder.java:51)
at cn.hhealth.shop.net.s.(RetrofitBuilder.java:39)
at cn.hhealth.shop.net.k.(Novate.java:104) 
at cn.hhealth.shop.net.c.(BaseRequest.java:24) 
at cn.hhealth.shop.d.l.(CommonRequest.java:27) 
at cn.hhealth.shop.service.SettingService.onCreate(SettingService.java:54) 
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2990) 
at android.app.ActivityThread.access$1900(ActivityThread.java:162) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5542) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:962) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757) 
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String okhttp3.Cookie.name()' on a null object reference
at cn.hhealth.shop.net.a.e.hashCode(IdentifiableCookie.java:57)
at java.util.Collections.secondaryHash(Collections.java:3405)
at java.util.HashMap.remove(HashMap.java:616)
at java.util.HashSet.remove(HashSet.java:173)
at java.util.Collections$SynchronizedCollection.remove(Collections.java:422)
at cn.hhealth.shop.net.a.c.a(CookieCacheImpl.java:36)
at cn.hhealth.shop.net.a.f.(NovateCookieManager.java:28)
at cn.hhealth.shop.net.s.a(RetrofitBuilder.java:85)
at cn.hhealth.shop.net.s.(RetrofitBuilder.java:51)
at cn.hhealth.shop.net.s.(RetrofitBuilder.java:39)
at cn.hhealth.shop.net.k.(Novate.java:104)
at cn.hhealth.shop.net.c.(BaseRequest.java:24)
at cn.hhealth.shop.d.l.(CommonRequest.java:27)
at cn.hhealth.shop.service.SettingService.onCreate(SettingService.java:54)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2990)
at android.app.ActivityThread.access$1900(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1541)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:

@ProfessionalMe
Copy link

解决了嘛,我也遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants