PercentageChartView icon indicating copy to clipboard operation
PercentageChartView copied to clipboard

Crash when destroying view.

Open joeShuff opened this issue 5 years ago • 1 comments

This happened when I removed an item from a recyclerview containing a PercentageChartView

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.ramijemli.percentagechartview.renderer.BaseModeRenderer.destroy()' on a null object reference at com.ramijemli.percentagechartview.PercentageChartView.onDetachedFromWindow(PercentageChartView.java:175) at android.view.View.dispatchDetachedFromWindow(View.java:18543) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3773) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3773) at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5363) at android.view.ViewGroup.removeViewAt(ViewGroup.java:5310) at androidx.recyclerview.widget.RecyclerView$5.removeViewAt(RecyclerView.java:896) at androidx.recyclerview.widget.ChildHelper.removeViewIfHidden(ChildHelper.java:386) at androidx.recyclerview.widget.RecyclerView.removeAnimatingView(RecyclerView.java:1466) at androidx.recyclerview.widget.RecyclerView$ItemAnimatorRestoreListener.onAnimationFinished(RecyclerView.java:12671) at androidx.recyclerview.widget.RecyclerView$ItemAnimator.dispatchAnimationFinished(RecyclerView.java:13171) at androidx.recyclerview.widget.SimpleItemAnimator.dispatchRemoveFinished(SimpleItemAnimator.java:277) at androidx.recyclerview.widget.DefaultItemAnimator$4.onAnimationEnd(DefaultItemAnimator.java:213) at android.view.ViewPropertyAnimator$AnimatorEventListener.onAnimationEnd(ViewPropertyAnimator.java:1122) at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:552) at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1232) at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1474) at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146) at android.animation.AnimationHandler.access$100(AnimationHandler.java:37) at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1170) at android.view.Choreographer.doCallbacks(Choreographer.java:984) at android.view.Choreographer.doFrame(Choreographer.java:806) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1158) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6898) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

joeShuff avatar Sep 30 '19 14:09 joeShuff

Crash on Android 9, API 28. Oneplus 6T.

joeShuff avatar Oct 01 '19 08:10 joeShuff