You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alberto Massari (JIRA)" <xe...@xml.apache.org> on 2004/12/07 17:12:16 UTC

[jira] Closed: (XERCESC-848) Deleting something returned by XMLString::transcode crashes when application is using the release build of Xerces-C++

     [ http://nagoya.apache.org/jira/browse/XERCESC-848?page=history ]
     
Alberto Massari closed XERCESC-848:
-----------------------------------

     Assign To:     (was: Xerces-C Developers Mailing List)
    Resolution: Won't Fix

As stated in the bug report, using XMLString::release fixes the problem. Regarding the project settings, you are free to change the compilation options (and even the source code) if you need so. In this case, it would be advisable that you also rename the DLL, to avoid picking up a binary build already existing on the system that has been compiled differently.

Alberto

> Deleting something returned by XMLString::transcode crashes when application is using the release build of Xerces-C++
> ---------------------------------------------------------------------------------------------------------------------
>
>          Key: XERCESC-848
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-848
>      Project: Xerces-C++
>         Type: Bug
>   Components: Utilities
>     Versions: 2.2.0
>  Environment: Operating System: Windows NT/2K
> Platform: PC
>     Reporter: Ever A. Olano

>
> This is also a problem with 2.1.0.  In fact, it's the first one I tried.  I 
> downloaded 2.2.0 in the hope that it would not have the same problem.
> The code at the bottom of this description consistently crashes on the 6th (or 
> so) iteration of the loop if I'm linking with and using the Release build of 
> Xerces-C++.  But when I use the Debug build, it works fine.
> I am building a library that our customers will use and so will have to 
> distribute certain DLLs including Xerces.  I was content with just releasing 
> the Debug dll but unfortunately, it seems to rely on msvcrtd.dll and 
> msvcirtd.dll, which are not redistributable themselves.
> Here is the source code that will help you reproduce the problem:
> #include "stdafx.h"
> #include <xercesc/parsers/XercesDOMParser.hpp>
> #include <xercesc/util/PlatformUtils.hpp>
> int _tmain(int argc, _TCHAR* argv[])
> {
> 	XMLPlatformUtils::Initialize();
> 	for (int i = 0; i < 2000; ++i)
> 	{
> 		char s[10];
> 		sprintf( s, "%d", i );
> 		XMLCh *temp = XMLString::transcode( s );
> 		wprintf( temp );
> 		delete [] temp;
> 	}
> 	XMLPlatformUtils::Terminate();
> }
> Thanks,
> Ever

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org