java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp.onBackPressed(GeckoApp.java)

RESOLVED FIXED in Firefox 16

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
5 years ago
9 months ago

People

(Reporter: Scoobidiver (away), Assigned: Margaret)

Tracking

({crash})

15 Branch
Firefox 17
ARM
Android
crash
Points:
---

Firefox Tracking Flags

(firefox15 wontfix, firefox16 fixed, firefox17 fixed)

Details

(Whiteboard: [native-crash], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
There are one crash in 17.0a1, one in 16.0a2 and it's #87 top crasher in 15.0b3. Here is a crash report: bp-c5e1c9c7-bf50-43fa-9c2c-e80582120808.

java.lang.NullPointerException
	at org.mozilla.gecko.GeckoApp.onBackPressed(GeckoApp.java:2525)
	at android.app.Activity.onKeyUp(Activity.java:2126)
	at android.view.KeyEvent.dispatch(KeyEvent.java:2575)
	at android.app.Activity.dispatchKeyEvent(Activity.java:2356)
	at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:1806)
	at android.view.ViewRootImpl.deliverKeyEventPostIme(ViewRootImpl.java:3365)
	at android.view.ViewRootImpl.deliverKeyEvent(ViewRootImpl.java:3326)
	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2488)
	at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:870)
	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2501)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4424)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.gecko.GeckoApp.onBackPressed%28GeckoApp.java%29
(Assignee)

Comment 1

5 years ago
It looks like this could happen if mDoorHangerPopup isn't initialized yet:
https://hg.mozilla.org/releases/mozilla-beta/file/tip/mobile/android/base/GeckoApp.java#l2517

We would be able to fix that with a null check.
(Assignee)

Comment 2

5 years ago
Created attachment 650641 [details] [diff] [review]
patch

It's possible the user could hit back before we call initializeChrome, so we should guard against that.
Assignee: nobody → margaret.leibovic
Attachment #650641 - Flags: review?(wjohnston)
Attachment #650641 - Flags: review?(wjohnston) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/2689e1c1883c
Target Milestone: --- → Firefox 17
https://hg.mozilla.org/mozilla-central/rev/2689e1c1883c
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Updated

5 years ago
status-firefox15: --- → affected
(Reporter)

Updated

5 years ago
status-firefox16: --- → affected
Channel uplift?
(Assignee)

Comment 6

5 years ago
Comment on attachment 650641 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): n/a
User impact if declined: crashes
Testing completed (on m-c, etc.): landed on m-c 8/9 
Risk to taking this patch (and alternatives if risky): low-risk null check 
String or UUID changes made by this patch: n/a
Attachment #650641 - Flags: approval-mozilla-beta?
Attachment #650641 - Flags: approval-mozilla-aurora?
(Reporter)

Comment 7

5 years ago
It's already in Aurora.
(Assignee)

Comment 8

5 years ago
Comment on attachment 650641 [details] [diff] [review]
patch

Good call, I got confused.
Attachment #650641 - Flags: approval-mozilla-aurora?
Comment on attachment 650641 [details] [diff] [review]
patch

Approving for beta as this has been on m-c for a while and aurora as well.
Attachment #650641 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
(Assignee)

Comment 10

5 years ago
https://hg.mozilla.org/releases/mozilla-beta/rev/2d8dbed6b9c1
status-firefox15: affected → wontfix
status-firefox16: affected → fixed
status-firefox17: --- → fixed
You need to log in before you can comment on or make changes to this bug.