Kitty2014 / robotium

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

Robotium 5.3.0 crash problem (ActivityMonitor thread?) #673

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We have 70 UI test cases and use robotium solo 5.3.0. Robotium and tests 
started to crash or our application couldn't start after the execution of 22-25 
test cases. We observed that every test case start an ActivityMonitor thread 
and this thread remains in wait state after the test finished. So we have 25 
ActivityMonitor thread after execution of 25 tests. Moreover the logcat 
contained the following warning: Not creating another thread for Background 
Blocking because there are already 30.
Maybe these threads cause our crash problem? 

Original issue reported on code.google.com by foga...@gmail.com on 21 Apr 2015 at 12:38

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. What happens if you use solo.finalize() in your 
teardown?

Original comment by renasr...@gmail.com on 21 Apr 2015 at 1:32

GoogleCodeExporter commented 9 years ago
We use it in our teardown, so the problem is the same.
Here is my teardown: 
try {
            solo.finishOpenedActivities();
            getActivity().finish();
            solo.finalize();
        } catch (Throwable e) {
            e.printStackTrace();
        }
        super.tearDown();
        solo=null;
        System.gc();
    }

Original comment by foga...@gmail.com on 21 Apr 2015 at 1:44

GoogleCodeExporter commented 9 years ago
Can you please email me at renasreda©gmail.com and I'll send you a new 
robotium jar. Thanks.

Original comment by renasr...@gmail.com on 21 Apr 2015 at 1:48