Closed Bug 435194 Opened 17 years ago Closed 15 years ago

nsExtensionManager.js: item is a null pointer

Categories

(Toolkit :: Add-ons Manager, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: david.waring, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9b5) Gecko/2008043010 Fedora/3.0-0.60.beta5.fc9 Firefox/3.0b5 Build Identifier: 1.9pre9 I noticed while trying to install extensions in Firefox 3b5 that the error console was reporting a problem of a null pointer in nsExtensionManager.js at line 3725. The extensions were also not showing up properly in the Add-ons dialog. The problem is that the _getActiveItems function doesn't check that the allItems array doesn't contain null objects. I fixed this on my system by adding "if (item == null) continue;" just before line 3725 ("var installLocation = this.getInstallLocation(item.id);"). This allowed the Firefox Add-ons manager to function properly. This may be indicative of a bigger problem, but this one line fix appears to sort the problem out. Reproducible: Always Steps to Reproduce: 1. In Firefox 3b5 open error console. 2. In Firefox 3b5 open Add-ons window. Actual Results: Error message about item being a null pointer in the error console which refers to /usr/lib64/xulrunner-1.9pre9/components/nsExtensionManager.js line 3725. Firefox indicates some extensions as disabled and fails to install new extensions. Expected Results: No error message in error console, enabled extensions are indicated as such and add-on installs work. This happened after an upgrade from Fedora 8 (firefox 2.0.0.14) to Fedora 9 (firefox 3 beta 5).
FWIW, I see this all the time on all three of my machines. It didn't seem to hurt much, so I didn't go digging, but it's something we should fix. David, can you attach your changes as a patch?
Status: UNCONFIRMED → NEW
Component: XULRunner → Extension/Theme Manager
Ever confirmed: true
Product: Toolkit → Firefox
QA Contact: xulrunner → extension.manager
Version: unspecified → Trunk
FWIW there are changes related to errors like this since 3.0b5 that may have already fixed this, as well as changes waiting to land in bug 433371.
After upgrading to Firefox 3.0 I still have the same problem. I've checked the CVS source and found that the var "item" is still not being checked for being null before getting used. I'm including a patch for this.
It would be better to make getItemList never return nulls, and even better to understand what problem is causing it to in the first place.
Product: Firefox → Toolkit
Blocks: 484044
No longer blocks: 484044
This code is gone and the problem was never understood.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: