XPCOMUtils.jsm throws "i is undefined" error



10 years ago
10 years ago


(Reporter: ronkillmer1, Unassigned)


Windows Vista

Firefox Tracking Flags

(Not tracked)




10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20080702 Firefox/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b1pre) Gecko/20080920032910 Shredder/3.0b1pre

Error console reports error on line 115 which is:
    return makeQI([i.name for each(i in interfaces)]);

var XPCOMUtils = {
   * Generate a QueryInterface implementation. The returned function must be
   * assigned to the 'QueryInterface' property of a JS object. When invoked on
   * that object, it checks if the given iid is listed in the |interfaces|
   * param, and if it is, returns |this| (the object it was called on).
  generateQI: function(interfaces) {
    return makeQI([i.name for each(i in interfaces)]);

Reproducible: Always

Steps to Reproduce:
1. Start Shredder
2. Open Console
3. Read errors list

Comment 1

10 years ago
If this is a core component please edit fields as needed.  

Requesting Wanted for Tb 3.0
Flags: wanted-thunderbird3?
Version: unspecified → Trunk

Comment 2

10 years ago
This error happens if someone tries to register a component for an interface that doesn't exist. Do you have any extensions installed? Is there a regression range here? I haven't seen any js components land in the last few days.

Could potentially be fall-out from backing out the folder-lookup-service, if that js-component didn't get removed on a nightly update.

Comment 3

10 years ago
(In reply to comment #2)
> This error happens if someone tries to register a component for an interface
> that doesn't exist. Do you have any extensions installed? Is there a regression
> range here? I haven't seen any js components land in the last few days.
I have been seeing this for a while, it's not new to the build is installed today.

Given this info I will back out the 4 extensions and re-check. I all ready un-installed two, Mail Tweak had error reports. Address Context, I suspecting a conflict with a new Abook feature.

Comment 4

10 years ago
Seems the trigger is related to use of Add-ons Manager. On a restart to disable an extension the error is reported. Another restart and it is not listed.

Comment 5

10 years ago
May be related, I also get this in the console of the 9/22 build.

Failed to load XPCOM component: C:\Program Files\Mozilla Nighthawk\components\folderLookupService.js
I seem to recall thinking that this was coming from the storageLegacy stuff.
Someone is misusing the XPCOMUtils API.  At least that's what I read on irc from someone (gavin maybe?)

Comment 8

10 years ago
I am seeing the errors only with enable/disable of any extension, even those that are 3.0 compatible, i.e. Not forced by NTT. I uninstalled Simply Green and deactivated a plugin with no logged errors. 

On the surface this points to the Add-ons Managers Extensions processing.
The error is caused by passing undefined to XPCOMUtils.generateQI. One common reason this can happen is failing to package the appropriate XPT, though offhand I don't see any cases of this in Thunderbird code:


as far as I can tell all are interfaces for which the appropriate XPT is packaged in http://mxr.mozilla.org/comm-central/source/mail/installer/windows/packages-static (addrbook.xpt).

The EM xpt (extensions.xpt) is also packaged. Given Ronald's latest steps to reproduce, I suppose it could be caused by some strange component registration hiccup related to EM restart, or something like that. That would obviously be harder to debug. You might try adding something like:

if (interfaces.some(function (i) !i)) {
var f=Components.stack; while(f) { Components.utils.reportError(f); f = f.caller;}

to XPCOMUtils.jsm's generateQI so that you can see where the faulty call to generateQI is coming from.

Comment 10

10 years ago
I tested Shredder 3.0a2, Gecko 1.9.0.x and did not get this error.
We seem to have picked this up since the Tb migration to Gecko 1.9.1 trunk.


10 years ago
Depends on: 398889
This is just the result of installing or updating through one of the five or six nightlies when folderLookupService.js was in the tree - it'll go away when kill-rdf relands it, and in the meantime when it bothers you, you can just delete it (or delete the whole install directory and do a fresh install). Putting it in removed-files.in just until then doesn't really seem worth it, at this point.
Last Resolved: 10 years ago
Flags: wanted-thunderbird3?
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.