Closed Bug 1697824 Opened 3 years ago Closed 3 years ago

Crash in [@ java.lang.NullPointerException: at org.mozilla.geckoview.GeckoSession$Window.passExternalWebResponse(GeckoSession.java)]

Categories

(GeckoView :: General, defect, P2)

Unspecified
Android

Tracking

(firefox87 wontfix, firefox88 fixed, firefox89 fixed)

RESOLVED FIXED
89 Branch
Tracking Status
firefox87 --- wontfix
firefox88 --- fixed
firefox89 --- fixed

People

(Reporter: fluffyemily, Assigned: agi)

Details

(Keywords: crash, Whiteboard: [geckoview:m89])

Crash Data

Attachments

(1 file)

Crash report: https://crash-stats.mozilla.org/report/index/f6573496-b7df-4e13-b189-7f36f0210311

Java stack trace:

java.lang.NullPointerException
	at org.mozilla.geckoview.GeckoSession$Window.passExternalWebResponse(GeckoSession.java:1)
	at org.mozilla.gecko.GeckoThread.runUiThreadCallback(Native Method)
	at org.mozilla.gecko.GeckoThread$1.run(GeckoThread.java:2)
	at android.os.Handler.handleCallback(Handler.java:790)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:192)
	at android.app.ActivityThread.main(ActivityThread.java:6738)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825)

Unredacted stack is

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.Reference.get()' on a null object reference
	at org.mozilla.geckoview.GeckoSession$Window.passExternalWebResponse(GeckoSession.java:1)
	at org.mozilla.gecko.GeckoThread.runUiThreadCallback(Native Method)
	at org.mozilla.gecko.GeckoThread$1.run(GeckoThread.java:2)
	at android.os.Handler.handleCallback(Handler.java:790)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:192)
	at android.app.ActivityThread.main(ActivityThread.java:6738)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:825)

About 250 crashes a day across all channels.

Whiteboard: [geckoview:m89]
Severity: -- → S3
Priority: -- → P2

Having a null WeakReference<> object is a little unexpected, to avoid confusion
we set mOwner to a WeakReference<>(null) value instead to avoid
a NullPointerException.

Assignee: nobody → agi
Status: NEW → ASSIGNED
Pushed by asferro@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9287b6f4f716
Don't clear GeckoSession.mOwner instance. r=esawin
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

Is this something we should uplift to Beta for 88? Please nominate if so :)

Flags: needinfo?(agi)

Comment on attachment 9213863 [details]
Bug 1697824 - Don't clear GeckoSession.mOwner instance.

Beta/Release Uplift Approval Request

  • User impact if declined: Some crashes when downloading files
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The patch makes sure we never null out a WeakReference object, very limited scope
  • String changes made/needed:
Flags: needinfo?(agi)
Attachment #9213863 - Flags: approval-mozilla-beta?

Comment on attachment 9213863 [details]
Bug 1697824 - Don't clear GeckoSession.mOwner instance.

Approved for Fenix 88.0.0-beta.6.

Attachment #9213863 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: