Closed renas closed 9 years ago
From renasr...@gmail.com on January 09, 2014 03:56:45
Thanks for reporting this. Lets what we can do about this.
Status: Accepted
Owner: renasr...@gmail.com
From renasr...@gmail.com on March 16, 2014 23:09:24
Thanks again for reporting this. This has been fixed in 5.1.
Status: Verified
From renasr...@gmail.com on March 16, 2014 23:09:25
Thanks again for reporting this. This has been fixed in 5.1.
From bdtestmo...@gmail.com on December 18, 2014 06:53:12
This bug is still persistent in Robotium 5.2.1.
I found this bug on a tablet when I try take more screenshots on a 10 inch tablet from Genymotion.
From flavioca...@gmail.com on January 09, 2014 02:30:13
What steps will reproduce the problem? 1. I run a series of test methods (more than 10) and I take some screenshot during every test (about 5 screenshots for test) What is the expected output? What do you see instead? I'm having an OutOfMemoryException when I enable taking screenshot during my test with Robotium. If I disable taking screenshot it's ok.
[2014-01-09 10:53:28 - MyAppTest] Test run failed: Instrumentation run failed due to 'java.lang.OutOfMemoryError' What version of the product are you using? On what operating system? I had this problem on versions 4.2, 4.3, 4.1 Please provide any additional information below. As you can see in the code below I've a variable that let me decide if I want to take screenshot or not; if I enable taking screenshot I've the error above after I run about 10 test methods (I take from 1 to 10 screenshot for each test).
This is the code I run: public class TestApk extends ActivityInstrumentationTestCase2{ private static final String LAUNCHER_ACTIVITY_FULL_CLASSNAME="com.xxx.xxxnew.activities.XxxActivity"; private static Class launcherActivityClass;
}
This is the error from LogCat:
01-09 11:16:55.619: I/dalvikvm-heap(13717): Forcing collection of SoftReferences for 8294416-byte allocation 01-09 11:16:55.659: D/dalvikvm(13717): GC_BEFORE_OOM freed 10K, 14% free 112688K/129624K, paused 37ms, total 38ms 01-09 11:16:55.659: E/dalvikvm-heap(13717): Out of memory on a 8294416-byte allocation. 01-09 11:16:55.659: I/dalvikvm(13717): "main" prio=5 tid=1 RUNNABLE 01-09 11:16:55.659: I/dalvikvm(13717): | group="main" sCount=0 dsCount=0 obj=0x40e68b38 self=0x40e4a0b8 01-09 11:16:55.659: I/dalvikvm(13717): | sysTid=13717 nice=0 sched=0/0 cgrp=apps handle=1074288092 01-09 11:16:55.659: I/dalvikvm(13717): | state=R schedstat=( 0 0 0 ) utm=1943 stm=453 core=0 01-09 11:16:55.659: I/dalvikvm(13717): at android.graphics.Bitmap.nativeCopy(Native Method) 01-09 11:16:55.659: I/dalvikvm(13717): at android.graphics.Bitmap.copy(Bitmap.java:471) 01-09 11:16:55.659: I/dalvikvm(13717): at com.jayway.android.robotium.solo.ScreenshotTaker.getBitmapOfView(ScreenshotTaker.java:215) 01-09 11:16:55.659: I/dalvikvm(13717): at com.jayway.android.robotium.solo.ScreenshotTaker.access$400(ScreenshotTaker.java:32) 01-09 11:16:55.659: I/dalvikvm(13717): at com.jayway.android.robotium.solo.ScreenshotTaker$ScreenshotRunnable.run(ScreenshotTaker.java:326) 01-09 11:16:55.659: I/dalvikvm(13717): at android.os.Handler.handleCallback(Handler.java:725) 01-09 11:16:55.659: I/dalvikvm(13717): at android.os.Handler.dispatchMessage(Handler.java:92) 01-09 11:16:55.659: I/dalvikvm(13717): at android.os.Looper.loop(Looper.java:137) 01-09 11:16:55.659: I/dalvikvm(13717): at android.app.ActivityThread.main(ActivityThread.java:5328) 01-09 11:16:55.659: I/dalvikvm(13717): at java.lang.reflect.Method.invokeNative(Native Method) 01-09 11:16:55.659: I/dalvikvm(13717): at java.lang.reflect.Method.invoke(Method.java:511) 01-09 11:16:55.659: I/dalvikvm(13717): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 01-09 11:16:55.659: I/dalvikvm(13717): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 01-09 11:16:55.659: I/dalvikvm(13717): at dalvik.system.NativeStart.main(Native Method) 01-09 11:16:55.659: D/AbsListView(13717): [unregisterDoubleTapMotionListener] 01-09 11:16:55.659: I/MotionRecognitionManager(13717): .unregisterListener : / listener count = 0->0,
01-09 11:16:55.659: D/AbsListView(13717): unregisterIRListener() is called 01-09 11:16:55.659: D/AndroidRuntime(13717): Shutting down VM 01-09 11:16:55.659: W/dalvikvm(13717): threadid=1: thread exiting with uncaught exception (group=0x40e67ac8) 01-09 11:16:55.669: E/AndroidRuntime(13717): FATAL EXCEPTION: main 01-09 11:16:55.669: E/AndroidRuntime(13717): java.lang.OutOfMemoryError 01-09 11:16:55.669: E/AndroidRuntime(13717): at android.graphics.Bitmap.nativeCopy(Native Method) 01-09 11:16:55.669: E/AndroidRuntime(13717): at android.graphics.Bitmap.copy(Bitmap.java:471) 01-09 11:16:55.669: E/AndroidRuntime(13717): at com.jayway.android.robotium.solo.ScreenshotTaker.getBitmapOfView(ScreenshotTaker.java:215) 01-09 11:16:55.669: E/AndroidRuntime(13717): at com.jayway.android.robotium.solo.ScreenshotTaker.access$400(ScreenshotTaker.java:32) 01-09 11:16:55.669: E/AndroidRuntime(13717): at com.jayway.android.robotium.solo.ScreenshotTaker$ScreenshotRunnable.run(ScreenshotTaker.java:326) 01-09 11:16:55.669: E/AndroidRuntime(13717): at android.os.Handler.handleCallback(Handler.java:725) 01-09 11:16:55.669: E/AndroidRuntime(13717): at android.os.Handler.dispatchMessage(Handler.java:92) 01-09 11:16:55.669: E/AndroidRuntime(13717): at android.os.Looper.loop(Looper.java:137) 01-09 11:16:55.669: E/AndroidRuntime(13717): at android.app.ActivityThread.main(ActivityThread.java:5328) 01-09 11:16:55.669: E/AndroidRuntime(13717): at java.lang.reflect.Method.invokeNative(Native Method) 01-09 11:16:55.669: E/AndroidRuntime(13717): at java.lang.reflect.Method.invoke(Method.java:511) 01-09 11:16:55.669: E/AndroidRuntime(13717): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 01-09 11:16:55.669: E/AndroidRuntime(13717): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 01-09 11:16:55.669: E/AndroidRuntime(13717): at dalvik.syst...
Original issue: http://code.google.com/p/robotium/issues/detail?id=571