Closed
Bug 1271318
Opened 8 years ago
Closed 8 years ago
Application context within GeckoNetworkManager is unexpectedly null
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(firefox48 unaffected, firefox49blocking fixed)
RESOLVED
FIXED
Firefox 49
Tracking | Status | |
---|---|---|
firefox48 | --- | unaffected |
firefox49 | blocking | fixed |
People
(Reporter: Grisha, Assigned: Grisha)
References
Details
Crash Data
Attachments
(1 file)
Bug 1271020 shows that somehow applicationContext is null at a point in time when it can't be null! How can this be so? Are we making wrong assumptions in this class or elsewhere.
Pre-rewrite version of GeckoNetworkManager was performing the same null-check for activityContext, so this doesn't seem like something new (need to double-check this assumption).
Comment 1•8 years ago
|
||
GeckoNetworkManager (and GeckoBatteryManager) should use GeckoAppShell.getApplicationContext() to get the app context, instead of keeping track of the app context themselves.
Comment 2•8 years ago
|
||
(In reply to :Grisha Kruglov from comment #0)
> Bug 1271020 shows that somehow applicationContext is null at a point in time
> when it can't be null! How can this be so? Are we making wrong assumptions
> in this class or elsewhere.
>
> Pre-rewrite version of GeckoNetworkManager was performing the same
> null-check for activityContext, so this doesn't seem like something new
> (need to double-check this assumption).
From my experiences while working on Bug 1264815, I believe this is because: the `applicationContext` of those managers is not initialized properly when starting GeckoService instances in background; and recent progress on Android Push Notifications makes such starts more common.
Assignee | ||
Comment 3•8 years ago
|
||
Assignee | ||
Comment 4•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/52978/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52978/
Attachment #8753065 -
Flags: review?(s.kaspari)
Assignee | ||
Updated•8 years ago
|
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoNetworkManager.updateNetworkStateAndConnectionType(GeckoNetworkManager.java)]
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → gkruglov
Status: NEW → ASSIGNED
Comment 5•8 years ago
|
||
Important crash, tracking.
status-firefox49:
--- → affected
tracking-firefox49:
--- → blocking
status-firefox48:
--- → unaffected
Comment 6•8 years ago
|
||
Comment on attachment 8753065 [details]
MozReview Request: Bug 1271318 - Don't keep context in GeckoNetworkManager, and get it from GeckoAppShell r=sebastian
https://reviewboard.mozilla.org/r/52978/#review50170
Assuming the methods of GeckoNetworkManager are not called before GeckoAppShell is initialized (which I think makes sense - it happens in GeckoApp.onCreate), this sounds good to me.
Attachment #8753065 -
Flags: review+
Updated•8 years ago
|
Attachment #8753065 -
Flags: review?(s.kaspari)
Assignee | ||
Comment 7•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/a4491cec2aa404caba9eee49657b62acaf9335f4
Bug 1271318 - Don't keep context in GeckoNetworkManager, and get it from GeckoAppShell r=mcomella
Comment 8•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Updated•4 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
•