NullPointerException in BindingViewHelper.java line 181
See original GitHub issueI am using instant search on 2 different screens. Both screens point to the same index but have different facet refinement values and different layout files for the hits item layout. Instant search is working on the home screen which is a fragment but it’s crashing on the other screen which is an activity. If I comment out/remove the home screen code, then the 2nd starts working again. I have attached the log below
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getId()' on a null object reference
at com.algolia.instantsearch.ui.databinding.BindingHelper.getFullAttribute(BindingHelper.java:181)
at com.algolia.instantsearch.ui.views.Hits$HitsAdapter.onBindViewHolder(Hits.java:473)
at com.algolia.instantsearch.ui.views.Hits$HitsAdapter.onBindViewHolder(Hits.java:409)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:6673)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6714)
at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5647)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5913)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5748)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2232)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1559)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3529)
at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1737)
at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:4928)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:655)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Please let me know if you need more details.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
java - What is a NullPointerException, and how do I fix it?
The first line declares a variable named num , but it does not actually contain a reference value yet. Since you have not...
Read more >How to Fix and Avoid NullPointerException in Java - Rollbar
NullPointerException in Java occurs when a variable is accessed which is not pointing to any object and refers to nothing or null.
Read more >A null pointer exception occurs when attempting to log ... - IBM
A null pointer exception occurs when attempting to log into the Process Portal, ... ServletWrapper.service(ServletWrapper.java:1230)
Read more >Java.lang.NullPointerException - CatalogJS - Warning Message
Symptoms. The following warning message appears under System Log > Warnings after a London Patch 6 upgrade: · Cause. The wish list feature...
Read more >NullPointerException thrown at PreDecorationFilter.java:181
In PreDecorationFilter , this.dispatcherServletPath is null on line 181, and that values comes from this.server.getServlet().getContextPath() in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @PLNech, Sorry for the delayed response.
Variants did seem to fix my issue. Thanks for pointing it out. One small feedback; in my opinion the document could be better structured to cover all of the features of InstantSearch instead of the bare minimum ones, required to get started.
This would really help people in situations like these because honestly I spent way too much time scavenging the internet on how to fix the problem before deciding on opening an issue here 😅
Your feedback is on point, we know of some shortcomings in our documentation and are working on a new structure and more guides to cover various use-cases.
This being said, your thoughts could be very useful to help us improve our docs!