Closed Bug 1317198 Opened 8 years ago Closed 8 years ago

Crash in java.lang.NullPointerException: Attempt to invoke virtual method ''int org.mozilla.gecko.Tab.getId()'' on a null object reference at org.mozilla.gecko.GeckoApp.onPause(GeckoApp.java)

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
critical

Tracking

(firefox52+ fixed, firefox53- fixed)

RESOLVED FIXED
Firefox 53
Tracking Status
firefox52 + fixed
firefox53 - fixed

People

(Reporter: sebastian, Assigned: droeh, Mentored)

References

Details

(Keywords: crash, Whiteboard: [TPE-1])

Crash Data

Attachments

(1 file, 1 obsolete file)

This bug was filed from the Socorro interface and is report bp-ddf12a38-15bc-4ecb-92b0-17c112161114. =============================================================
This seems to be caused by Bug 1305439, see the bottom of: https://hg.mozilla.org/mozilla-central/rev/fe3fe09d24c8
Depends on: 1305439
Mentor: ahunt
Attached patch Null-check the Tab (obsolete) (deleted) — Splinter Review
This just checks if the tab is null before attempting to update the lastSelectedTabId; I didn't think it was possible to hit GeckoApp.onPause() with Tabs.mSelectedTab still being null, but apparently I was mistaken.
Assignee: nobody → droeh
Status: NEW → ASSIGNED
Attachment #8810418 - Flags: review?(s.kaspari)
Comment on attachment 8810418 [details] [diff] [review] Null-check the Tab Review of attachment 8810418 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/GeckoApp.java @@ +2155,5 @@ > } > > + final Tab selectedTab = Tabs.getInstance().getSelectedTab(); > + if (selectedTab != null) { > + lastSelectedTabId = Tabs.getInstance().getSelectedTab().getId(); This probably should use 'selectedTab' instead of requesting it again?
Attachment #8810418 - Flags: review?(s.kaspari) → review+
Attached patch Null-check the Tab v1.1 (deleted) — Splinter Review
Yup, meant to use selectedTab there. The dangers of copy and paste :) Carrying over the r+.
Attachment #8810418 - Attachment is obsolete: true
Attachment #8811302 - Flags: review+
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0f8126c38179 Check if a tab is null before trying to get its id in GeckoApp.onPause() r=sebastian
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
1 instance of this crash has been spotted in aurora (52) too, we should probably uplift it?
[Tracking Requested - why for this release]: Adjusting flags - I think in Comment 8 Andrzej wanted to track for 52, not 53 where it is resolved fixed.
Comment on attachment 8811302 [details] [diff] [review] Null-check the Tab v1.1 Approval Request Comment [Feature/regressing bug #]:1305439 [User impact if declined]:Potential for crashes [Describe test coverage new/current, TreeHerder]:https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=0f8126c38179a6475b550ed97f0dfac42c4899b6 [Risks and why]: Low-risk, we just check if the selected tab is null and fall back to the old behavior if it is. [String/UUID change made/needed]:
Attachment #8811302 - Flags: approval-mozilla-aurora?
Comment on attachment 8811302 [details] [diff] [review] Null-check the Tab v1.1 fix possible fennec crash, take for aurora52
Attachment #8811302 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
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: