Closed Bug 76600 Opened 24 years ago Closed 24 years ago

assertion in nsIOService when viewing a message with a <img> tag with no src

Categories

(MailNews Core :: Backend, defect)

x86
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: sspitzer, Assigned: pavlov)

References

Details

assertion in nsIOService when viewing a message with a <img> tag with no src spun off of bug #76200 NTDLL! 77f7629c() nsDebug::Assertion(const char * 0x016c03d4, const char * 0x016c03cc, const char * 0x016c0394, int 219) line 286 + 13 bytes nsDebug::WarnIfFalse(const char * 0x016c03d4, const char * 0x016c03cc, const char * 0x016c0394, int 219) line 392 + 21 bytes nsIOService::GetProtocolHandler(nsIOService * const 0x01523f30, const char * 0x00000000, nsIProtocolHandler * * 0x0012e9a8) line 219 + 32 bytes nsIOService::NewChannelFromURI(nsIOService * const 0x01523f30, nsIURI * 0x06efc4d4, nsIChannel * * 0x0012eab8) line 309 + 46 bytes imgLoader::LoadImage(imgLoader * const 0x023971d0, nsIURI * 0x06efc4d4, nsILoadGroup * 0x0475ed50, imgIDecoderObserver * 0x06efc600, nsISupports * 0x06f3d580, imgIRequest * * 0x02c9add4) line 117 + 69 bytes nsImageFrame::Init(nsImageFrame * const 0x02c9ad40, nsIPresContext * 0x06f3d580, nsIContent * 0x06eff6f0, nsIFrame * 0x053ce6e8, nsIStyleContext * 0x06efc6f0, nsIFrame * 0x00000000) line 303 + 111 bytes nsCSSFrameConstructor::InitAndRestoreFrame(nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, nsIContent * 0x06eff6f0, nsIFrame * 0x053ce6e8, nsIStyleContext * 0x06efc6f0, nsIFrame * 0x00000000, nsIFrame * 0x02c9ad40) line 6663 + 32 bytes nsCSSFrameConstructor::ConstructFrameByTag(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, nsIContent * 0x06eff6f0, nsIFrame * 0x053ce6e8, nsIAtom * 0x01551080 {"img"}, int 3, nsIStyleContext * 0x06efc6f0, nsFrameItems & {...}) line 4926 nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, nsIContent * 0x06eff6f0, nsIFrame * 0x053ce6e8, nsIAtom * 0x01551080 {"img"}, int 3, nsIStyleContext * 0x06efc6f0, nsFrameItems & {...}, int 0) line 7181 + 52 bytes nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, nsIContent * 0x06eff6f0, nsIFrame * 0x053ce6e8, nsFrameItems & {...}) line 7091 + 56 bytes nsCSSFrameConstructor::ProcessBlockChildren(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, nsIContent * 0x06effa80, nsIFrame * 0x053ce6e8, int 1, nsFrameItems & {...}, int 1) line 12385 + 37 bytes nsCSSFrameConstructor::ConstructBlock(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, const nsStyleDisplay * 0x06efae24, nsIContent * 0x06effa80, nsIFrame * 0x053ce610, nsIStyleContext * 0x06efc1b0, nsIFrame * 0x053ce6e8) line 12334 + 36 bytes nsCSSFrameConstructor::ConstructFrameByDisplayType(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, const nsStyleDisplay * 0x06efae24, nsIContent * 0x06effa80, nsIFrame * 0x053ce610, nsIStyleContext * 0x06efc1b0, nsFrameItems & {...}) line 6437 + 43 bytes nsCSSFrameConstructor::ConstructFrameInternal(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, nsIContent * 0x06effa80, nsIFrame * 0x053ce610, nsIAtom * 0x01550fd0 {"div"}, int 3, nsIStyleContext * 0x06efc1b0, nsFrameItems & {...}, int 0) line 7224 + 48 bytes nsCSSFrameConstructor::ConstructFrame(nsIPresShell * 0x06e78550, nsIPresContext * 0x06f3d580, nsFrameConstructorState & {...}, nsIContent * 0x06effa80, nsIFrame * 0x053ce610, nsFrameItems & {...}) line 7091 + 56 bytes nsCSSFrameConstructor::ContentAppended(nsCSSFrameConstructor * const 0x06e788e0, nsIPresContext * 0x06f3d580, nsIContent * 0x06ecdc30, int 0) line 8083 StyleSetImpl::ContentAppended(StyleSetImpl * const 0x06e7c720, nsIPresContext * 0x06f3d580, nsIContent * 0x06ecdc30, int 0) line 1241 PresShell::ContentAppended(PresShell * const 0x06e78558, nsIDocument * 0x06f14cf0, nsIContent * 0x06ecdc30, int 0) line 4724 + 46 bytes nsDocument::ContentAppended(nsDocument * const 0x06f14cf0, nsIContent * 0x06ecdc30, int 0) line 1537 nsHTMLDocument::ContentAppended(nsHTMLDocument * const 0x06f14cf0, nsIContent * 0x06ecdc30, int 0) line 1294 + 17 bytes HTMLContentSink::NotifyAppend(nsIContent * 0x06ecdc30, int 0) line 4574 SinkContext::FlushTags(int 1) line 2046 HTMLContentSink::CloseBody(HTMLContentSink * const 0x06f335a0, const nsIParserNode & {...}) line 2902 CNavDTD::CloseBody(const nsIParserNode * 0x02cc8058) line 3134 + 31 bytes CNavDTD::CloseContainer(const nsCParserNode * 0x02cc8058, nsHTMLTag eHTMLTag_body, int 0) line 3532 + 12 bytes CNavDTD::CloseContainersTo(int 1, nsHTMLTag eHTMLTag_body, int 0) line 3593 + 20 bytes CNavDTD::CloseContainersTo(nsHTMLTag eHTMLTag_body, int 0) line 3750 + 20 bytes CNavDTD::DidBuildModel(CNavDTD * const 0x06eccdf0, unsigned int 0, int 1, nsIParser * 0x06f211d0, nsIContentSink * 0x06f335a0) line 579 nsParser::DidBuildModel(unsigned int 0) line 1418 + 60 bytes nsParser::ResumeParse(int 1, int 1) line 1901 nsParser::OnStopRequest(nsParser * const 0x06f211d8, nsIRequest * 0x06f27a64, nsISupports * 0x06eaf5e0, unsigned int 0) line 2342 + 19 bytes nsDocumentOpenInfo::OnStopRequest(nsDocumentOpenInfo * const 0x06f268e0, nsIRequest * 0x06f27a64, nsISupports * 0x06eaf5e0, unsigned int 0) line 277 nsStreamConverter::OnStopRequest(nsStreamConverter * const 0x06f26830, nsIRequest * 0x06f27a64, nsISupports * 0x06eaf5e0, unsigned int 0) line 1013 nsDocumentOpenInfo::OnStopRequest(nsDocumentOpenInfo * const 0x06f25c60, nsIRequest * 0x06f27a64, nsISupports * 0x06eaf5e0, unsigned int 0) line 277 nsMsgProtocol::OnStopRequest(nsMsgProtocol * const 0x06f27a60, nsIRequest * 0x06f241c4, nsISupports * 0x06eaf5e0, unsigned int 0) line 271 + 88 bytes nsMailboxProtocol::OnStopRequest(nsMailboxProtocol * const 0x06f27a60, nsIRequest * 0x06f241c4, nsISupports * 0x06eaf5e0, unsigned int 0) line 204 nsOnStopRequestEvent::HandleEvent() line 159 nsARequestObserverEvent::HandlePLEvent(PLEvent * 0x06f24f14) line 64 PL_HandleEvent(PLEvent * 0x06f24f14) line 588 + 10 bytes PL_ProcessPendingEvents(PLEventQueue * 0x00a0ad80) line 518 + 9 bytes _md_EventReceiverProc(HWND__ * 0x00500352, unsigned int 49337, unsigned int 0, long 10530176) line 1069 + 9 bytes USER32! 77e71820() 00a0ad80()
isn't it invalid to have an <img> tag with no src= ? what should be done in this case?
it might also happen with <img src="foo.gif"> (relative links) in a mail message. I'd have to check.
no, <img> without src= is not valid. (Neither is <img> without alt=). And what we should do is assume the image is invalid. (Note. if src="" then it could be argued that that means "use the current page as the image" which would make sense in one rare case, namely if the page is an SVG document with an embedded <html:img> element...)
this assert will no longer happen. we just don't load the image if the src isn't available.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 76504 has been marked as a duplicate of this bug. ***
QA Contact: esther → stephend
We didn't assert with a trunk CVS pull (debug, windows 2k) using the following inserted code in the HTML message: <html> <head> </head> <body> test<br> <img> <br> </body> </html>
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.