mosil / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

Problem in running test methods on queue (it works when run alone). #535

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I can run a single test method selecting it and running as Android Junit 
test.
2. Test crashes on same test method when I try to run test methods in queue.

What is the expected output? What do you see instead?
I'd like the test goes on but it stops and it logs me the information listed 
before.

What version of the product are you using? On what operating system?
I'm having this problem on Robotium 4.2 / 4.3; Android version is 4.2.2 on 
Samsung S4

Please provide any additional information below.
The console of eclipse print me this error: 
[2013-10-17 11:24:51 - MyAppTestSprint2_GPS_ON] Test run failed: 
Instrumentation run failed due to 'java.lang.IllegalArgumentException'
[2013-10-17 11:24:51 - MyAppTestSprint2_GPS_ON] Test run finished

Logcat print me this information:
10-17 11:21:08.483: E/WindowManager(11023): Activity 
com.xxx.MyAppnew.activities.HomeScreenActivity has leaked window 
com.android.internal.policy.impl.PhoneWindow$DecorView{4209bde8 V.E..... 
R......D 0,0-1026,486} that was originally added here
10-17 11:21:08.483: E/WindowManager(11023): android.view.WindowLeaked: Activity 
com.xxx.MyAppnew.activities.HomeScreenActivity has leaked window 
com.android.internal.policy.impl.PhoneWindow$DecorView{4209bde8 V.E..... 
R......D 0,0-1026,486} that was originally added here
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.view.ViewRootImpl.<init>(ViewRootImpl.java:426)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:235)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.app.Dialog.show(Dialog.java:282)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.xxx.MyAppnew.utils.ProgressBarDialog.showProgressDialog(ProgressBarDialog.ja
va:27)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.xxx.MyAppnew.utils.ProgressBarDialog.<init>(ProgressBarDialog.java:13)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.xxx.MyAppnew.activities.HomeTabCouponsFragment.fetchStores(HomeTabCouponsFra
gment.java:628)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.xxx.MyAppnew.activities.HomeTabCouponsFragment.startDowload(HomeTabCouponsFr
agment.java:619)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.xxx.MyAppnew.activities.HomeTabCouponsFragment.fetchGpsLocation(HomeTabCoupo
nsFragment.java:401)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.xxx.MyAppnew.activities.HomeTabCouponsFragment.makeNearestView(HomeTabCoupon
sFragment.java:388)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.xxx.MyAppnew.activities.HomeScreenActivity.onActivityResult(HomeScreenActivi
ty.java:746)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.app.Activity.dispatchActivityResult(Activity.java:5439)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.app.ActivityThread.deliverResults(ActivityThread.java:3427)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.app.ActivityThread.handleSendResult(ActivityThread.java:3474)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.app.ActivityThread.access$1200(ActivityThread.java:152)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1330)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.os.Handler.dispatchMessage(Handler.java:99)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.os.Looper.loop(Looper.java:137)
10-17 11:21:08.483: E/WindowManager(11023):     at 
android.app.ActivityThread.main(ActivityThread.java:5328)
10-17 11:21:08.483: E/WindowManager(11023):     at 
java.lang.reflect.Method.invokeNative(Native Method)
10-17 11:21:08.483: E/WindowManager(11023):     at 
java.lang.reflect.Method.invoke(Method.java:511)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
10-17 11:21:08.483: E/WindowManager(11023):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
10-17 11:21:08.483: E/WindowManager(11023):     at 
dalvik.system.NativeStart.main(Native Method)
10-17 11:21:08.534: D/dalvikvm(11023): GC_EXPLICIT freed 115K, 17% free 
30860K/37132K, paused 4ms+13ms, total 54ms
10-17 11:21:08.534: D/AndroidRuntime(11023): Shutting down VM
10-17 11:21:08.534: W/dalvikvm(11023): threadid=1: thread exiting with uncaught 
exception (group=0x40f39ac8)
10-17 11:21:08.534: D/AbsListView(11023): [unregisterDoubleTapMotionListener]
10-17 11:21:08.534: I/MotionRecognitionManager(11023):   .unregisterListener : 
/ listener count = 0->0,  
10-17 11:21:08.534: D/AbsListView(11023): unregisterIRListener() is called 
10-17 11:21:08.544: E/AndroidRuntime(11023): FATAL EXCEPTION: main
10-17 11:21:08.544: E/AndroidRuntime(11023): 
java.lang.IllegalArgumentException: View not attached to window manager
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:402)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:304)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:79)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.app.Dialog.dismissDialog(Dialog.java:325)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.app.Dialog.dismiss(Dialog.java:307)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
com.xxx.MyAppnew.utils.ProgressBarDialog.hideProgressDialog(ProgressBarDialog.ja
va:31)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
com.xxx.MyAppnew.activities.HomeTabCouponsFragment$5.onComplete(HomeTabCouponsFr
agment.java:650)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
com.xxx.MyAppnew.activities.HomeTabCouponsFragment$5.onComplete(HomeTabCouponsFr
agment.java:1)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
com.xxx.MyAppnew.tasks.StoresTask.onPostExecute(StoresTask.java:127)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
com.xxx.MyAppnew.tasks.StoresTask.onPostExecute(StoresTask.java:1)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.os.AsyncTask.finish(AsyncTask.java:631)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.os.AsyncTask.access$600(AsyncTask.java:177)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.os.Handler.dispatchMessage(Handler.java:99)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.os.Looper.loop(Looper.java:137)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
android.app.ActivityThread.main(ActivityThread.java:5328)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
java.lang.reflect.Method.invokeNative(Native Method)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
java.lang.reflect.Method.invoke(Method.java:511)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
10-17 11:21:08.544: E/AndroidRuntime(11023):    at 
dalvik.system.NativeStart.main(Native Method)
10-17 11:21:08.684: E/Google Maps Android API(11023): Authorization failure.  
Please see https://developers.google.com/maps/documentation/android/start for 
how to correctly set up the map.
10-17 11:21:08.684: E/Google Maps Android API(11023): Ensure that the following 
correspond to what is in the API Console: Package Name: com.xxx.MyAppnew, API 
Key: AIzaSyDOzVpHoh47DtjyFCysHCXh6L5vBO32hAY, Certificate Fingerprint: 
9F56448D21CDF7B4F92A54A2A7919AA7ABA3F6FF

Original issue reported on code.google.com by flavioca...@gmail.com on 17 Oct 2013 at 9:58

GoogleCodeExporter commented 9 years ago
This is not a Robotium issue. Maybe this can help:

http://stackoverflow.com/questions/11957409/activity-has-leaked-window-com-andro
id-internal-policy-impl-phonewindowdecorvie

Original comment by renasr...@gmail.com on 17 Oct 2013 at 10:35

GoogleCodeExporter commented 9 years ago
i have met the same problem. Do you resolve it ?  

Original comment by hexns...@gmail.com on 4 Dec 2014 at 6:43