Access Violation in MSXML 4.0 When MSXML Performs Transforms (318958)



The information in this article applies to:

  • Microsoft XML 4.0

This article was previously published under Q318958

SYMPTOMS

When Microsoft XML (MSXML) 4.0 performs transforms, MSXML may experience a random crash (access violation).

CAUSE

An internal part of an Extensible Style Sheet Language (XSL) variable is destroyed prematurely when XML cleans a stack frame. This occurs when XML cleans up a frame that evaluates the variable for the first time and that passes this variable as a parameter to a template.

RESOLUTION

A supported hotfix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next MSXML 4.0 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date              Time   Version     Size      File Name
   ----------------------------------------------------------
   12-February-2002  12:02  4.0.9412.0  1,229,824 Msxml4.dll
   12-February-2002  11:57  4.0.9412.0     44,544 Msxml4a.dll
   12-February-2002  12:15  4.0.9412.0     82,432 Msxml4r.dll
				

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

The following call stack typically appears when MSXML 4.0 crashes:

ChildEBP RetAddr
 00dfdeb0 788ce30b msxml4!ScopeGC::disallowRelease+0x6 [c:\xml\msxmlwr\core\base\base.hxx @ 513]
 00dfdecc 788cd8a7 msxml4!XEngineFrame::releaseScope+0x5b [c:\xml\msxmlwr\xslt\runtime\xengine.cxx @ 1243]
 00dfe384 788cca31 msxml4!XEngine::frame+0x147 [c:\xml\msxmlwr\xslt\runtime\xengine.cxx @ 759]
 00dfe878 7888a9e5 msxml4!XEngine::execute+0x361 [c:\xml\msxmlwr\xslt\runtime\xengine.cxx @ 165]
 00dfe918 7888ac97 msxml4!DOMProcessor::continueTransform+0x235 [c:\xml\msxmlwr\xml\om\domprocessor.cxx @ 1052]
 00dfe940 7888bbed msxml4!DOMProcessor::transformEvent+0x77 [c:\xml\msxmlwr\xml\om\domprocessor.cxx @ 1197]
 00dfe98c 11002f1e msxml4!DOMProcessor::transform+0x9d [c:\xml\msxmlwr\xml\om\domprocessor.cxx @ 1678]
					

Some templates with parameters cause an access violation during the Transform method. To reproduce this problem, you can use the following code and assign some value to the parameters before you call Transform:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:param name="s"/>
    <xsl:template match="/">
        <xsl:call-template name="t1"/>
        <xsl:value-of select="$s"/>
    </xsl:template>
    <xsl:template name="t1">
        <xsl:call-template name="t2">
            <xsl:with-param name="x" select="$s"/>
        </xsl:call-template>
    </xsl:template>
    <xsl:template name="t2">
        <xsl:param name="node" select="."/>
        <xsl:value-of select="substring($s,1)"/>
    </xsl:template>
</xsl:stylesheet>
				

Modification Type:MinorLast Reviewed:10/11/2005
Keywords:kbHotfixServer kbQFE kbbug kbfix kbQFE KB318958