Closed Bug 1340957 Opened 7 years ago Closed 7 years ago

Crash in java.lang.NullPointerException: at org.mozilla.gecko.icons.preparation.SuggestedSitePreparer.initialise(SuggestedSitePreparer.java)

Categories

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

Unspecified
Android
defect

Tracking

(firefox52 unaffected, firefox53 unaffected, firefox54 verified)

VERIFIED FIXED
Firefox 54
Tracking Status
firefox52 --- unaffected
firefox53 --- unaffected
firefox54 --- verified

People

(Reporter: n.nethercote, Assigned: ahunt)

References

Details

(Keywords: crash, Whiteboard: [MobileAS])

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-496fd68b-0ce2-4cef-96e5-e31da2170220.
=============================================================

New crash, first showed up in Nightly 20170217110224. Bug 1320775 is the likely cause.

ahunt, can you please investigate?
Flags: needinfo?(ahunt)
It looks like we're trying to use suggested-sites before they've been initialised. They get loaded in BrowserApp.onCreate():
https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java#782

So I'm guessing we're trying to load favicons in some other scenario (i.e. outside of the usual browser activity). I'm not yet sure if we want to disable the new suggested icons in that scenario (they are needed primarily for the Activity Stream panel), or simply ensure that suggested sites are loaded when accessing them (i.e. load them without caring about the distribution if mSuggestedSites == null in LocalBrowserDB).
Iteration: --- → 1.16
Flags: needinfo?(ahunt)
Priority: -- → P1
Whiteboard: [MobileAS]
Comment on attachment 8839530 [details]
Bug 1340957 - Don't rely on SuggestedSites being loaded

https://reviewboard.mozilla.org/r/114150/#review116092

::: mobile/android/base/java/org/mozilla/gecko/icons/loader/SuggestedSiteLoader.java:59
(Diff revision 1)
>      private IconResponse buildIcon(final Context context, final String siteURL, final int targetSize) {
>          final SuggestedSites suggestedSites = BrowserDB.from(context).getSuggestedSites();
>  
> +        if (suggestedSites == null) {
> +            // See longer explanation in SuggestedSitePreparer: suggested sites aren't always loaded.
> +            // If they aren't, SuggestedSitePreparer won't suggeste any bundled icons so we should

typo: suggeste
Attachment #8839530 - Flags: review?(s.kaspari) → review+
This is the #2 topcrash for Android Nightly of 20170223110225.
Flags: needinfo?(ahunt)
It turns out the breaking test was preexisting, that's being fixed in Bug 1341527, so I'm landing this now.
Flags: needinfo?(ahunt)
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/mozilla-central/rev/ea22d7caa618
Don't rely on SuggestedSites being loaded r=sebastian
https://hg.mozilla.org/mozilla-central/rev/ea22d7caa618
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
This crash is present in Nightly 20170224110130 but gone in Nightly 20170225110158. Thank you for the fix.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.