Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DoodleActivity的315行的mSize没做空检查,在移动的时候会crash #15

Closed
saltwater2233 opened this issue Feb 15, 2019 · 1 comment

Comments

@saltwater2233
Copy link

2019-02-15 10:49:06.521 20992-20992/cn.hzw.doodledemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: cn.hzw.doodledemo, PID: 20992
java.lang.NullPointerException: Attempt to invoke virtual method 'float java.lang.Float.floatValue()' on a null object reference
at cn.hzw.doodle.DoodleActivity$2.onSelectedItem(DoodleActivity.java:315)
at cn.hzw.doodle.DoodleOnTouchGestureListener.onSingleTapUp(DoodleOnTouchGestureListener.java:269)
at cn.forward.androids.TouchGestureDetector$OnTouchGestureListenerProxy.onSingleTapUp(TouchGestureDetector.java:165)
at android.view.GestureDetector.onTouchEvent(GestureDetector.java:640)
at cn.forward.androids.TouchGestureDetector.onTouchEvent(TouchGestureDetector.java:86)
at cn.hzw.doodle.DoodleView$DoodleViewInner.onTouchEvent(DoodleView.java:1073)
at cn.hzw.doodle.DoodleView.dispatchTouchEvent(DoodleView.java:185)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2963)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2963)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2963)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2963)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2963)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2963)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:448)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1828)
at android.app.Activity.dispatchTouchEvent(Activity.java:3356)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:410)
at android.view.View.dispatchPointerEvent(View.java:11975)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4871)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4682)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4213)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4266)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4232)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4359)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4240)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4416)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4213)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4266)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4232)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4240)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4213)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6780)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6752)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6713)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6888)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:253)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:331)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:6701)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:246)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)

1993hzw added a commit that referenced this issue Feb 15, 2019
@1993hzw
Copy link
Owner

1993hzw commented Feb 15, 2019

已修复,谢谢反馈!

@1993hzw 1993hzw closed this as completed Feb 15, 2019
@chgmxx chgmxx mentioned this issue Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants