Closed
Bug 1401871
Opened 7 years ago
Closed 7 years ago
Crash in java.lang.NullPointerException: Attempt to invoke interface method ''android.view.MenuItem android.view.MenuItem.setVisible(boolean)'' on a null object reference at org.mozilla.gecko.home.HomeFragment.onCreateContextMenu(HomeFragment.java)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox55 wontfix, firefox56 wontfix, firefox57 verified, firefox58 fixed)
VERIFIED
FIXED
Firefox 58
People
(Reporter: kanru, Assigned: jwu)
References
Details
(Keywords: crash, regression, Whiteboard: [FNC][SPT58.1][INT])
Crash Data
Attachments
(1 file)
59 bytes,
text/x-review-board-request
|
cnevinchen
:
review+
Sylvestre
:
approval-mozilla-beta+
|
Details |
This bug was filed from the Socorro interface and is report bp-2459e70c-a005-45da-9587-3270f0170918. ============================================================= Looks like a regression from bug 1329131 java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setVisible(boolean)' on a null object reference at org.mozilla.gecko.home.HomeFragment.onCreateContextMenu(HomeFragment.java:211) at android.view.View.createContextMenu(View.java:12533) at com.android.internal.view.menu.ContextMenuBuilder.showPopup(ContextMenuBuilder.java:100) at com.android.internal.policy.DecorView.showContextMenuForChildInternal(DecorView.java:822) at com.android.internal.policy.DecorView.showContextMenuForChild(DecorView.java:799) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.view.ViewGroup.showContextMenuForChild(ViewGroup.java:879) at android.widget.AbsListView.performLongPress(AbsListView.java:3250) at android.widget.AbsListView$CheckForLongPress.run(AbsListView.java:3161) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Flags: needinfo?(topwu.tw)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → topwu.tw
Flags: needinfo?(topwu.tw)
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8912134 [details] Bug 1401871 - Check if menu item(home_add_to_launcher) exists or not before accessing it. https://reviewboard.mozilla.org/r/183510/#review188800
Attachment #8912134 -
Flags: review?(cnevinchen) → review+
Pushed by nechen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6282e18a63f6 Check if menu item(home_add_to_launcher) exists or not before accessing it. r=nechen
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6282e18a63f6
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Comment 5•7 years ago
|
||
Does this need a Beta approval request?
Assignee | ||
Comment 6•7 years ago
|
||
Yes, we should uplift this to beta, but I just found a better solution that would make the code logic more clear. I would create a follow-up bug and file a patch soon.
Flags: needinfo?(topwu.tw)
Assignee | ||
Comment 7•7 years ago
|
||
Hi Ryan, Do we have to back out this patch to make the change in bug 1403437 can successfully be merged to beta without conflict?
Flags: needinfo?(ryanvm)
Comment 8•7 years ago
|
||
I don't see any reason why a patch from bug 1403437 would interfere with this one being uplifted to Beta. Sounds like it might be worth asking for uplift on that one too, though.
Flags: needinfo?(ryanvm)
Assignee | ||
Comment 9•7 years ago
|
||
Comment on attachment 8912134 [details] Bug 1401871 - Check if menu item(home_add_to_launcher) exists or not before accessing it. Approval Request Comment [Feature/Bug causing the regression]: A crash on new version (Android O) [User impact if declined]: App crash on Android O after launching. [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: Not yet [Needs manual test from QE? If yes, steps to reproduce]: Yes, here is the STR: 1. Launch Fennec on Android O, 2. Tap 3-dot menu button on top-right, 3. Tap 'Page' option button, 4. Make sure there is no 'Add to Home Screen' option, and app doesn't crash [List of other uplifts needed for the feature/fix]: None [Is the change risky?]: No [Why is the change risky/not risky?]: This patch only adds a null check to prevent NullPointerException. [String changes made/needed]: None
Attachment #8912134 -
Flags: approval-mozilla-beta?
Comment 10•7 years ago
|
||
Comment on attachment 8912134 [details] Bug 1401871 - Check if menu item(home_add_to_launcher) exists or not before accessing it. Fix a crash, taking it. Should be in 57b4
Attachment #8912134 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 11•7 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/06cffe71eae8
Comment 12•7 years ago
|
||
Verified as fixed on Beta 57.0b4. Device: Nexus 6P (Android 8.0)
Status: RESOLVED → VERIFIED
Updated•7 years ago
|
Whiteboard: [FNC][SPT58.1][INT]
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•