Closed Bug 881507 Opened 7 years ago Closed 7 years ago

java.lang.NoSuchMethodError: android.view.MenuItem.getActionProvider at org.mozilla.gecko.menu.GeckoMenu.onMenuItemClick(GeckoMenu.java)

Categories

(Firefox for Android :: General, defect, critical)

ARM
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 24
Tracking Status
firefox24 --- fixed

People

(Reporter: scoobidiver, Assigned: sriram)

Details

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

Crash Data

Attachments

(1 file, 1 obsolete file)

It has been hit three times in 24.0a1/20130610 by the same user on Honeycomb 3.1 (API version 12). Here is a crash report: bp-6b30ef6b-8b96-4f2a-8c0b-2df262130610.

It happens when accessing Tools according to comments.

java.lang.NoSuchMethodError: android.view.MenuItem.getActionProvider
	at org.mozilla.gecko.menu.GeckoMenu.onMenuItemClick(GeckoMenu.java:397)
	at org.mozilla.gecko.menu.GeckoMenuItem.onClick(GeckoMenuItem.java:395)
	at org.mozilla.gecko.menu.GeckoMenu.onItemClick(GeckoMenu.java:385)
	at android.widget.AdapterView.performItemClick(AdapterView.java:282)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1136)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:2628)
	at android.widget.AbsListView$1.run(AbsListView.java:3404)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:132)
	at android.app.ActivityThread.main(ActivityThread.java:4028)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:491)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NoSuchMethodError%3A+android.view.MenuItem.getActionProvider+at+org.mozilla.gecko.menu.GeckoMenu.onMenuItemClick%28GeckoMenu.java%29
Attached patch Patch (obsolete) — Splinter Review
ActionProviders are available only 14+. Hence covering the if condition with a nice little ( :sarcasm: ) Build.VERSION check. JIT is happy, users happy, so am I :D
Attachment #760637 - Flags: review?(mark.finkle)
Comment on attachment 760637 [details] [diff] [review]
Patch

We should consider pulling the "getActionProvider()" out into it's own function. I assume we could move it to GeckoMenuItem. What do you think?
That would require a new method, hasActionProvider() or something else. I can do that. I'm fine with the above approach too. The getActionProvider() won't called if the device is not a 14+ device.
Attached patch Patch: Option 2Splinter Review
Moving the condition inside GeckoMenuItem.
Attachment #761031 - Flags: review?(mark.finkle)
Comment on attachment 761031 [details] [diff] [review]
Patch: Option 2

Thanks
Attachment #761031 - Flags: review?(mark.finkle) → review+
Attachment #760637 - Attachment is obsolete: true
Attachment #760637 - Flags: review?(mark.finkle)
https://hg.mozilla.org/mozilla-central/rev/095b953d91b9
Assignee: nobody → sriram
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
You need to log in before you can comment on or make changes to this bug.