xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lyle Coder" <x_co...@hotmail.com>
Subject XalanDOMString - thread issue
Date Thu, 01 Jan 1970 00:00:00 GMT
Hello,
This is a Xalan-C question
Please CC me on the reply.

I have multiple threads parsing XML documents creating DOMs to which I apply 
transformations.  After reading the FAqs, it was clear that I need per 
thread instances of XercesDOMSupport, XercesParserLiason and other 
Xerces/Xalan objects.

However, my threads hang (lock up) on creating XalanDOMStrings, which I am 
creating like this:
void dom_add_attribute(XalanElement *node, const char *oname, const char 
*ovalue)
{
    XalanDOMString ooname(oname);
    XalanDOMString oovalue(ovalue ? ovalue : "");

    node->setAttribute(ooname, oovalue);
}

XalanElement has been created from a document unique to that thread.  Under 
GDB I see that the threads hang in contention over the XalanDOMString 
constructor

What am I doing wrong?

Here is a back trace
#0  pthread_handle_sigrestart (sig=-1084230624) at pthread.c:750
#1  0x400304b9 in __pthread_wait_for_restart_signal (self=0xbf5ffc00)
    at pthread.c:896
#2  0x40032689 in __pthread_alt_lock (lock=0x407901f0, self=0x0)
    at restart.h:34
#3  0x4002e8b6 in __pthread_mutex_lock (mutex=0x407901e0) at mutex.c:107
#4  0x40485e0b in doTranscodeFromLocalCodePage (
    theSourceString=0x472386a8 "colspan", theSourceStringLength=7,
    theSourceStringIsNullTerminated=true, theTargetVector=@0xbf5ff608,
    terminate=true) at /usr/include/g++-2/stl_alloc.h:382
#5  0x40485f1f in TranscodeFromLocalCodePage (
    theSourceString=0x472386a8 "colspan", theTargetVector=@0xbf5ff608,
    terminate=true) at XalanDOM/XalanDOMString.cpp:732
#6  0x4048436c in XalanDOMString::XalanDOMString (this=0xbf5ff608,
    theString=0x472386a8 "colspan", theCount=4294967295)
    at XalanDOM/XalanDOMString.cpp:137
#7  0x8094f23 in dom_add_attribute (node=0x85af460,




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message