piotrprus / motionlayoutplayground Goto Github PK
View Code? Open in Web Editor NEWThis repo contains app that guide user in new motionLayout library
This repo contains app that guide user in new motionLayout library
Hey,
Here's the stack trace of the crash I get when playing around with the recyclerview and some animations :
2019-12-03 13:06:52.856 20493-20493/com.piotrprus.motionlayoutplayground E/AndroidRuntime: FATAL EXCEPTION: main Process: com.piotrprus.motionlayoutplayground, PID: 20493 java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.VelocityTracker.addMovement(android.view.MotionEvent)' on a null object reference at androidx.constraintlayout.motion.widget.MotionLayout$MyTracker.addMovement(MotionLayout.java:985) at androidx.constraintlayout.motion.widget.MotionScene.processTouchEvent(MotionScene.java:1043) at androidx.constraintlayout.motion.widget.MotionLayout.onTouchEvent(MotionLayout.java:2992) at android.view.View.dispatchTouchEvent(View.java:10023) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2626) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2307) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2632) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2264) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:413) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1808) at android.app.Activity.dispatchTouchEvent(Activity.java:3061) at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:69) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:375) at android.view.View.dispatchPointerEvent(View.java:10243) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4438) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4306) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3853) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3906) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3872) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3999) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3880) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4056) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3853) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3906) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3872) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3880) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3853) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6246) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6220) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6181) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6349) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:323) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:6119) 2019-12-03 13:06:52.856 20493-20493/com.piotrprus.motionlayoutplayground E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
I got the same crash on my test app when I play too much with the recyclerView and the animations. I've also disabled touchEvent on the recyclerView when the animation starts and puts it back when the animation finishes ( but in a less clean way). So far, I guess the problem comes from the motionLayout view being null/deleted/not detected for some reason after an animation.
PS : The crash mainly occurs when I try to scroll the list after I've executed an animation.
I hope it helps!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.