Closed Bug 1105290 Opened 5 years ago Closed 5 years ago

crash in java.lang.NullPointerException: at org.mozilla.search.providers.SearchEngineManager.createEngineFromFileList(SearchEngineManager.java)

Categories

(Firefox for Android :: General, defect, critical)

36 Branch
ARM
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 37
Tracking Status
firefox35 + fixed
firefox36 + fixed
firefox37 --- fixed
fennec 35+ ---

People

(Reporter: aaronmt, Assigned: Margaret)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-914cfed1-90e0-4c38-8dd8-080842141125.
=============================================================

java.lang.NullPointerException
	at org.mozilla.search.providers.SearchEngineManager.createEngineFromFileList(SearchEngineManager.java:368)
	at org.mozilla.search.providers.SearchEngineManager.access$500(SearchEngineManager.java:38)
	at org.mozilla.search.providers.SearchEngineManager$2.run(SearchEngineManager.java:165)
	at android.os.Handler.handleCallback(Handler.java:733)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:136)
	at org.mozilla.gecko.util.GeckoBackgroundThread.run(GeckoBackgroundThread.java:43)
OS: Mac OS X → Android
Hardware: x86 → ARM
Guessin' this is fallout from Bug 1091728.
Assignee: nobody → margaret.leibovic
Blocks: 1091728
Status: NEW → ASSIGNED
See Also: → 1105316
This should only ever happen if there's a malformed distribution directory structure, but that *can* happen (I reproduced it locally), so worth adding a null check here. I don't think the profile directory case should ever happen, but worth logging a helpful error rather than blowing up if it does.

Worth noting: This will prevent the crash, but it will still leave you without a useful search activity if we can't find a plugin file for your default engine (e.g. one set in a distribution preferences file). As a workaround, you could just change the search engine in your search settings, but we may want a follow-up for better error handling.
Attachment #8529242 - Flags: review?(rnewman)
Attachment #8529242 - Flags: review?(rnewman) → review+
https://hg.mozilla.org/mozilla-central/rev/27481c0aa57a
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
[Tracking Requested - why for this release]: related to search activity in 35
tracking-fennec: ? → 35+
Margaret, could you fill the uplift request to aurora & beta? Thanks
Comment on attachment 8529242 [details] [diff] [review]
Add null checks before calling createEngineFromFileList

Approval Request Comment
[Feature/regressing bug #]: search activity
[User impact if declined]: crash
[Describe test coverage new/current, TBPL]: no automated tests, landed on m-c
[Risks and why]: low-risk, adds some null checks to avoid crashes
[String/UUID change made/needed]: none
Attachment #8529242 - Flags: approval-mozilla-beta?
Attachment #8529242 - Flags: approval-mozilla-aurora?
Attachment #8529242 - Flags: approval-mozilla-beta?
Attachment #8529242 - Flags: approval-mozilla-beta+
Attachment #8529242 - Flags: approval-mozilla-aurora?
Attachment #8529242 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.