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

点击意见反馈后,程序崩溃 #75

Closed
jasonsyf opened this issue Apr 11, 2017 · 2 comments
Closed

点击意见反馈后,程序崩溃 #75

jasonsyf opened this issue Apr 11, 2017 · 2 comments

Comments

@jasonsyf
Copy link

log如下:
04-11 12:01:11.632 21572-21572/com.codeest.geeknews E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.codeest.geeknews, PID: 21572
java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:111)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5648)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:845)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:735)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v4.widget.SwipeRefreshLayout.isRefreshing()' on a null object reference
at com.codeest.geeknews.ui.zhihu.fragment.ThemeFragment.showError(ThemeFragment.java:86)
at com.codeest.geeknews.widget.CommonSubscriber.onError(CommonSubscriber.java:45)
at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.checkTerminated(FlowableObserveOn.java:207)
at io.reactivex.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:392)
at io.reactivex.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:109)
at android.os.Handler.handleCallback(Handler.java:739) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5648) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:845) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:735) 

@jp1017
Copy link

jp1017 commented Apr 11, 2017

android.support.v4.widget.SwipeRefreshLayout.isRefreshing()' on a null object reference

wtf, 空指针了 😄

@codeestX
Copy link
Owner

@jasonsyf Hi,看log应该不是意见反馈引起的问题,刚提交了一版调整了BaseFragment里面ButterKnife.unbind()unSubscribe的顺序,先取消订阅再销毁View防止异步可能引发的这种问题,感谢反馈

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

3 participants