编舞的NullPointerException [英] Choreographer NullPointerException
问题描述
我一直工作在现有的codeBase的一段时间,从浏览我们的崩溃日志服务,我已经注意到,经常发生pretty异常,我无法重现这个问题,也没有我对场景的背景下,试图挖,因为这是一个pretty大的项目已经越来越难找到出这个异常的原因。
I've been working on an existing codebase for a while and from browsing our crash log service I've noticed an exception that happens pretty frequently, I am not able to reproduce this issue, nor do I have the context for the scenario to try and dig in, as this is a pretty big project it has become increasingly hard to find out the cause of this exception.
我一直在网上寻找类似的问题,但没有找到任何有用的信息。
如果任何人都熟悉这个问题,你的帮助会很大AP preciated。
I have been searching online for similar issues and couldn't find any useful information. If anyone is familiar with this issue, your help would be greatly appreciated.
堆栈跟踪如下:
java.lang.NullPointerException
at android.animation.PropertyValuesHolder.setupSetterAndGetter(PropertyValuesHolder.java:505)
at android.animation.ObjectAnimator.initAnimation(ObjectAnimator.java:487)
at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:517)
at android.animation.ValueAnimator.start(ValueAnimator.java:936)
at android.animation.ValueAnimator.start(ValueAnimator.java:946)
at android.animation.ObjectAnimator.start(ObjectAnimator.java:465)
at android.animation.AnimatorSet$1.onAnimationEnd(AnimatorSet.java:579)
at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1056)
at android.animation.ValueAnimator.access$400(ValueAnimator.java:50)
at android.animation.ValueAnimator$AnimationHandler.doAnimationFrame(ValueAnimator.java:644)
at android.animation.ValueAnimator$AnimationHandler.run(ValueAnimator.java:660)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:543)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5105)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
at dalvik.system.NativeStart.main(NativeStart.java)
干杯。
推荐答案
这个问题竟然是被调用的动画处理程序
使用 postDelayed()
,最终导致在试图动画空查看
引用,因为它不是根据它的主机生命周期事件妥善清除。
The issue turned out to be an animation being invoked from a Handler
using postDelayed()
, which eventually resulted in attempting to animate a null View
reference, since it wasn't cleared properly according to it's host lifecycle events.
这篇关于编舞的NullPointerException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!