Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

NPE when running python script in step 7 #3

Closed
mnt9 opened this issue Oct 30, 2015 · 3 comments
Closed

NPE when running python script in step 7 #3

mnt9 opened this issue Oct 30, 2015 · 3 comments

Comments

@mnt9
Copy link

mnt9 commented Oct 30, 2015

That am command works fine if I execute it myself with adb shell.

151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] Error executing command: am instrument -w -r -e annotation com.google.android.perftesting.common.PerfTest -e disableAnalytics true -e listener com.google.android.perftesting.TestListener com.google.android.perftesting.test/android.support.test.runner.AndroidJUnitRunner
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice]com.android.ddmlib.ShellCommandUnresponsiveException
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:503)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:381)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:352)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.ddmlib.Device.executeShellCommand(Device.java:613)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.chimpchat.adb.AdbChimpDevice.shell(AdbChimpDevice.java:274)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.chimpchat.adb.AdbChimpDevice.shell(AdbChimpDevice.java:267)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.chimpchat.adb.AdbChimpDevice.shell(AdbChimpDevice.java:262)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.chimpchat.adb.AdbChimpDevice.instrument(AdbChimpDevice.java:503)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at com.android.monkeyrunner.MonkeyDevice.instrument(MonkeyDevice.java:358)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at java.lang.reflect.Method.invoke(Method.java:497)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:186)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:204)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyObject.call(PyObject.java:422)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyObject.call(PyObject.java:426)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyMethod.call(PyMethod.java:139)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.pycode.pyx0.performTest$1(/Users/Michael/Code/android-perf-testing/./run_perf_tests.py:67)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.pycode.pyx0.call_function(/Users/Michael/Code/android-perf-testing/./run_perf_tests.py)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyTableCode.call(PyTableCode.java:165)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyFunction.function___call
(PyFunction.java:376)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyFunction.call(PyFunction.java:371)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyFunction.call(PyFunction.java:366)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyObject.callextra(PyObject.java:527)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at threading$py.run$32(/Users/Michael/Library/Android/sdk/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py:170)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at threading$py.call_function(/Users/Michael/Library/Android/sdk/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyTableCode.call(PyTableCode.java:165)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyBaseCode.call(PyBaseCode.java:134)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyFunction.call(PyFunction.java:317)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyMethod.call(PyMethod.java:109)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at threading$py.Thread__bootstrap$33(/Users/Michael/Library/Android/sdk/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py:223)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at threading$py.call_function(/Users/Michael/Library/Android/sdk/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyTableCode.call(PyTableCode.java:165)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyFunction.call(PyFunction.java:387)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyMethod.instancemethod___call
(PyMethod.java:220)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyMethod.call(PyMethod.java:211)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyMethod.call(PyMethod.java:201)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.PyMethod.call(PyMethod.java:196)
151030 15:59:19.764:S [TestThread] [com.android.chimpchat.adb.AdbChimpDevice] at org.python.core.FunctionThread.run(FunctionThread.java:25)
Exception in thread TestThread:Traceback (most recent call last):
File "/Users/Michael/Library/Android/sdk/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py", line 179, in _Thread__bootstrap
self.run()
File "/Users/Michael/Library/Android/sdk/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py", line 170, in run
self._target(_self._args, *_self._kwargs)
File "/Users/Michael/Code/android-perf-testing/./run_perf_tests.py", line 66, in performTest
print device.instrument(testRunner, params)['stream']
NullPointerException: java.lang.NullPointerException

@PaulRashidi
Copy link
Contributor

I just posted some updates to the master_staging branch in prep for an update to the codelab. It has a bit more error checking. Can you see if your issue is still present? HEAD~3 should work without having to follow the codelab instructions.

@PaulRashidi
Copy link
Contributor

Closed due to inactivity. Please let me know if the updated code/instructions still give you a problem by re-opening this issue.

@gmorales
Copy link

gmorales commented Apr 21, 2016

I am having same problem yet.

Exception in thread TestThread:Traceback (most recent call last):
File "/home/gmorales/Development/android-sdk-linux/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py", line 179, in _Thread__bootstrap
self.run()
File "/home/gmorales/Development/android-sdk-linux/tools/lib/jython-standalone-2.5.3.jar/Lib/threading.py", line 170, in run
self._target(_self._args, *_self._kwargs)
File "/home/gmorales/git/android-perf-testing/./run_perf_tests.py", line 51, in perform_test
print device.instrument(test_runner, params)['stream']
NullPointerException: java.lang.NullPointerException

This error produce thist output:

FAIL: Could not find file indicating the test run completed. Check that the TestListener is writing files to external storage

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants