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

NullPointerException at me.tatarka.bindingcollectionadapter2.collections.DiffObservableList.size(DiffObservableList.java:184) #190

Open
shanhuiyang opened this issue May 21, 2020 · 2 comments

Comments

@shanhuiyang
Copy link

Issue

05-19 04:41:06.107 4263 4263 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at me.tatarka.bindingcollectionadapter2.collections.DiffObservableList.size(DiffObservableList.java:184)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at me.tatarka.bindingcollectionadapter2.BindingRecyclerViewAdapter.getItemCount(BindingRecyclerViewAdapter.java:249)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:4044)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3849)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.view.View.layout(View.java:19659)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6075)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.view.View.layout(View.java:19659)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6075)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:625)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.view.View.layout(View.java:19659)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.view.ViewGroup.layout(ViewGroup.java:6075)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
05-19 04:41:06.107 4263 4263 E AndroidRuntime: at android.view.View.layout(View.java:19659)

version: 3.2.0

Not sure why the list could be null.

@evant
Copy link
Owner

evant commented May 22, 2020

Thank you for reporting your issue. In order to look into it, can you please provide a sample project and clear steps to reproduce?

@shanhuiyang
Copy link
Author

Cannot provide that, this issue only happened once in my app. @evant
I just would like to try here to see if you can get some clue on this.

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

No branches or pull requests

2 participants