java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$<n>.run(GeckoApp.java)

RESOLVED FIXED in Firefox 17

Status

()

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

People

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

Tracking

({crash, regression})

17 Branch
Firefox 18
ARM
Android
crash, regression
Points:
---

Firefox Tracking Flags

(firefox17 fixed)

Details

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

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
There's one crash in 17.0a1/20120801: bp-f938e0f1-2984-4eca-9072-deb3a2120801.

java.lang.NullPointerException
	at org.mozilla.gecko.GeckoApp$8.run(GeckoApp.java:1018)
	at android.os.Handler.handleCallback(Handler.java:615)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4896)
	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:788)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
	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%248.run%28GeckoApp.java%29
Happened at this line: http://hg.mozilla.org/mozilla-central/file/582d4c67b3a7/mobile/android/base/GeckoApp.java#l1018

Presumably the char encoding menu item wasn't found?
(Assignee)

Comment 2

5 years ago
Is it sufficient to check that menu isn't null above this line? It looks like we're setting mMenu in onCreateOptionsMenu, then inflating the layout inside it afterwards, so maybe this Runnable is running in between those two things happening.

http://hg.mozilla.org/mozilla-central/file/582d4c67b3a7/mobile/android/base/GeckoApp.java#l448
This could happen for webapps which does not have the "char encoding" menu item.
(Reporter)

Comment 4

5 years ago
There's spike in crashes starting from 17.0a1/20120824101755. The regression range for the spike is:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5650196a8c7d&tochange=f2146a6c104e
Keywords: regression
Whiteboard: [native-crash] → [native-crash][startupcrash]
Version: Trunk → Firefox 17
(Reporter)

Comment 5

5 years ago
More reports also at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.gecko.GeckoApp%244.run%28GeckoApp.java%29
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$8.run(GeckoApp.java)] → [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$8.run(GeckoApp.java)] [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$4.run(GeckoApp.java)]
Summary: java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$8.run(GeckoApp.java) → java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$<n>.run(GeckoApp.java)
(Assignee)

Comment 6

5 years ago
Created attachment 655776 [details] [diff] [review]
move character encoding menu logic to BrowserApp

There may have been a recent spike because of the increase in WebApps testing.

Unfortunately, I wasn't able to reproduce the crash, so this is a speculative fix, but I think it's something we should do anyway.
Assignee: nobody → margaret.leibovic
Attachment #655776 - Flags: review?(sriram)
Comment on attachment 655776 [details] [diff] [review]
move character encoding menu logic to BrowserApp

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

Looks good to me as per https://bugzilla.mozilla.org/show_bug.cgi?id=779741#c3
Attachment #655776 - Flags: review?(sriram) → review+
(Assignee)

Comment 8

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4a09ef58cba1
Target Milestone: --- → Firefox 18

Comment 9

5 years ago
https://hg.mozilla.org/mozilla-central/rev/4a09ef58cba1
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Updated

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

Comment 10

5 years ago
It's not fixed. See bp-fbdf67bc-943b-4ae5-82aa-4ca312120829.
Status: RESOLVED → REOPENED
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$8.run(GeckoApp.java)] [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$4.run(GeckoApp.java)] → [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$8.run(GeckoApp.java)] [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$4.run(GeckoApp.java)] [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp$3.run(G&hellip;
Resolution: FIXED → ---
(Assignee)

Comment 11

5 years ago
(In reply to Scoobidiver from comment #10)
> It's not fixed. See bp-fbdf67bc-943b-4ae5-82aa-4ca312120829.

This is a call to get a different menuitem:
http://hg.mozilla.org/mozilla-central/file/790fb17b1fe3/mobile/android/base/GeckoApp.java#l900

But the same idea applies. We should take a look through GeckoApp and move BrowserApp-depdendent menuitem logic over to BrowserApp.
(Assignee)

Comment 12

5 years ago
Created attachment 656546 [details] [diff] [review]
(Part 2) enable "Settings" menuitem in BrowserApp, not GeckoApp

This is the only other menu.findItem() call I see in GeckoApp, so I think we should be good after this.

I didn't realize it at first, but the events we register for in GeckoApp first get handled by BrowserApp's handleMessage, so I didn't need to change any (un)registerEventListener calls for this to work.
Attachment #656546 - Flags: review?(wjohnston)
Attachment #656546 - Flags: review?(wjohnston) → review+
(Assignee)

Comment 13

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/bad853c6b1e5
https://hg.mozilla.org/mozilla-central/rev/bad853c6b1e5
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 15

5 years ago
I think it should land in Aurora.
(Assignee)

Comment 16

5 years ago
Comment on attachment 655776 [details] [diff] [review]
move character encoding menu logic to BrowserApp

[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/28 
Risk to taking this patch (and alternatives if risky): low-risk, moving BrowserApp-specific logic out of GeckoApp
String or UUID changes made by this patch: n/a
Attachment #655776 - Flags: approval-mozilla-aurora?
(Assignee)

Comment 17

5 years ago
Comment on attachment 656546 [details] [diff] [review]
(Part 2) enable "Settings" menuitem in BrowserApp, not GeckoApp

[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/30 
Risk to taking this patch (and alternatives if risky): low-risk, moving BrowserApp-specific logic out of GeckoApp
String or UUID changes made by this patch: n/a
Attachment #656546 - Flags: approval-mozilla-aurora?

Updated

5 years ago
Attachment #655776 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Updated

5 years ago
Attachment #656546 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(Assignee)

Comment 18

5 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/6fb8111f50cb
https://hg.mozilla.org/releases/mozilla-aurora/rev/d3dd5f05978d
status-firefox17: affected → fixed
You need to log in before you can comment on or make changes to this bug.