Intermittent Android 4.3 PROCESS-CRASH | java-exception | java.lang.NullPointerException at org.mozilla.gecko.gfx.GeckoLayerClient.setFirstPaintViewport(GeckoLayerClient.java:590)

RESOLVED FIXED in Firefox 40

Status

()

defect
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: gbrown, Assigned: jchen)

Tracking

({crash, intermittent-failure})

unspecified
Firefox 40
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox38 unaffected, firefox38.0.5 unaffected, firefox39 unaffected, firefox40 fixed, firefox-esr31 unaffected, firefox-esr38 unaffected)

Details

Attachments

(1 attachment)

This is being reported poorly on treeherder, sometimes as "PROCESS-CRASH | Automation Error: Missing end of test marker (process crashed?)" but logcats show the NPE.

http://ftp.mozilla.org/pub/mozilla.org/mobile/tinderbox-builds/fx-team-android-api-11/1430421556/fx-team_ubuntu64_vm_armv7_mobile_test-robocop-4-bm116-tests1-linux64-build12.txt.gz

14:03:53     INFO -  04-30 13:30:56.299 E/GeckoCrashHandler( 1514): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 81 ("Thread-81")
14:03:53     INFO -  04-30 13:30:56.299 E/GeckoCrashHandler( 1514): java.lang.NullPointerException
14:03:53     INFO -  04-30 13:30:56.299 E/GeckoCrashHandler( 1514): 	at org.mozilla.gecko.gfx.GeckoLayerClient.setFirstPaintViewport(GeckoLayerClient.java:590)
14:03:53     INFO -  04-30 13:30:56.299 E/GeckoCrashHandler( 1514): 	at dalvik.system.NativeStart.run(Native Method)
14:03:53     INFO -  04-30 13:30:56.299 E/GeckoCrashHandler( 1514): Main thread (1) stack:
14:03:53     INFO -  04-30 13:30:56.299 E/GeckoCrashHandler( 1514):     android.os.MessageQueue.nativePollOnce(Native Method)
14:03:53     INFO -  04-30 13:30:56.329 E/GeckoCrashHandler( 1514):     android.os.MessageQueue.next(MessageQueue.java:132)
14:03:53     INFO -  04-30 13:30:56.329 E/GeckoCrashHandler( 1514):     android.os.Looper.loop(Looper.java:124)
14:03:53     INFO -  04-30 13:30:56.329 E/GeckoCrashHandler( 1514):     android.app.ActivityThread.main(ActivityThread.java:5103)
14:03:53     INFO -  04-30 13:30:56.339 E/GeckoCrashHandler( 1514):     java.lang.reflect.Method.invokeNative(Native Method)
14:03:53     INFO -  04-30 13:30:56.339 E/GeckoCrashHandler( 1514):     java.lang.reflect.Method.invoke(Method.java:525)
14:03:53     INFO -  04-30 13:30:56.339 E/GeckoCrashHandler( 1514):     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
14:03:53     INFO -  04-30 13:30:56.349 E/GeckoCrashHandler( 1514):     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
14:03:53     INFO -  04-30 13:30:56.349 E/GeckoCrashHandler( 1514):     dalvik.system.NativeStart.main(Native Method)
http://ftp.mozilla.org/pub/mozilla.org/mobile/tinderbox-builds/fx-team-android-api-11/1430425100/fx-team_ubuntu64_vm_armv7_mobile_test-mochitest-6-bm54-tests1-linux64-build7.txt.gz

14:02:08     INFO -  04-30 14:00:24.573 E/GeckoConsole(  762): [JavaScript Error: "TypeError: this.selectedTab is null" {file: "chrome://browser/content/browser.js" line: 1853}]
14:02:08     INFO -  04-30 14:00:24.914 E/GeckoCrashHandler(  762): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 62 ("Thread-62")
14:02:08     INFO -  04-30 14:00:24.914 E/GeckoCrashHandler(  762): java.lang.NullPointerException
14:02:08     INFO -  04-30 14:00:24.914 E/GeckoCrashHandler(  762): 	at org.mozilla.gecko.gfx.GeckoLayerClient.setFirstPaintViewport(GeckoLayerClient.java:590)
14:02:08     INFO -  04-30 14:00:24.914 E/GeckoCrashHandler(  762): 	at dalvik.system.NativeStart.run(Native Method)
14:02:08     INFO -  04-30 14:00:24.914 E/GeckoCrashHandler(  762): Main thread (1) stack:
14:02:08     INFO -  04-30 14:00:24.944 E/GeckoCrashHandler(  762):     android.os.MessageQueue.nativePollOnce(Native Method)
14:02:08     INFO -  04-30 14:00:24.944 E/GeckoCrashHandler(  762):     android.os.MessageQueue.next(MessageQueue.java:132)
14:02:08     INFO -  04-30 14:00:24.944 E/GeckoCrashHandler(  762):     android.os.Looper.loop(Looper.java:124)
14:02:08     INFO -  04-30 14:00:24.985 E/GeckoCrashHandler(  762):     android.app.ActivityThread.main(ActivityThread.java:5103)
14:02:08     INFO -  04-30 14:00:24.985 E/GeckoCrashHandler(  762):     java.lang.reflect.Method.invokeNative(Native Method)
14:02:08     INFO -  04-30 14:00:24.994 E/GeckoCrashHandler(  762):     java.lang.reflect.Method.invoke(Method.java:525)
14:02:08     INFO -  04-30 14:00:24.994 E/GeckoCrashHandler(  762):     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
14:02:08     INFO -  04-30 14:00:25.004 E/GeckoCrashHandler(  762):     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
14:02:08     INFO -  04-30 14:00:25.004 E/GeckoCrashHandler(  762):     dalvik.system.NativeStart.main(Native Method)


I have only found these two instances, both on fx-team after https://hg.mozilla.org/integration/fx-team/rev/7552ffb7bd0c (bug 1158309). :jchen - related?
Flags: needinfo?(nchen)
I would be more worried if it keeps happening.
Flags: needinfo?(nchen)
Failures in bug 1160560 are quite frequent now. I still think this was regressed by bug 1158309. Can you have a look?
Flags: needinfo?(nchen)
We now load Gecko sufficiently early that when the compositor first paints, the Java side may not have a selected tab yet (i.e. the initial tab hasn't been created on the Java side). I think this situation causes the NPE. This patch makes us ignore a null selected tab in setFirstPaintViewport. I think this is safe because once we do have a selected tab, we'll reset the viewport metrics again and everything should be back to normal?
Attachment #8601013 - Flags: review?(bugmail.mozilla)
Flags: needinfo?(nchen)
Summary: java.lang.NullPointerException at org.mozilla.gecko.gfx.GeckoLayerClient.setFirstPaintViewport(GeckoLayerClient.java:590) → Intermittent Android 4.3 PROCESS-CRASH | java-exception | java.lang.NullPointerException at org.mozilla.gecko.gfx.GeckoLayerClient.setFirstPaintViewport(GeckoLayerClient.java:590)
Comment on attachment 8601013 [details] [diff] [review]
Fix NPE due to no selected tab (v1)

Review of attachment 8601013 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8601013 - Flags: review?(bugmail.mozilla) → review+
See Also: → 1161547
https://hg.mozilla.org/mozilla-central/rev/ba45d78e7b80
Assignee: nobody → nchen
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
You need to log in before you can comment on or make changes to this bug.