Note that there are some explanatory texts on larger screens.

plurals
  1. PO"Window Manager Crash" on dispatching 'Down' key on Samsung Galaxy S
    primarykey
    data
    text
    <p><br> I am running my Unit tests on various android devices using <a href="http://developer.android.com/reference/android/app/Instrumentation.html" rel="nofollow">Instrumentation</a> . Testcases works fine on emulator &amp; all devices except <b>Samsung Galaxy S</b>. On Samsung Galaxy S it displays a <b>Window Manager crash after injecting some 30 key events</b> using instrumentation here is the complete crash log:</p> <pre><code>D/dalvikvm(11862): GC_EXPLICIT freed 6800 objects / 374040 bytes in 54ms D/dalvikvm(11862): GC_EXPLICIT freed 780 objects / 71856 bytes in 39ms W/dalvikvm(11862): threadid=9: thread exiting with uncaught exception (group=0x4001d7d0) E/WindowManager( 2472): Window Manager Crash E/WindowManager( 2472): java.lang.NullPointerException E/WindowManager( 2472): at com.android.server.WindowManagerService$KeyWaiter.waitForNextEventTarget(WindowManagerService.java:5844) E/WindowManager( 2472): at com.android.server.WindowManagerService.injectKeyEvent(WindowManagerService.java:5565) E/WindowManager( 2472): at android.view.IWindowManager$Stub.onTransact(IWindowManager.java:110) E/WindowManager( 2472): at com.android.server.WindowManagerService.onTransact(WindowManagerService.java:692) E/WindowManager( 2472): at android.os.Binder.execTransact(Binder.java:288) E/WindowManager( 2472): at dalvik.system.NativeStart.run(Native Method) E/AndroidRuntime(11862): FATAL EXCEPTION: Instr: com.myapp.test.ImpInstrumentation E/AndroidRuntime(11862): java.lang.NullPointerException E/AndroidRuntime(11862): at android.os.Parcel.readException(Parcel.java:1266) E/AndroidRuntime(11862): at android.os.Parcel.readException(Parcel.java:1248) E/AndroidRuntime(11862): at android.view.IWindowManager$Stub$Proxy.injectKeyEvent(IWindowManager.java:830) E/AndroidRuntime(11862): at android.app.Instrumentation.sendKeySync(Instrumentation.java:859) E/AndroidRuntime(11862): at android.app.Instrumentation.sendKeyDownUpSync(Instrumentation.java:872) E/AndroidRuntime(11862): at com.myapp.test.util.ListUtil.&lt;b&gt;arrowDownToPosition&lt;/b&gt;(ListUtil.java:69) </code></pre> <p>And here is the piece of code where it generally crashes:</p> <pre><code> private void arrowDownToPosition(int position) { int maxDowns = 50; while(mListView.getSelectedItemPosition() &lt; position &amp;&amp; --maxDowns &gt; 0) { mInstrumentation.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_DOWN); } //Crashes on below line dispatching enter key mInstrumentation.sendKeyDownUpSync(KeyEvent.KEYCODE_ENTER); } </code></pre> <p>All solutions/suggestions are welcome.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload