TonicArtos / SuperSLiM

A layout manager for the RecyclerView with interchangeable linear, grid, and staggered displays of views, all with configurable section headers including the sticky variety as specified in the material design docs.
http://tonicartos.nz
2.12k stars 297 forks source link

NullPointerException: RecyclerView$LayoutManager.getPosition(RecyclerView.java) #146

Closed avitricks closed 7 years ago

avitricks commented 8 years ago

I'm using the latest 0.4.13 release. This is happening for some of our users, and we are unable to reproduce it. The crashes are coming from all Android versions. The most frequents are 4.1.2, 4.2.2, 4.4.4, 5.0, 5.0.1 and 5.1.1. It occurs once for every 100 users.

The similar kind of issue #62 has been already been fixed and merged into the latest code. I looked into the issue and couldn't help myself. Anyone else facing the same issue?

Here's the trace report:

Fatal Exception: java.lang.NullPointerException at android.support.v7.widget.RecyclerView$LayoutManager.getPosition(RecyclerView.java) at android.support.v7.widget.LinearLayoutManager.updateLayoutState(LinearLayoutManager.java) at android.support.v7.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java) at android.support.v7.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java) at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java) at android.view.Choreographer$CallbackRecord.run(Choreographer.java) at android.view.Choreographer.doCallbacks(Choreographer.java) at android.view.Choreographer.doFrame(Choreographer.java) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java) at android.os.Handler.handleCallback(Handler.java) at android.os.Handler.dispatchMessage(Handler.java) at android.os.Looper.loop(Looper.java) at android.app.ActivityThread.main(ActivityThread.java) at java.lang.reflect.Method.invokeNative(Method.java) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java) at dalvik.system.NativeStart.main(NativeStart.java)

DennyWeinberg commented 8 years ago

Same problem here. How can i fix this? I am using 0.5.0-SNAPSHOT.

--> Finally i switched back to 0.4.13