Closed Bug 998001 Opened 11 years ago Closed 9 years ago

Intermittent testFindInPage | Exception caught - java.lang.NullPointerException

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: RyanVM, Unassigned)

References

Details

(Keywords: intermittent-failure)

https://tbpl.mozilla.org/php/getParsedLog.php?id=38028589&tree=Fx-Team Android 4.0 Panda fx-team opt test robocop-2 on 2014-04-17 11:16:20 PDT for push 932ab5554cb0 slave: panda-0511 11:31:34 INFO - 0 INFO SimpleTest START 11:31:34 INFO - 1 INFO TEST-START | testFindInPage 11:31:34 INFO - 2 INFO TEST-PASS | testFindInPage | Given message occurred for registered event: {"type":"Gecko:Ready"} - Gecko:Ready should equal Gecko:Ready 11:31:34 INFO - EventExpecter: no longer listening for Gecko:Ready 11:31:34 INFO - Exception caught during test! 11:31:34 INFO - java.lang.NullPointerException 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3070) 11:31:34 INFO - at android.widget.ListView.findViewTraversal(ListView.java:3435) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.Window.findViewById(Window.java:901) 11:31:34 INFO - at android.app.Activity.findViewById(Activity.java:1794) 11:31:34 INFO - at com.jayway.android.robotium.solo.Getter.getView(Getter.java:118) 11:31:34 INFO - at com.jayway.android.robotium.solo.Getter.getView(Getter.java:137) 11:31:34 INFO - at com.jayway.android.robotium.solo.Solo.getView(Solo.java:1982) 11:31:34 INFO - at com.jayway.android.robotium.solo.Solo.getView(Solo.java:1970) 11:31:34 INFO - at org.mozilla.gecko.tests.BaseTest$1.isSatisfied(BaseTest.java:174) 11:31:34 INFO - at com.jayway.android.robotium.solo.Waiter.waitForCondition(Waiter.java:370) 11:31:34 INFO - at com.jayway.android.robotium.solo.Solo.waitForCondition(Solo.java:426) 11:31:34 INFO - at org.mozilla.gecko.tests.BaseTest.waitForCondition(BaseTest.java:279) 11:31:34 INFO - at org.mozilla.gecko.tests.BaseTest.focusUrlBar(BaseTest.java:171) 11:31:34 INFO - at org.mozilla.gecko.tests.BaseTest.enterUrl(BaseTest.java:188) 11:31:34 INFO - at org.mozilla.gecko.tests.BaseTest.inputAndLoadUrl(BaseTest.java:219) 11:31:34 INFO - at org.mozilla.gecko.tests.PixelTest.loadAndGetPainted(PixelTest.java:11) 11:31:34 INFO - at org.mozilla.gecko.tests.PixelTest.loadAndPaint(PixelTest.java:24) 11:31:34 INFO - at org.mozilla.gecko.tests.testFindInPage.testFindInPage(testFindInPage.java:16) 11:31:34 INFO - at java.lang.reflect.Method.invokeNative(Native Method) 11:31:34 INFO - at java.lang.reflect.Method.invoke(Method.java:511) 11:31:34 INFO - at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214) 11:31:34 INFO - at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199) 11:31:34 INFO - at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192) 11:31:34 INFO - at org.mozilla.gecko.tests.BaseTest.runTest(BaseTest.java:125) 11:31:34 INFO - at junit.framework.TestCase.runBare(TestCase.java:127) 11:31:34 INFO - at junit.framework.TestResult$1.protect(TestResult.java:106) 11:31:34 INFO - at junit.framework.TestResult.runProtected(TestResult.java:124) 11:31:34 INFO - at junit.framework.TestResult.run(TestResult.java:109) 11:31:34 INFO - at junit.framework.TestCase.run(TestCase.java:118) 11:31:34 INFO - at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169) 11:31:34 INFO - at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154) 11:31:34 INFO - at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:545) 11:31:34 INFO - at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1551) 11:31:34 INFO - 3 INFO TEST-UNEXPECTED-FAIL | testFindInPage | Exception caught - java.lang.NullPointerException 11:31:34 INFO - 4 INFO TEST-END | testFindInPage | finished in 6845ms 11:31:34 INFO - 5 INFO TEST-START | Shutdown 11:31:34 INFO - 6 INFO Passed: 1 11:31:34 WARNING - 7 INFO Failed: 1 11:31:34 WARNING - One or more unittests failed. 11:31:34 INFO - 8 INFO Todo: 0 11:31:34 INFO - 9 INFO SimpleTest FINISHED
Finally, an easy robocop bug! This is just because this test does not wait for Gecko:Ready.
Oh darn, actually this test already calls blockForGeckoReady. I don't know how this failed.
This looks like it might be an Android/Robotium bug: 11:31:34 INFO - java.lang.NullPointerException 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3070) 11:31:34 INFO - at android.widget.ListView.findViewTraversal(ListView.java:3435) 11:31:34 INFO - at android.view.View.findViewById(View.java:12247) 11:31:34 INFO - at android.view.ViewGroup.findViewTraversal(ViewGroup.java:3071) ... 11:31:34 INFO - at android.view.Window.findViewById(Window.java:901) 11:31:34 INFO - at android.app.Activity.findViewById(Activity.java:1794) 11:31:34 INFO - at com.jayway.android.robotium.solo.Getter.getView(Getter.java:118) ... 11:31:34 INFO - at com.jayway.android.robotium.solo.Solo.getView(Solo.java:1982) ... 11:31:34 INFO - at org.mozilla.gecko.tests.BaseTest$1.isSatisfied(BaseTest.java:174) The failing line from BaseTest (assuming the source hasn't changed too much): [1]. We call into mSolo.getView(int) with a compile time int id, meaning there is nothing we could have done wrong here. Android throws the exception, likely because Robotium was calling into it at inappropriate time, or there is a bug in the Android framework. [1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/base/tests/BaseTest.java?rev=980272b33c24#174
Inactive; closing (see bug 1180138).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.