Last Comment Bug 972852 - Startup exceptions in AddonManager / XPIProvider
: Startup exceptions in AddonManager / XPIProvider
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Add-ons Manager (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla30
Assigned To: :Irving Reid (No longer working on Firefox)
:
: Andy McKay [:andym]
Mentors:
Depends on: 952543
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-14 06:46 PST by :Irving Reid (No longer working on Firefox)
Modified: 2014-02-19 12:41 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Handle extensions.ini exceptions and fix some log calls (9.88 KB, patch)
2014-02-14 13:42 PST, :Irving Reid (No longer working on Firefox)
dtownsend: review+
Details | Diff | Splinter Review

Description User image :Irving Reid (No longer working on Firefox) 2014-02-14 06:46:10 PST
The telemetry added in bug 952543 has recorded a few exceptions (in order of number of occurrences in the last three-ish weeks of Nightly builds):

305	{"message": "[Exception... \"Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setIntPref]\"  nsresult: \"0x8000ffff (NS_ERROR_UNEXPECTED)\"  location: \"JS frame :: resource://gre/modules/AddonManager.jsm :: AMI_startup :: line 503\"  data: no]", "module": "AMI", "context": "startup failed"}
75	{"context": "startup failed", "message": "ReferenceError: id is not defined", "module": "XPI", "line": 2407, "file": "resource://gre/modules/XPIProvider.jsm"}
14	{"message": "[Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFile.moveTo]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm -> resource://gre/modules/XPIProviderUtils.js :: XPIDB_writeAddonsList :: line 1481\"  data: no]", "module": "XPI", "context": "startup failed"}
7	{"message": "[Exception... \"Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]\"  nsresult: \"0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm -> resource://gre/modules/XPIProviderUtils.js :: XPIDB_writeAddonsList :: line 1481\"  data: no]", "module": "XPI", "context": "startup failed"}
5	{"context": "startup failed", "message": "ReferenceError: id is not defined", "module": "XPI", "line": 2415, "file": "resource://gre/modules/XPIProvider.jsm"}
4	{"context": "startup failed", "message": "ReferenceError: id is not defined", "module": "XPI", "line": 2423, "file": "resource://gre/modules/XPIProvider.jsm"}
2	{"message": "[Exception... \"Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.persistentDescriptor]\"  nsresult: \"0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm :: XPI_startup :: line 2072\"  data: no]", "module": "XPI-BOOTSTRAP", "context": "startup failed"}
1	{"message": "[Exception... \"Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.isDirectory]\"  nsresult: \"0x80520012 (NS_ERROR_FILE_NOT_FOUND)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm :: XPI_processPendingFileChanges/< :: line 2456\"  data: no]", "module": "XPI", "context": "startup failed"}
1	{"message": "[Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIFileOutputStream.write]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: resource://gre/modules/XPIProvider.jsm -> resource://gre/modules/XPIProviderUtils.js :: XPIDB_writeAddonsList :: line 1479\"  data: no]", "module": "XPI", "context": "startup failed"}
Comment 1 User image :Irving Reid (No longer working on Firefox) 2014-02-14 08:44:12 PST
The most common error:

[Exception... \"Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIPrefBranch.setIntPref]\"  nsresult: \"0x8000ffff (NS_ERROR_UNEXPECTED)\"  location: \"JS frame :: resource://gre/modules/AddonManager.jsm :: AMI_startup :: line 503\"  data: no]

Based on reading the code, the most likely cause for this is that the stored preferences file defines the 'extensions.blocklist.pingcountversion' pref to be something other than Int. I can't see anything else that would lead to this error.
Comment 2 User image :Irving Reid (No longer working on Firefox) 2014-02-14 13:42:43 PST
Created attachment 8376480 [details] [diff] [review]
Handle extensions.ini exceptions and fix some log calls

This should either fix or catch&log all the exceptions except the first (setIntPref).

We should do something better with the writeAddonsList() failures, but I'd prefer to leave that for when we convert it to async I/O.

In other news, I hate it when my warning-logging code throws. What's Latin for "Who exception-catches the exception-catchers?"
Comment 3 User image Ryan VanderMeulen [:RyanVM] 2014-02-19 08:41:51 PST
https://hg.mozilla.org/integration/fx-team/rev/f7f9328980d0
Comment 4 User image Ryan VanderMeulen [:RyanVM] 2014-02-19 12:41:39 PST
https://hg.mozilla.org/mozilla-central/rev/f7f9328980d0

Note You need to log in before you can comment on or make changes to this bug.