Closed Bug 1352133 Opened 7 years ago Closed 6 years ago

Crash in java.lang.NullPointerException: Attempt to invoke virtual method ''java.lang.String org.mozilla.gecko.Tab.getMostRecentHomePanel()'' on a null object reference at org.mozilla.gecko.BrowserApp.hideBrowserSearch(BrowserApp.java)

Categories

(Firefox for Android Graveyard :: General, defect, P1)

All
Android
defect

Tracking

(fennec+, firefox57 wontfix, firefox58 fixed, firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
fennec + ---
firefox57 --- wontfix
firefox58 --- fixed
firefox59 --- fixed

People

(Reporter: jchen, Assigned: JanH)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file, 1 obsolete file)

This bug was filed from the Socorro interface and is 
report bp-fd3c7eb4-8384-4a76-9017-e77c42170329.
=============================================================

Looks like selected tab is null.
Flags: needinfo?(ahunt)
Since we are heavily working on tabs, we should look at this bug and fix it accordinately.
tracking-fennec: ? → +
Priority: -- → P1
What does P1 mean here?  It's been 3 months and this is still unassigned?
Flags: needinfo?(cnevinchen)
Sorry I wasn't pay enough attension to this bug.
Assignee: nobody → cnevinchen
Flags: needinfo?(cnevinchen)
Comment on attachment 8884778 [details]
Bug 1352133 - Check if selected tab is null when stop editing toolbar.

https://reviewboard.mozilla.org/r/155660/#review163498

::: mobile/android/base/java/org/mozilla/gecko/BrowserApp.java:3128
(Diff revision 1)
> -
> +        final Tab selectedTab = Tabs.getInstance().getSelectedTab();
> +        if (selectedTab != null) {
> -        // To prevent overdraw, the HomePager is hidden when BrowserSearch is displayed:
> +            // To prevent overdraw, the HomePager is hidden when BrowserSearch is displayed:
> -        // reverse that.
> +            // reverse that.
> -        showHomePager(Tabs.getInstance().getSelectedTab().getMostRecentHomePanel(),
> -                Tabs.getInstance().getSelectedTab().getMostRecentHomePanelData());
> +            final String mostRecentHomePanel = selectedTab.getMostRecentHomePanel();
> +            showHomePager(mostRecentHomePanel,
> +                    selectedTab.getMostRecentHomePanelData());
> +        }

Have you been able to reproduce this? What happens if we do not show a panel here?
Comment on attachment 8884778 [details]
Bug 1352133 - Check if selected tab is null when stop editing toolbar.

https://reviewboard.mozilla.org/r/155660/#review166162

See questions in bug.
Attachment #8884778 - Flags: review?(s.kaspari)
With bug 1426613 fixed, the STR from 1426613 comment 8 now give me this crash.

Alternative STR (that I think don't depend on bug 1426613 being fixed) are: Follow steps 1. - 7. from the above bug, then in step 8:
Type something in the URL bar to show the BrowserSearch, then delete it again or press the "X" button to return back to the home panels.

I think the right solution is to fall back to the default home panel if we can't get it from the current tab (because the current tab doesn't actually exist early during startup).
Assignee: cnevinchen → jh+bugzilla
Blocks: 1426613
Flags: needinfo?(andrzej)
Hardware: Unspecified → All
... that should be bug 1426613 comment 8.
No longer blocks: 1426613
See Also: → 1426613
Attachment #8884778 - Attachment is obsolete: true
Comment on attachment 8939019 [details]
Bug 1352133 - Handle selected tab not yet existing when exiting BrowserSearch.

https://reviewboard.mozilla.org/r/209456/#review215666

I can't reproduce but I think it's a working solution.
Attachment #8939019 - Flags: review?(cnevinchen) → review+
Pushed by mozilla@buttercookie.de:
https://hg.mozilla.org/integration/autoland/rev/73863c493315
Handle selected tab not yet existing when exiting BrowserSearch. r=nechen
Comment on attachment 8939019 [details]
Bug 1352133 - Handle selected tab not yet existing when exiting BrowserSearch.

[Feature/Bug causing the regression]: Awesomescreen
[User impact if declined]: Firefox could crash if the user interacts with the Awesomescreen before Firefox has opened any tabs.
[Is this code covered by automated tests?]: No.
[Has the fix been verified in Nightly?]: Tested locally.
[Needs manual test from QE? If yes, steps to reproduce]: No.
[List of other uplifts needed for the feature/fix]: Bug 1426864 and bug 1426613 are very similar crashes that might also happen along the same code path, i.e. if only one bug is fixed you might still crash because of one of the other bugs.
[Is the change risky?]: No.
[Why is the change risky/not risky?]: Just adding a null check before attempting to retrieve the last selected home panel - showHomePager itself can be safely called with a null panelId and will fall back to the default home panel in that case.
[String changes made/needed]: none
Attachment #8939019 - Flags: approval-mozilla-beta?
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/b5679bcdadf8
Handle selected tab not yet existing when exiting BrowserSearch. r=nechen
https://hg.mozilla.org/mozilla-central/rev/b5679bcdadf8
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Comment on attachment 8939019 [details]
Bug 1352133 - Handle selected tab not yet existing when exiting BrowserSearch.

Fix a crash related to Awesomescreen. Beta58+.
Attachment #8939019 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: