[ERROR] TiApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.appcelerator.titanium.proxy.TiViewProxy.handlePendingAnimation(boolean)' on a null object reference
[ERROR] TiApplication: at org.appcelerator.titanium.view.TiUIView$1$1.callAsync(TiUIView.java:549)
[ERROR] TiApplication: at org.appcelerator.titanium.util.TiAnimationBuilder$AnimatorListener.onAnimationEnd(TiAnimationBuilder.java:1371)
[ERROR] TiApplication: at com.nineoldandroids.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd(AnimatorSet.java:756)
[ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator.endAnimation(ValueAnimator.java:1034)
[ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator.access$11(ValueAnimator.java:1024)
[ERROR] TiApplication: at com.nineoldandroids.animation.ValueAnimator$AnimationHandler.handleMessage(ValueAnimator.java:669)
[ERROR] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] TiApplication: at android.os.Looper.loop(Looper.java:135)
[ERROR] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5221)
[ERROR] TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiApplication: at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
[ERROR] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
https://github.com/appcelerator/titanium_mobile/blob/0a7dce77bb4fbdd21370512800a61542670e6006/android/titanium/src/java/org/appcelerator/titanium/view/TiUIView.java#L549
Fix:
Hello [~s.volkov], Thanks for the ticket. Our engineering will look into it.
[~s.volkov] Can you let us know in which situations this error occurs? A minimal test case would be lit!
It happens after closing window with views on which were periodically applied transformation like this
I think it will be hard to intentionally reproduce this, crash is happening in callback, by the time view was already released and proxy became
null
.1. tap "Open window" button 2. wait for spinning image 3. press back button.
PR (community): https://github.com/appcelerator/titanium_mobile/pull/10202
*Closing ticket*, Verified fix in SDK Version:
7.4.0.v20180726102127
*FR Passed (Test Steps):*Created a titanium application with the test case mentioned above
Ran the App
Pressed the "Open window" button
Waited for the spinning image
pressed the back button
Repeated the above steps various times to ensure no error was shown or the application did not crash like previously
*Test Environment*