Hey All,

I'm having an odd problem in the test suite. If I use a SAX2XMLReader
and set a content handler I get a segfault in my Xerces-C => Perl
transcoding class - all tests fail with a content handler set.

All other parsers work with no transcoding problems.

Before I go claiming this is Xerces-C bug, I need some help debugging
the issue further. I'm not a studly C++ programmer, so it is possible
I've made some obvious mistake. I need to run my thoughts by you
all...

background
--
My Xerces-P transcoding class is used internally by the whole Xerces-P
API to transcode Perl's UTF8 <=> Xerces-C's UTF16 (perl developers
never see it, only the C++ glue code uses it). It is uses the
singleton pattern with a static getInstance() method and a private
constructor so that any code that needs to transcode can just call
Transcoder::getInstance(). Internally it calls
XMLPlatformUtils::fgTransService->makeNewXMLTrancoder() and stores the
pointer.

problem
--
At the first call of the content handler startElement() method I need
to transcode the URI, and so it calls Transcoder::getInstance() and
then the transcoder->XMLString2perl() - which should invoke the
transcodeTo() method of the internal XMLTranscoder but instead I get a
segfault because the pointer to the internal XMLTranscoder is suddenly
corrupted.

But nowhere in my code to I reset the pointer in any way. I'd love
some ideas of how to debug this further.

Thanks! jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to