Closed Bug 1114621 Opened 10 years ago Closed 9 years ago

crash in java.lang.NullPointerException: Attempt to invoke interface method ''android.view.MenuItem android.view.Menu.add(int, int, int, java.lang.CharSequence)'' on a null object reference at android.view.MenuInflater$MenuState.addItem(MenuInflater.java)

Categories

(Firefox for Android Graveyard :: General, defect)

37 Branch
All
Android
defect
Not set
critical

Tracking

(fennec44+)

RESOLVED INVALID
Tracking Status
fennec 44+ ---

People

(Reporter: aaronmt, Assigned: sebastian)

References

Details

(Keywords: crash)

Crash Data

This bug was filed from the Socorro interface and is 
report bp-627535a1-2898-4165-8c88-d50982141221.
=============================================================

java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.Menu.add(int, int, int, java.lang.CharSequence)' on a null object reference
	at android.view.MenuInflater$MenuState.addItem(MenuInflater.java:492)
	at android.view.MenuInflater.parseMenu(MenuInflater.java:189)
	at android.view.MenuInflater.inflate(MenuInflater.java:110)
	at org.mozilla.gecko.GeckoApp.onCreateOptionsMenu(GeckoApp.java:326)
	at org.mozilla.gecko.BrowserApp.onCreateOptionsMenu(BrowserApp.java:2757)
	at android.app.Activity.onCreatePanelMenu(Activity.java:2820)
	at android.support.v4.app.FragmentActivity.onCreatePanelMenu(Unknown Source)
	at org.mozilla.gecko.GeckoApp.onCreatePanelMenu(GeckoApp.java:403)
	at org.mozilla.gecko.GeckoApp.getMenuPanel(GeckoApp.java:340)
	at org.mozilla.gecko.toolbar.BrowserToolbar.openOptionsMenu(BrowserToolbar.java:897)
	at org.mozilla.gecko.BrowserApp.openOptionsMenu(BrowserApp.java:2799)
	at org.mozilla.gecko.toolbar.BrowserToolbar$8.onClick(BrowserToolbar.java:360)
	at android.view.View.performClick(View.java:4756)
	at android.view.View$PerformClick.run(View.java:19749)
	at android.os.Handler.handleCallback(Handler.java:739)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:135)
	at android.app.ActivityThread.main(ActivityThread.java:5221)
	at java.lang.reflect.Method.invoke(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:372)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)
Blocks: 909434
Crash Signature: [@ java.lang.NullPointerException: Attempt to invoke interface method ''android.view.MenuItem android.view.Menu.add(int, int, int, java.lang.CharSequence)'' on a null object reference at android.view.MenuInflater$MenuState.addItem(MenuInflater.java)] → [@ java.lang.NullPointerException: Attempt to invoke interface method ''android.view.MenuItem android.view.Menu.add(int, int, int, java.lang.CharSequence)'' on a null object reference at android.view.MenuInflater$MenuState.addItem(MenuInflater.java)] [@ …
This seems to be not related to bug 909434.
No longer blocks: 909434
I can see exactly this error on a Gingerbread device after enabling the overflow menu there (bug 1209967) and clicking it.
I see this as #15 in 44, but not in the top 50 in 43/42.
Assignee: nobody → s.kaspari
tracking-fennec: ? → 44+
With my patch in bug 1209967 this happened because hasMenuButton() returned false and Versions.feature11Plus returned false. Our current menu inflation implementation does not handle this well. However I can't see how this could happen on a Moto X.
I can reproduce this on my N5 by installing the 2.3/Gingerbread build (-> feature11Plus will return false) on my N5 and pressing the menu button.

Brian: Can you check about:buildconfig if you have the 2.3/API9 build installed too?

Regarding the spike: Is this crash behavior new when installing the Gingerbread build? Should/can we prevent this? Do we not set maxSdkVersion to disable installation?
Flags: needinfo?(bnicholson)
(In reply to Sebastian Kaspari (:sebastian) from comment #6)
> Brian: Can you check about:buildconfig if you have the 2.3/API9 build
> installed too?

Ah, looks like that's it. Good catch!
Flags: needinfo?(bnicholson)
Invalid?
Depends on: 1119915
I think there's still a bug on Gingerbread (comment 3), though I don't know how far we are from the Gingerbread EOL.
We can close this one. The gingerbread bug (comment 3) only occurs with my WIP patches (bug 1209967). I am going to pick up bug 1119915.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.