xiaocong / uiautomator

Python wrapper of Android uiautomator test tool.
MIT License
2.03k stars 638 forks source link

d.click(805,805) crashes android. #13

Open reddypdl opened 10 years ago

reddypdl commented 10 years ago

d.click(805,805) command crashes android.

But the same command getDevice().click(805,805) works.

ro.secure=1 ro.debuggable=1

D/UIAutomatorStub( 1668): URI: /jsonrpc/0, Method: POST, Header: {content-type=application/json, user-agent=Python-urllib/2.6, connection=close, host=localhost:9008, accept-encoding=identity, content-length=78}, parms, {{"jsonrpc": "2.0", "method": "ping", "id": "2aad0a5903032a49fefe812a06e658e2"}=, NanoHttpd.QUERY_STRING={"jsonrpc": "2.0", "method": "ping", "id": "2aad0a5903032a49fefe812a06e658e2"}}, files: {} W/ResourceType( 845): No known package when getting name for resource number 0x9b060000 W/ResourceType( 845): No known package when getting name for resource number 0x9b050001 W/ResourceType( 845): No known package when getting name for resource number 0x9b040002 W/ResourceType( 845): No known package when getting name for resource number 0x9b020004 W/ResourceType( 845): No known package when getting name for resource number 0x9b010005 W/ResourceType( 845): No known package when getting name for resource number 0x9b000006 W/ResourceType( 845): No known package when getting name for resource number 0x9c030000 W/ResourceType( 845): No known package when getting name for resource number 0x9c020000 I/QueryController( 1668): Matched selector: UiSelector[] <<==>> [android.view.accessibility.AccessibilityNodeInfo@7442; boundsInParent: Rect(0, 0 - 1920, 1104); boundsInScreen: Rect(0, 0 - 1920, 1104); packageName: com.android.launcher; className: android.widget.FrameLayout; text: null; contentDescription: null; viewIdResName: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; enabled: true; password: false; scrollable: false; [ACTION_SELECT, ACTION_CLEAR_SELECTION, ACTION_ACCESSIBILITY_FOCUS]] D/UIAutomatorStub( 1668): URI: /jsonrpc/0, Method: POST, Header: {content-type=application/json, user-agent=Python-urllib/2.6, connection=close, host=localhost:9008, accept-encoding=identity, content-length=101}, parms, {{"params": [805, 805], "jsonrpc": "2.0", "method": "click", "id": "5ce39999f62f14da963de8e7156b114b"}=, NanoHttpd.QUERY_STRING={"params": [805, 805], "jsonrpc": "2.0", "method": "click", "id": "5ce39999f62f14da963de8e7156b114b"}}, files: {} D/InteractionController( 1668): clickNoSync (805, 805) E/InputEventReceiver( 542): Exception dispatching input event. E/MessageQueue-JNI( 542): Exception in MessageQueue callback: handleReceiveCallback E/MessageQueue-JNI( 542): java.lang.NullPointerException E/MessageQueue-JNI( 542): at com.android.internal.widget.PointerLocationView.addPointerEvent(PointerLocationView.java:552) E/MessageQueue-JNI( 542): at com.android.internal.policy.impl.PhoneWindowManager$PointerLocationInputEventReceiver.onInputEvent(PhoneWindowManager.java:310) E/MessageQueue-JNI( 542): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:182) E/MessageQueue-JNI( 542): at android.os.MessageQueue.nativePollOnce(Native Method) E/MessageQueue-JNI( 542): at android.os.MessageQueue.next(MessageQueue.java:132) E/MessageQueue-JNI( 542): at android.os.Looper.loop(Looper.java:124) E/MessageQueue-JNI( 542): at android.os.HandlerThread.run(HandlerThread.java:61) W/dalvikvm( 542): threadid=12: thread exiting with uncaught exception (group=0x41592700) E/AndroidRuntime( 542): *\ FATAL EXCEPTION IN SYSTEM PROCESS: UI E/AndroidRuntime( 542): java.lang.NullPointerException E/AndroidRuntime( 542): at com.android.internal.widget.PointerLocationView.addPointerEvent(PointerLocationView.java:552) E/AndroidRuntime( 542): at com.android.internal.policy.impl.PhoneWindowManager$PointerLocationInputEventReceiver.onInputEvent(PhoneWindowManager.java:310) E/AndroidRuntime( 542): at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:182) E/AndroidRuntime( 542): at android.os.MessageQueue.nativePollOnce(Native Method) E/AndroidRuntime( 542): at android.os.MessageQueue.next(MessageQueue.java:132) E/AndroidRuntime( 542): at android.os.Looper.loop(Looper.java:124) E/AndroidRuntime( 542): at android.os.HandlerThread.run(HandlerThread.java:61) I/Process ( 542): Sending signal. PID: 542 SIG: 9

xiaocong commented 10 years ago

Likely it's caused by InputDevice.getDevice(event.getDeviceId()) returned null in Android framework code. Before I get conclusion, could you please tell me whether it's a random or always issue? And how frequently it happened in case of random one?

Thanks.

reddypdl commented 10 years ago

It is always.

xiaocong commented 10 years ago

OH... Could you please list your device's info using below commands:

adb shell getprop | grep ro.build
adb shell getprop | grep ro.product

Thank you!

reddypdl commented 10 years ago

HW is Nexus 7 Tablet with Android 4.3

[ro.build.date]: [Fri Aug 30 20:06:42 UTC 2013] [ro.build.description]: [razor-user 4.3 JSS15R 804956 release-keys]

[ro.product.model]: [Nexus 7]

xiaocong commented 10 years ago

Today I got one nexus 7 with the same build time and build number with yours and have tried about 10 minutes, but could not reproduce the issue. I will continue to monitor the issue.

I really appreciate you for submitting issue here, It do help me to improve the package. Thank you.

CourageTrain commented 2 years ago

Is this issue reproducible still? Can the status of this issue be changed?