sangmingming / robotium

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

Getting "Instrumentation run failed due to process crashed" #170

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
After completion of the test case, we are getting "Instrumentation run failed 
due to process crashed" 

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
android sdk 4 or above, Win7,win xp

Please provide any additional information below.
please find the source code for the test case.
--------------------------------------------------
public class New extends ActivityInstrumentationTestCase2<SplashScreen> {
       private static final int ACTIVITY_WAIT_MILLIS = 15000;
       private Solo solo;

       public New() {
              super("com.mportal.ui",SplashScreen.class);
              // TODO Auto-generated constructor stub
       }
       @Override
       public void setUp() throws Exception {
              solo = new Solo(getInstrumentation(), getActivity());
       }

       @Override
       public void tearDown() throws Exception {
              try {
                     solo.finalize();
              } catch (Throwable e) {
                     e.printStackTrace();
              }
              getActivity().finish();
              super.tearDown();
              solo.sleep(10000);
       }

       public void testSearch() throws Throwable {

              //solo.waitForActivity("com.mportal.dexknows.ui.SplashScreen");
              solo.waitForActivity("com.mportal.ui.homescreen.CoverFlowScreen");
              solo.clickOnEditText(0);
              solo.waitForActivity("com.mportal.ui.Search");
              }

--------------------------------------------------

awaiting for early response.

TR,
Vasanth.

Original issue reported on code.google.com by itsme.va...@gmail.com on 4 Oct 2011 at 7:21

GoogleCodeExporter commented 9 years ago
I am getting the exact same error after running a series of tests.

[2011-10-10 14:07:41 - xxx] Running tests...
[2011-10-10 14:08:07 - xxx] Test run failed: Instrumentation run failed due to 
'Process crashed.'
[2011-10-10 14:08:07 - xxx] Test run finished

Original comment by slott.ha...@gmail.com on 10 Oct 2011 at 12:09

GoogleCodeExporter commented 9 years ago
I am not sure why there is a crash, however in waitForActivity() you should use 
the simplename only: waitForActivity("SplashScreen")

Original comment by renasr...@gmail.com on 10 Oct 2011 at 2:41

GoogleCodeExporter commented 9 years ago
i also get the same issue:
[2011-11-22 17:04:26 - ****] Launching instrumentation 
android.test.InstrumentationTestRunner on device emulator-5554
[2011-11-22 17:04:26 - ****] Collecting test information
[2011-11-22 17:04:27 - ****] Test run failed: Instrumentation run failed due to 
'Process crashed.'
[2011-11-22 17:04:27 - ****] Test run finished

Original comment by ljp...@gmail.com on 22 Nov 2011 at 9:20

GoogleCodeExporter commented 9 years ago
I have the same issue after running a dozen or so tests. I think there is some 
sort of memory leak in the application because in the system logcat in the 
minutes before the error were several "Low Memory: No more background 
processes" messages

Original comment by posi.p...@gmail.com on 19 Jan 2012 at 5:31

GoogleCodeExporter commented 9 years ago
[2012-06-21 16:37:28 - ***] Running tests...
[2012-06-21 16:38:37 - ***] Test run failed: Instrumentation run failed due to 
'Process crashed.'
[2012-06-21 16:38:37 - ***] Test run finished

the same problem :(

Original comment by vam...@tut.by on 21 Jun 2012 at 1:40

GoogleCodeExporter commented 9 years ago
Hi Renas,
I am also getting this issue randomly.
When this crash occurs i saw some Signal 11 crashes in the logcat.

So is it the tests problem or application problem?

Thanks,
Vaibhav

Original comment by vaibha...@gmail.com on 19 Jul 2012 at 8:53

GoogleCodeExporter commented 9 years ago
I get the same error BEFORE the first test is executed!

Thanks, Andreas

Original comment by andischi...@googlemail.com on 16 Oct 2012 at 5:12

GoogleCodeExporter commented 9 years ago
I got this error recently using         solo.finishOpenedActivities(); in my teardown.

    @Override
    public void tearDown() throws Exception{
            solo.finishOpenedActivities();
    }

Using Robotium 4.1.  It only happens for some cases.  

Does anyone have a suggestion on what is needed for the teardown of the test?

Thanks!

Original comment by lamber...@gmail.com on 18 Apr 2013 at 10:11

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi Renas,

I m getting the same issue with Robotium 4.3

Consider the below sample test code

public class LoginTest extends ActivityInstrumentationTestCase2<Activity> {

public void setUp() throws Exception {
 super.setUp();
 solo = new Solo(getInstrumentation(), getActivity());
}

 public void testA(){
 }
 public void testB(){
 }
 public void testC(){
 }

 public void tearDown(){
 solo.finishOpenedActivities();
}

when i run the LoginTest class from Eclipse, the tests are invoked , but then 
when the testA() finishes the JUnit shows that testA() has passed then when the 
control moves to execute the next test [i.e., testB()] the test fails throwing 
the below error :
"Test failed to run to completion. Reason: 'Instrumentation run failed due to 
'Process crashed.''. Check device logcat for details"

Can you please provide your inputs on the same. 

Thanks,
Zaid Momin

Original comment by Zaid.I.M...@gmail.com on 2 Jan 2014 at 7:00

GoogleCodeExporter commented 9 years ago
Problem is not with testcase problem is with application. See if you use 
System.exit(0) anywhere in the application. It causes instrumentation test 
runner to run. Because it causes Dalvik virtual machine to exit. This result in 
finalization of all the objects. Use finish() instead of System.exit(0).

Original comment by bhupeshs...@gmail.com on 6 Aug 2014 at 10:23