Last Comment Bug 781143 - java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp.onBackPressed(GeckoApp.java)
: java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp.onBackPressed(G...
Status: RESOLVED FIXED
[native-crash]
: crash
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: 15 Branch
: ARM Android
: -- critical (vote)
: Firefox 17
Assigned To: :Margaret Leibovic
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-08 05:31 PDT by Scoobidiver (away)
Modified: 2012-09-02 17:33 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
wontfix
fixed
fixed


Attachments
patch (1016 bytes, patch)
2012-08-09 12:26 PDT, :Margaret Leibovic
wjohnston2000: review+
bajaj.bhavana: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Scoobidiver (away) 2012-08-08 05:31:11 PDT
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
Comment 1 :Margaret Leibovic 2012-08-08 11:00:35 PDT
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.
Comment 2 :Margaret Leibovic 2012-08-09 12:26:15 PDT
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.
Comment 4 Ryan VanderMeulen [:RyanVM] 2012-08-09 19:56:40 PDT
https://hg.mozilla.org/mozilla-central/rev/2689e1c1883c
Comment 5 Aaron Train [:aaronmt] 2012-08-31 10:29:40 PDT
Channel uplift?
Comment 6 :Margaret Leibovic 2012-08-31 10:35:01 PDT
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
Comment 7 Scoobidiver (away) 2012-08-31 11:53:45 PDT
It's already in Aurora.
Comment 8 :Margaret Leibovic 2012-08-31 13:22:31 PDT
Comment on attachment 650641 [details] [diff] [review]
patch

Good call, I got confused.
Comment 9 bhavana bajaj [:bajaj] 2012-08-31 16:07:17 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.