The following comment has been added to this issue:

     Author: Paul Brun
    Created: Tue, 1 Jun 2004 8:08 AM
       Body:
OK....OK....I was to quick to submit this bug. I assumed the library was Thread Safe, 
however, I recently read through the FAQ that multiple threads require multiple 
exclusive when calling XMLPlatformUtils::Initialize and XMLPlatformUtils::Terminate. 
My application has two threads using the library where both are calling Initialize and 
Terminate at different intervals. I did not realize that these calls have 
ramifications across the whole process. So, if you terminate in one thread, making 
calls to any of the XMLString::transcode methods will result in a crash.

I modified my program to protect against this and everything appears to be working 
fine.

This can be closed without any further issues.

Paul
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1222?page=comments#action_35847

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1222

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1222
    Summary: Null Pointer Exception in XMLString::transcode(const char* const 
toTranscode)
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Xerces-C++
 Components: 
             Utilities
   Versions:
             2.5.0

   Assignee: 
   Reporter: Paul Brun

    Created: Tue, 1 Jun 2004 5:55 AM
    Updated: Tue, 1 Jun 2004 8:08 AM
Environment: Windows XP, Visual Studio.NET (The Xerces C++ library was re-built using 
this tool).

Description:
XStr classes that were given in in numerous examples for transcoding strings to their 
unicode form, I am constantly receiving a null pointer exception within the XMLString 
source code. The call stack points to line 597:

return gTranscoder->transcode(toTranscode);

and the gTranscoder pointer is null. From my understanding, this pointer should have 
been filled when calling the XMLPlatformUtils::Initialize method, right? Something is 
causing it to become NULL and I have yet to figure out what is causing this situation.

It is presently quasi-reproducible in the sense that it occurs and stops my 
application, however, it works for the first 10 calls or so to that function.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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

Reply via email to