DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21987>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21987

Assertion failed: theString != 0,  XalanDOMString.cpp, line 115  in 
xalanc_1_6::XPathExceptionFunctionNotAvailable::XPathExceptionFunctionNotAvailable

           Summary: Assertion failed: theString != 0,  XalanDOMString.cpp,
                    line 115  in
                    xalanc_1_6::XPathExceptionFunctionNotAvailable::XPathExc
                    eptionFunctionNotAvailable
           Product: XalanC
           Version: 1.6
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If "the specified function is not available: <namespace:func_name>"
  for 'in memory' stored document (document with getSystemId()==0)
then
  Assertion failed: theString != 0,
  file H:\src\xml.apache.org\xml-xalan\c\src\xalanc\XalanDOM\XalanDOMString.cpp, 
line 115


xalanc/XSLT/ElemTemplateElement.cpp:line 957-960
(ElemTemplateElement::LocatorProxy::getSystemId();
  //routine LocatorProxy::getSystemId() - returns 0  for
  //in memory stored documents:
  if (length(theURI) == 0)
      return 0;

and this null pointer has been passed to XalanDOMString constructor
when XPathExceptionFunctionNotAvailable instance created.

//////////// CODE //////////////////////////////////

#include <iostream>
#include <sstream>

#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/sax/AttributeList.hpp>

#include <xalanc/Include/PlatformDefinitions.hpp>
#include <xalanc/XMLSupport/FormatterToNull.hpp>
#include <xalanc/XalanTransformer/XalanTransformer.hpp>

int
main(int argc,const char* /* argv */[]) {
  XALAN_USING_STD(cout)
  XALAN_USING_STD(cerr)
  XALAN_USING_STD(endl)

  XALAN_USING_XERCES(XMLPlatformUtils)
  XALAN_USING_XALAN(XalanTransformer)

  XMLPlatformUtils::Initialize();
  XalanTransformer::initialize();
  {
    XalanTransformer    theXalanTransformer;

    std::stringstream xml("<?xml version='1.0'?><empty/>");
    std::stringstream xsl("<?xml version='1.0'?>\n"
          "<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' 
version='1.0'\n"              
                  "             xmlns:sc='http://www.billing.
ru/NotImplemented/'>\n"
          "  <xsl:template match='*'>\n"
          "  <xsl:value-of select='sc:get_variable(\"NAME1\")'/>\n"
          "  </xsl:template>\n"
          "</xsl:stylesheet>\n");
    cerr<<xsl.str();
    if ( theXalanTransformer.transform(xml, xsl, cout) != 0)
      cerr << " Error: \n" << theXalanTransformer.getLastError()<< endl;

  }
  XalanTransformer::terminate();
  XMLPlatformUtils::Terminate();
  XalanTransformer::ICUCleanUp();

  return 0;
}

//////////// CODE //////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
///////////////////////////////
Call Stack:

_NMSG_WRITE(int 10) line 221
abort() line 44 + 7 bytes
_assert(void * 0x009d1270, void * 0x009d1224, unsigned int 115) line 267
xalanc_1_6::XalanDOMString::XalanDOMString(const unsigned short * 0x00000000, 
unsigned int 4294967295) line 115 + 26 bytes
xalanc_1_6::XSLException::XSLException(const xercesc_2_3::Locator & {...}, const 
xalanc_1_6::XalanDOMString & {...}, const xalanc_1_6::XalanDOMString & {...}) 
line 96 + 96 bytes
xalanc_1_6::XalanXPathException::XalanXPathException(const xercesc_2_3::Locator 
& {...}, const xalanc_1_6::XalanDOMString & {...}, const xalanc_1_6::XalanNode * 
0x00000000, const xalanc_1_6::XalanDOMString & {...}) line 102 + 34 bytes
xalanc_1_6::XPathExceptionFunctionNotAvailable::
XPathExceptionFunctionNotAvailable(const xalanc_1_6::XalanDOMString & {...}, 
const xercesc_2_3::Locator & {...}) line 580 + 166 bytes
xalanc_1_6::XPathEnvSupportDefault::extFunction(xalanc_1_6::
XPathExecutionContext & {...}, const xalanc_1_6::XalanDOMString & {...}, const 
xalanc_1_6::XalanDOMString & {...}, xalanc_1_6::XalanNode * 0x011f8958, const 
_STL::vector<xalanc_1_6::XObjectPtr,_STL::allocator<xalanc_1_6::XObjectPtr> > & 
{_M_finish=150342595044 - _M_start=150342595040 : delta ???}, ...) line 462 + 19 
bytes
xalanc_1_6::XSLTProcessorEnvSupportDefault::extFunction(xalanc_1_6::
XPathExecutionContext & {...}, const xalanc_1_6::XalanDOMString & {...}, const 
xalanc_1_6::XalanDOMString & {...}, xalanc_1_6::XalanNode * 0x011f8958, const 
_STL::vector<xalanc_1_6::XObjectPtr,_STL::allocator<xalanc_1_6::XObjectPtr> > & 
{_M_finish=150342595044 - _M_start=150342595040 : delta ???}, ...) line 298 + 4
xalanc_1_6::StylesheetExecutionContextDefault::extFunction(const xalanc_1_6::
XalanDOMString & {...}, const xalanc_1_6::XalanDOMString & {...}, xalanc_1_6::
XalanNode * 0x011f8958, const _STL::vector<xalanc_1_6::XObjectPtr,_STL::
allocator<xalanc_1_6::XObjectPtr> > & {_M_finish=150342595044 - 
_M_start=150342595040 : delta ???}, const xercesc_2_3::Locator * 0x011e28d0) 
line 1843 + 55 b
xalanc_1_6::XPath::extfunction(xalanc_1_6::XalanNode * 0x011f8958, int 9, const 
xalanc_1_6::XalanDOMString & {...}, const xalanc_1_6::XalanDOMString & {...}, 
const _STL::vector<xalanc_1_6::XObjectPtr,_STL::allocator<xalanc_1_6::
XObjectPtr> > & {_M_finish=150342595044 - _M_start=150342595040 : delta ???}, 
xalanc_1_6::XPathExecutionContext & {...}) line 1848 + 40 bytes
xalanc_1_6::XPath::runExtFunction(xalanc_1_6::XalanNode * 0x011f8958, int 9, 
xalanc_1_6::XPathExecutionContext & {...}) line 2493 + 36 bytes
xalanc_1_6::XPath::executeMore(xalanc_1_6::XalanNode * 0x011f8958, int 2, 
xalanc_1_6::XPathExecutionContext & {...}, xalanc_1_6::FormatterListener & {...}
, void (const unsigned short *, const unsigned int)* 0x00570aff [thunk]:
`vcall'{4,{flat}}' ) line 1169 + 34 bytes
xalanc_1_6::XPath::executeMore(xalanc_1_6::XalanNode * 0x011f8958, int 0, 
xalanc_1_6::XPathExecutionContext & {...}, xalanc_1_6::FormatterListener & {...}
, void (const unsigned short *, const unsigned int)* 0x00570aff [thunk]:
`vcall'{4,{flat}}' ) line 1066
xalanc_1_6::XPath::execute(const xalanc_1_6::PrefixResolver & {...}, xalanc_1_6:
:XPathExecutionContext & {...}, xalanc_1_6::FormatterListener & {...}, void 
(const unsigned short *, const unsigned int)* 0x00570aff [thunk]:`vcall'{4,
{flat}}' ) line 739
xalanc_1_6::ElemValueOf::execute(xalanc_1_6::StylesheetExecutionContext & {...}) 
line 313
xalanc_1_6::ElemTemplateElement::executeChildren(xalanc_1_6::
StylesheetExecutionContext & {...}) line 289 + 17 bytes
xalanc_1_6::ElemTemplate::executeChildren(xalanc_1_6::StylesheetExecutionContext 
& {...}) line 223
xalanc_1_6::ElemTemplateElement::executeChildren(xalanc_1_6::
StylesheetExecutionContext & {...}, xalanc_1_6::XalanNode * 0x011f8958) line 315 
+ 17 bytes
xalanc_1_6::ElemTemplate::executeChildren(xalanc_1_6::StylesheetExecutionContext 
& {...}, xalanc_1_6::XalanNode * 0x011f8958) line 233
xalanc_1_6::ElemTemplateElement::transformChild(xalanc_1_6::
StylesheetExecutionContext & {...}, const xalanc_1_6::ElemTemplateElement & {...
}, const xalanc_1_6::ElemTemplateElement * 0x011de5a0, xalanc_1_6::XalanNode * 
0x011f8958, xalanc_1_6::XalanNode::NodeType ELEMENT_NODE) line 727 + 21 bytes
xalanc_1_6::ElemApplyTemplates::transformChild(xalanc_1_6::
StylesheetExecutionContext & {...}, const xalanc_1_6::ElemTemplateElement & {...
}, const xalanc_1_6::ElemTemplateElement * 0x00000000, xalanc_1_6::XalanNode * 
0x011f8958) line 206
xalanc_1_6::ElemForEach::transformSelectedChildren(xalanc_1_6::
StylesheetExecutionContext & {...}, const xalanc_1_6::ElemTemplateElement * 
0x00000000, const xalanc_1_6::NodeRefListBase & {...}, unsigned int 1) line 530 
+ 29 bytes
xalanc_1_6::ElemForEach::selectAndSortChildren(xalanc_1_6::
StylesheetExecutionContext & {...}, const xalanc_1_6::ElemTemplateElement * 
0x00000000, xalanc_1_6::NodeSorter * 0x00000000, int 3) line 468
xalanc_1_6::ElemApplyTemplates::selectAndSortChildren(xalanc_1_6::
StylesheetExecutionContext & {...}, const xalanc_1_6::ElemTemplateElement * 
0x00000000, xalanc_1_6::NodeSorter * 0x00000000, int 3) line 253
xalanc_1_6::ElemForEach::transformSelectedChildren(xalanc_1_6::
StylesheetExecutionContext & {...}, const xalanc_1_6::ElemTemplateElement * 
0x00000000) line 246 + 53 bytes
xalanc_1_6::ElemApplyTemplates::execute(xalanc_1_6::StylesheetExecutionContext & 
{...}) line 176
xalanc_1_6::ElemTemplateElement::executeChildren(xalanc_1_6::
StylesheetExecutionContext & {...}) line 289 + 17 bytes
xalanc_1_6::ElemTemplate::executeChildren(xalanc_1_6::StylesheetExecutionContext 
& {...}) line 223
xalanc_1_6::ElemTemplate::execute(xalanc_1_6::StylesheetExecutionContext & {...}
) line 212 + 17 bytes
xalanc_1_6::StylesheetRoot::process(xalanc_1_6::XalanNode * 0x011cc028, 
xalanc_1_6::XSLTResultTarget & {...}, xalanc_1_6::StylesheetExecutionContext & 
{...}) line 259 + 17 bytes
xalanc_1_6::XSLTEngineImpl::process(const xalanc_1_6::XSLTInputSource & {...}, 
const xalanc_1_6::XSLTInputSource & {...}, xalanc_1_6::XSLTResultTarget & {...}, 
xalanc_1_6::StylesheetConstructionContext & {...}, xalanc_1_6::
StylesheetExecutionContext & {...}) line 392
xalanc_1_6::XalanTransformer::doTransform(const xalanc_1_6::XalanParsedSource & 
{...}, const xalanc_1_6::XalanCompiledStylesheet * 0x00000000, const xalanc_1_6:
:XSLTInputSource * 0x0012fbc8, const xalanc_1_6::XSLTResultTarget & {...}) line 
1245
xalanc_1_6::XalanTransformer::transform(const xalanc_1_6::XalanParsedSource & {.
..}, const xalanc_1_6::XSLTInputSource & {...}, const xalanc_1_6::
XSLTResultTarget & {...}) line 198
xalanc_1_6::XalanTransformer::transform(const xalanc_1_6::XSLTInputSource & {...
}, const xalanc_1_6::XSLTInputSource & {...}, const xalanc_1_6::XSLTResultTarget 
& {...}) line 351 + 20 bytes
main(int 1, const char * * 0x00fa34c8) line 35 + 131 bytes
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e9ca90()

////////////////////////////////////////////////////////////////////////////////
///////


/*Local Fix:*/

H:\...ml.apache.org\xml-xalan\c\src\xalanc\PlatformSupport>cvs diff -iw 
XSLException.cpp
Index: XSLException.cpp
===================================================================
RCS file: /home/cvspublic/xml-xalan/c/src/xalanc/PlatformSupport/XSLException.
cpp,v
retrieving revision 1.1
diff -i -w -r1.1 XSLException.cpp
92c92
<       m_uri(theLocator.getSystemId()),
---
>       m_uri(theLocator.getSystemId()?theLocator.getSystemId():
XALAN_STATIC_UCODE_STRING("")),


But I don't know about other context of wrong getSystemId() usage.
There are several places look like that.
I am find their lines via grep command:
>grep -R -C 5 -n "getSystemId" * > getSystemId.grep
...
xalanc/XercesParserLiaison/XercesDocumentTypeBridge.cpp:369: return m_navigator.
getPooledString(m_xercesNode.getSystemId());
xml-xalan/c/Tests/Conf/conf.cpp:247: XalanDOMString(xmlInput.getSystemId()));
xml-xalan/c/Tests/InputSource/inputsource.cpp:262:      xslXalanNode.
setSystemId(xslStringSource.getSystemId());
xml-xalan/c/xdocs/sources/xalan/usagepatterns.xml:531: XalanDOMString(xmlInput.
getSystemId()));
...
and so on.

Best regards,
Valery.

Reply via email to