henryblue / TvRecyclerView

A custom RecyclerView for Android TV end
Apache License 2.0
7 stars 4 forks source link

NullPointerException with dispatchKeyEvent #32

Closed droid-wise closed 5 years ago

droid-wise commented 5 years ago

I have got report from Firebase. It says:

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'void app.com.tvrecyclerview.FocusBorderView.dismissDraw()' on a null object reference
app.com.tvrecyclerview.TvRecyclerView.startFocusMoveAnim (TvRecyclerView.java:891)
app.com.tvrecyclerview.TvRecyclerView.scrollToView (TvRecyclerView.java:640)
app.com.tvrecyclerview.TvRecyclerView.processMoves (TvRecyclerView.java:611)
app.com.tvrecyclerview.TvRecyclerView.onKeyDown (TvRecyclerView.java:528)
android.view.KeyEvent.dispatch (KeyEvent.java:2665)
android.view.View.dispatchKeyEvent (View.java:9240)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1635)
app.com.tvrecyclerview.TvRecyclerView.dispatchKeyEvent (TvRecyclerView.java:477)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1640)
com.android.internal.policy.PhoneWindow$DecorView.superDispatchKeyEvent (PhoneWindow.java:2427)
com.android.internal.policy.PhoneWindow.superDispatchKeyEvent (PhoneWindow.java:1728)
android.support.v4.view.KeyEventDispatcher.activitySuperDispatchKeyEventPre28 (KeyEventDispatcher.java:130)
android.support.v4.view.KeyEventDispatcher.dispatchKeyEvent (KeyEventDispatcher.java:87)
android.support.v4.app.SupportActivity.dispatchKeyEvent (ComponentActivity.java:126)
android.support.v7.app.AppCompatActivity.dispatchKeyEvent (AppCompatActivity.java:535)
rs.maketv.orionott.MainActivity.dispatchKeyEvent (MainActivity.java:729)

I should mention that I have my own dispatchKeyEvent in MainActivity and in some cases it returns super.dispatchKeyEvent(event)

henryblue commented 5 years ago

thanks, i have fixed this bug in 1.2.2 version