You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by mv...@amadeus.net on 2001/10/30 13:53:45 UTC
Coredump when using XalanTransformer.transform()
Hello,
I am using Xalan ver. 1.2 and Xerces ver. 1.5. on HP-UX 11.00. I rebuilt
the libraries with the following options:
runConfigure -p hp-11 -c cc -x aCC -d -r pthread
gmake
I am running a multithreaded application (currently only 2 threads). Each
thread performs XSL transformation using the following code:
Each thread, after it has been created, calls the initialization:
XMLPlatformUtils::Initialize() ;
XalanTransformer::initialize() ;
before it stops, it does clean-up:
XalanTransformer::terminate() ;
XMLPlatformUtils::Terminate() ;
and in between repeatedly (some hundreds of times) performs transformation
using XalanTransformer class and memory streams:
XalanTransformer theTransformer ;
istrstream theXMLStream( x.GetOutMsg(), x.GetOutMsgLength() ) ;
istrstream theXSLStream( pMessage->GetXSL().IntBufNotNull(),
pMessage->GetXSL().Length() ) ;
ostrstream theOutStream ;
// ---- Set style sheet parameter "UID" equals to ulUID
theTransformer.setStylesheetParam( XalanDOMString(XSL_PARAM_UID),
XalanDOMString(svUID) ) ;
// ---- Perform Xalan transformation
if( theTransformer.transform( &theXMLStream, &theXSLStream, &theOutStream
) == 0 )
{
...
If the traffic is high, the application coredumps in call to the
transform() method. The stack is:
from transform() call to /opt/aCC/include/tree.cc (14 levels incl.
endElement and erase).
If I am running one thread, everything is alright - no coredump.
The stack:
erase(iterator&,iterator)
erase(iterator&,iterator,iterator)
erase(ElemTemplateElement *&)
endElement
endElement
scanEndTag
scanContent
scanDocument(InputSource&,?)
parse(InputSource&,?)
parseXMLStream(InputSource&,DocumentHandler&,XalanDOMString&)
parseXMLStream(InputSource&,DocumentHandler&,XalanDOMString&)
processStylesheet(XSLTInputSource&,StylesheetConstructionContext&)
...
process(XSLTInputSource&,XSLTInputSource&,XSLTResultTarget&)
My question is: Did I do anything wrong? Any help appreciated.
Thanks in advance, Miro.