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

VERIFIED FIXED in Firefox 54

Status

()

P1
critical
VERIFIED FIXED
2 years ago
2 years ago

People

(Reporter: njn, Assigned: ahunt)

Tracking

({crash})

unspecified
Firefox 54
Unspecified
Android
crash
Points:
---

Firefox Tracking Flags

(firefox52 unaffected, firefox53 unaffected, firefox54 verified)

Details

(Whiteboard: [MobileAS], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
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)
(Assignee)

Comment 1

2 years ago
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 hidden (mozreview-request)

Comment 3

2 years ago
mozreview-review
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+
Comment hidden (mozreview-request)
This is the #2 topcrash for Android Nightly of 20170223110225.
Flags: needinfo?(ahunt)
(Assignee)

Comment 6

2 years ago
It turns out the breaking test was preexisting, that's being fixed in Bug 1341527, so I'm landing this now.
Flags: needinfo?(ahunt)

Comment 7

2 years ago
Pushed by kwierso@gmail.com:
https://hg.mozilla.org/mozilla-central/rev/ea22d7caa618
Don't rely on SuggestedSites being loaded r=sebastian

Comment 8

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ea22d7caa618
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox54: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
(Reporter)

Comment 9

2 years ago
This crash is present in Nightly 20170224110130 but gone in Nightly 20170225110158. Thank you for the fix.
Status: RESOLVED → VERIFIED
Blocks: 1320775
status-firefox52: --- → unaffected
status-firefox53: --- → unaffected
status-firefox54: fixed → verified
You need to log in before you can comment on or make changes to this bug.