Closed Bug 122138 Opened 23 years ago Closed 23 years ago

ASSERTION: getElementById(""), fix caller?: '!aId.IsEmpty()', file f:\build\mozilla\content\xul\document\src\nsXULDocument.cpp, line 3574

Categories

(Core :: XUL, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 123118

People

(Reporter: timeless, Assigned: timeless)

Details

(Keywords: assertion)

w32 cvs build from this morning
nsDebug::Assertion(const char * 0x0204214c, const char * 0x0204213c, const char 
* 0x02042100, int 3574) line 290 + 13 bytes
nsDebug::WarnIfFalse(const char * 0x0204214c, const char * 0x0204213c, const 
char * 0x02042100, int 3574) line 396 + 21 bytes
nsXULDocument::GetElementById(nsXULDocument * const 0x0293d038, const nsAString 
& {...}, nsIDOMElement * * 0x0012f838) line 3574 + 39 bytes
nsXULDocument::OverlayForwardReference::Resolve() line 6526 + 68 bytes
nsXULDocument::ResolveForwardReferences(nsXULDocument * const 0x0293d034) line 
2586 + 11 bytes
nsXULDocument::ResumeWalk() line 5932 + 22 bytes
nsXULDocument::EndLoad(nsXULDocument * const 0x0293d030) line 1679 + 8 bytes
XULContentSinkImpl::DidBuildModel(XULContentSinkImpl * const 0x036d5da0, int 0) 
line 537
nsExpatDriver::DidBuildModel(nsExpatDriver * const 0x036d2a60, unsigned int 0, 
int 1, nsIParser * 0x036d5390, nsIContentSink * 0x036d5da0) line 842 + 23 bytes
nsParser::DidBuildModel(unsigned int 0) line 1385 + 41 bytes
nsParser::ResumeParse(int 1, int 1, int 1) line 1906
nsParser::OnStopRequest(nsParser * const 0x036d5394, nsIRequest * 0x036d64f0, 
nsISupports * 0x00000000, unsigned int 0) line 2516 + 21 bytes
nsJARChannel::OnStopRequest(nsJARChannel * const 0x036d64f4, nsIRequest * 
0x036d6184, nsISupports * 0x00000000, unsigned int 0) line 611 + 49 bytes
nsOnStopRequestEvent::HandleEvent() line 213
nsARequestObserverEvent::HandlePLEvent(PLEvent * 0x036cdbe4) line 116
PL_HandleEvent(PLEvent * 0x036cdbe4) line 590 + 10 bytes

nsForwardReference::Result nsXULDocument::OverlayForwardReference::Resolve()
    nsAutoString id;
    rv = mOverlay->GetAttr(kNameSpaceID_None, nsXULAtoms::id, id);
#ifdef DefineGetAttr
NS_IMETHODIMP
nsXULElement::GetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, nsIAtom*& 
aPrefix, nsAWritableString& aResult) const

    // Not found.
    aResult.Truncate();
    return NS_CONTENT_ATTR_NOT_THERE;
#ifdef defineAttrNotThere
http://lxr.mozilla.org/seamonkey/source/content/base/public/nsIContent.h#352
352 #define NS_CONTENT_ATTR_NOT_THERE \
353   NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_LAYOUT,1)
#endif
#endif
/*fix here:*/
    if (NS_FAILED(rv)) return eResolve_Error;
/*change to (NS_FAILED(rv) || rv==NS_CONTENT_ATTR_NOT_THERE) */
    nsCOMPtr<nsIDOMElement> domtarget;
/*we assert here:*/
    rv = mDocument->GetElementById(id, getter_AddRefs(domtarget));
    if (NS_FAILED(rv)) return eResolve_Error;
Dammit, timeless, how many times do I have to nag you to cc: people and put an
intelligible English-language summary and first comment in the bug?  And how
about a diff -u patch, not a pinched-looking code excerpt?  I know this bug is
real, but I seriously doubt hyatt will leap to fix it given the cryptic summary
and lack of a patch.

/be
Assignee: hyatt → timeless
Keywords: assertion
well it turns out that the code suggestion i made was wrong. and there's no way i could have picked rginda as a cc to tell me that i should have chained positively instead of negatively.

brendan/rginda please verify

*** This bug has been marked as a duplicate of 123118 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified
Status: RESOLVED → VERIFIED
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.