Closed Bug 330010 Opened 14 years ago Closed 11 years ago

"ASSERTION: attempt to remove an element that was never added"

Categories

(Core :: XUL, defect)

PowerPC
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Loading the testcase triggers:

###!!! ASSERTION: attempt to remove an element that was never added: 'hep != nsnull && *hep != nsnull', file /Users/admin/trunk/mozilla/content/xul/document/src/nsElementMap.cpp, line 281

Before reducing, sometimes I also (or perhaps instead) saw the following assertion:

###!!! ASSERTION: aContent not in map: 'PL_DHASH_ENTRY_IS_BUSY(PL_DHashTableOperate(&mTable, aContent, PL_DHASH_LOOKUP))', file /Users/admin/trunk/mozilla/content/xul/templates/src/nsTemplateMap.h, line 83
Attached file testcase
I can't reproduce with the testcase in Bugzilla.  You'll have to save both files and fix the datasources="" reference to test.
Oops, forgot to CC Neil Deakin.
There are lots of silly assertions in the template builder code. This one has been there for years, and I'll probably remove it as part of bug 321169.
Depends on: 321169
Summary: ASSERTION: attempt to remove an element that was never added → "ASSERTION: attempt to remove an element that was never added" and "ASSERTION: aContent not in map"
Just to be sure I was blaming the right thing the second time around in bug 361627, this *is* the same thing we hit once per bookmark on the bookmarks toolbar while opening and closing Firefox's customize toolbars dialog, isn't it?
Summary: "ASSERTION: attempt to remove an element that was never added" and "ASSERTION: aContent not in map" → "ASSERTION: attempt to remove an element that was never added"
Attached file testcase 2 (zipped)
This testcase reliably triggers both assertions.  I can only reproduce when I load it from a local web server, though; I don't see the bug if I load it using the file:/// protocol.

Thanks to Gary Kwong for helping me make this testcase.
###!!! ASSERTION: attempt to remove an element that was never added: 'hep != nsnull && *hep != nsnull', file /Users/skywalker/Desktop/Mozilla/cvs/mozilla/content/xul/document/src/nsElementMap.cpp, line 281

This assertion is extremely highly reproducible simply by clicking "Customize" in Thunderbird's toolbar.

Tested using a debug build of Thunderbird 3.0a2pre, on Leopard.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Bug 344258 got rid of this assertion and the issue.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Still triggers "ASSERTION: aContent not in map".  I filed bug 468773 for that.
Flags: in-testsuite?
I added "testcase 2" as an HTTP crashtest.
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.