Closed
Bug 1293595
Opened 9 years ago
Closed 9 years ago
Crash in java.lang.NullPointerException: at org.mozilla.gecko.BrowserApp.onAttachedToWindow(BrowserApp.java)
Categories
(Firefox for Android Graveyard :: General, defect, P1)
Tracking
(firefox51 fixed)
RESOLVED
FIXED
Firefox 51
| Tracking | Status | |
|---|---|---|
| firefox51 | --- | fixed |
People
(Reporter: sebastian, Assigned: ahunt)
Details
(Keywords: crash, Whiteboard: [TPE-1][MobileAS])
Crash Data
Attachments
(1 file)
This bug was filed from the Socorro interface and is
report bp-574fbead-c16b-4a44-8201-7beb72160803.
=============================================================
> java.lang.NullPointerException
> at org.mozilla.gecko.BrowserApp.onAttachedToWindow(BrowserApp.java:975)
> at android.support.v7.internal.view.WindowCallbackWrapper.onAttachedToWindow(Unknown Source)
> at com.android.internal.policy.impl.PhoneWindow$DecorView.onAttachedToWindow(PhoneWindow.java:2469)
> [..]
| Assignee | ||
Comment 1•9 years ago
|
||
Based on the most recent reports, this seems to be happening at:
mDoorhangerOverlay.setVisibility(View.VISIBLE);
I don't see how this would happen unless the layout hasn't been inflated yet, in this case layout inflation happens in GeckoApp.onCreate(). There don't seem to be any guarantees about onAttachedToWindow happening before or after onCreate, if it happens before onCreate, we don't have a layout, and findViewById will return null. (That does however seem implausible, shouldn't onCreate be one of the first calls?)
Looking back at the history: it looks like we wanted to show this doorhanger on all devices except 2.3, but nowadays we show the doorhanger on all supported devices - so we should just set it to visible in the layout, and not flip the visibility in code:
https://hg.mozilla.org/mozilla-central/diff/5a706e4cc1f0/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java#l1.12
Assignee: nobody → ahunt
| Assignee | ||
Comment 2•9 years ago
|
||
We still need to set mDoorHangerOverlay for other parts of BrowserApp, but we can findViewById() it during onCreate instead of onAttachedToWindow, which seems more standard / reliable?
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Whiteboard: [TPE-1] → [TPE-1][MobileAS]
| Reporter | ||
Comment 4•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8782982 [details]
Bug 1293595 - Make doorhanger overlay visible by default, and retrieve it during onCreate
https://reviewboard.mozilla.org/r/72976/#review71352
Attachment #8782982 -
Flags: review?(s.kaspari) → review+
Pushed by ahunt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fcdac0d4b2d5
Make doorhanger overlay visible by default, and retrieve it during onCreate r=sebastian
| Reporter | ||
Updated•9 years ago
|
Flags: needinfo?(ahunt)
Comment 7•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
Updated•9 years ago
|
Iteration: --- → 1.3
Updated•5 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
•