Closed Bug 6518 Opened 25 years ago Closed 25 years ago

crash loading XML file

Categories

(Core :: XML, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: nisheeth_mozilla)

References

()

Details

Attachments

(2 files)

The above page (I will attach the current version because I will likely change
it) crashes when I load it.  The crash started when I changed the MIME type
from text/html to text/xml because the script wasn't being recognized
properly.  (It's an XHTML file.)

I'll attach crash data from Norton CrashGuard (just a little more info than
standard Windows 95 stuff).
Bugzilla is having a problem with the attachment of the XML file.  See
bug 6519.
Status: NEW → ASSIGNED
Target Milestone: M7
Setting milestone to M7.  Accepting bug.
Bugzilla is now sending the XML correctly.  I can't verify that the attachment
does cause the crash, since I don't have access to Mozilla right now.  However,
it should, unless something very strange is happening.
The crash happens because the wrong DTD gets selected for parsing the XML
document.  Here is what happens.  First, the XML DTD returns eValidDetect when
its CanParse() method is called for the XML document because the DTD can
understand the content type "text/xml".  Then, the HTML DTD returns
ePrimaryDetect from its CanParse() method because the buffer contains the
"<html>" string.

It seems wrong to me that the HTML DTD can over-ride the XML DTD even thoughthe
content type of the document is text/xml.  So, my fix is to return
ePrimaryDetect from the CanParse() method of the XML DTD for the case when the
content type is text/xml.

Rick, do you agree?
Once I put the fix in, I no longer crash.  But, the CDATA sections in the
documents get displayed in the document as text instead of being put into
the content model as CDATA nodes.  I've filed a new bug 7499 to track that
problem and cc'd David.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I spoke to Harish about this and he agrees that this is the right way to fix
this.  I just checked in the fix.  Marking bug resolved.
*** Bug 6124 has been marked as a duplicate of this bug. ***
Status: RESOLVED → VERIFIED
Using 6/7 Apprunner, no crashes. Verifying bug fixed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: