You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Mingfei Peng <mf...@excite.com> on 2000/09/21 12:24:28 UTC

XPath.dll access violation in MT context

When I use threadsafe.cpp to transform my sample XML/XSL files, if I set the
number of threads to about 20, I often get access violation in XPath.dll,
the call stack is:

------------------
>>>>  std::_Tree<XObject const *,XObject const *,std::set<XObject const
*,std::less<XObject const *>,std::allocator<XObject const *>
>::_Kfn,std::less<XObject const *>,std::allocator<XObject const *>
>::erase(...) line 341 + 80 bytes
>>>>  std::set<XObject const *,std::less<XObject const
*>,std::allocator<XObject const *> >::erase(std::_Tree<XObject const
*,XObject const *,std::set<XObject const *,std::less<XObject const
*>,std::allocator<XObject const *> >::_Kfn,std::less<XObject const
*>,std::allocator<XObject const *> >::iterator {...}) line 88 + 58 bytes
>>>>  XObjectFactoryDefault::doReturnObject(const XObject * 0x3e1355a0,
unsigned char 0) line 131 + 36 bytes
>>>>  XObjectFactory::returnObject(const XObject * 0x3e1355a0) line 107 + 40
bytes
>>>>  XObjectGuard::reset() line 458 + 34 bytes
>>>>  XObjectGuard::~XObjectGuard() line 398 + 25 bytes 

--------------------
The most common position is 	
	m_xobjects.erase(i);		
// in bool XObjectFactoryDefault::doReturnObject(const XObject* theXObject,
bool fInReset);	 		
sometimes it also occur	at   m_xobjects.find(theXObject);
// also in XObjectFactoryDefault::doReturnObject
		
But the error will never occur if I use single thread, so I wonder if there
is possible that XObjectFactoryDefault::m_xobjects be modified by other
threads.


If I use Rational Quantify to test, then only 2 threads will always cause
the error, but it is OK for single thread.





_______________________________________________________
Say Bye to Slow Internet!
http://www.home.com/xinbox/signup.html