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 "Puyoman (JIRA)" <xe...@xml.apache.org> on 2005/10/17 02:47:44 UTC

[jira] Created: (XERCESC-1518) Always General Exception Error when being called from MFC application

Always General Exception Error when being called from MFC application
---------------------------------------------------------------------

         Key: XERCESC-1518
         URL: http://issues.apache.org/jira/browse/XERCESC-1518
     Project: Xerces-C++
        Type: Bug
  Components: Validating Parser (DTD)  
    Versions: 2.7.0    
 Environment: OS:windows XP Pro sp2
compiler: VC++ 7.0 2002
memory:512MB
Xerces version:2.7.0
Xalan version: 1.9
ICU version:3.4
    Reporter: Puyoman
    Priority: Critical


I built Xerces+ICU and the parsing MFC application.
When my application window closed and end to ExitInstance(), general protection
error happened (read address:0xC0000005 place:0x00000000).
In other case, if application don't call parse functions, these errors don't 
happen.
Its parse is validating parse and DOM creating.

So much exception is generated:
Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4

Does xerces (especially, debugging version) consume a large amount of 
heap areas?
Xerces destroys even the area of MFC and the application program. 


-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Puyoman (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332537 ] 

Puyoman commented on XERCESC-1518:
----------------------------------

I did not use that because only this project had become a link error when DeprecatedDOMCount.cpp was built.
Since it was not related for the time being, I ignored it and parsed with the debugging version.

In inputsource.cpp at line 35,fEncoding was 0 and this program
stopped here.

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332558 ] 

Alberto Massari commented on XERCESC-1518:
------------------------------------------

1) Initialize and Terminate can be called any number of times, but it is best to call them just once, at startup and at shutdown, both for performance reason (they must allocate and deallocate a bunch of global objects) and for multithreading issues (they are not multithreaded functions, as their purpose is also to set up the multithread support)

2) if InputSource::fMemoryManager is NULL it means that you have created it before calling XMLPlatform::Inititialize. But in the code you pasted there is no InputSource created (just the one automatically created inside the call to parse(), but that should be deleted before the function ends) so I am wondering if you have a static instance lying somewhere.



> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Resolved: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1518?page=all ]
     
Alberto Massari resolved XERCESC-1518:
--------------------------------------

    Resolution: Invalid

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Puyoman (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332652 ] 

Puyoman commented on XERCESC-1518:
----------------------------------

I don't have a static instance,so I also wonder.
Since I only call the above-mentioned function from DLL, I seem to have opened again wide what had secured freely in DLL of Xerces or was opened wide once (although for there to be already nothing).
Since it is unsavory anyhow that NULL check is not contained, either and it came to operate in the present condition, I am going to distribute this correction version to a user.

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332688 ] 

Alberto Massari commented on XERCESC-1518:
------------------------------------------

You are indeed free to distribute modified version of the library to a user; but I would rather find out the real cause. 

That fMemoryManager field is assigned when the InputSource object is created, and by default it is assigned to the global memory manager that is instanciated by the call to Initialize. So, if that variable is NULL, it means that somewhere you have an InputSource object that is initialized too early. Simply adding that check means that InputSource will not crash in the destructor, but it will as soon as you try to do some real work on that instance.

In my opinion, this bug should be marked Invalid as it seems to me that the error is in your code: if you don't want to proceed further in discovering the real cause of the error, please close the bug (or tell me if I should do it)

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Puyoman (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332427 ] 

Puyoman commented on XERCESC-1518:
----------------------------------

My source code follows:
*****************************************************
#include "stdafx.h"
#include <Include/PlatformDefinitions.hpp>

#include <xercesc/parsers/XercesDOMParser.hpp>
#include <xercesc/dom/DOM.hpp>
#include <xercesc/sax/HandlerBase.hpp>
#include <xercesc/sax/SAXParseException.hpp>
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>

#include <stdio.h>
#include <string.h>

XERCES_CPP_NAMESPACE_USE

class DOMTreeErrorReporter : public ErrorHandler
{
public:
    // -----------------------------------------------------------------------
    //  Constructors and Destructor
    // -----------------------------------------------------------------------
    DOMTreeErrorReporter() :
       fSawErrors(false)
    {
		err = "";
    }

    ~DOMTreeErrorReporter()
    {
    }


    // -----------------------------------------------------------------------
    //  Implementation of the error handler interface
    // -----------------------------------------------------------------------
    void warning(const SAXParseException& toCatch);
    void error(const SAXParseException& toCatch);
    void fatalError(const SAXParseException& toCatch);
    void resetErrors();

    // -----------------------------------------------------------------------
    //  Getter methods
    // -----------------------------------------------------------------------
    bool getSawErrors() const;

    bool    fSawErrors;
	CString err;
};

inline bool DOMTreeErrorReporter::getSawErrors() const
{
    return fSawErrors;
}


void DOMTreeErrorReporter::warning(const SAXParseException&)
{
    //
    // Ignore all warnings.
    //
}

void DOMTreeErrorReporter::error(const SAXParseException& toCatch)
{
    fSawErrors = true;
	char* mes1 = XMLString::transcode(toCatch.getSystemId());
	char* mes2 = XMLString::transcode(toCatch.getMessage());
	char buf[20];
	_ltoa(toCatch.getColumnNumber(),buf,10);
	char* mes3 = (char*)XMLString::transcode(buf);
	_ltoa(toCatch.getLineNumber(),buf,10);
	char* mes4 = (char*)XMLString::transcode(buf);
	err += "Error at file \"";
	err += mes1;
	err += "\", line ";
	err += mes4;
	err += ", column ";
	err += mes3;
	err += "\n   Message: ";
	err += mes2;
	if(mes1)delete mes1;
	if(mes2)delete mes2;
	if(mes3)delete mes3;
	if(mes4)delete mes4;
}

void DOMTreeErrorReporter::fatalError(const SAXParseException& toCatch)
{
    fSawErrors = true;
	char* mes1 = XMLString::transcode(toCatch.getSystemId());
	char* mes2 = XMLString::transcode(toCatch.getMessage());
	char buf[20];
	_ltoa(toCatch.getColumnNumber(),buf,10);
	char* mes3 = (char*)XMLString::transcode(buf);
	_ltoa(toCatch.getLineNumber(),buf,10);
	char* mes4 = (char*)XMLString::transcode(buf);
	err += "Fatal Error at file \"";
	err += mes1;
	err += "\", line ";
	err += mes4;
	err += ", column ";
	err += mes3;
	err += "\n   Message: ";
	err += mes2;
	if(mes1)delete mes1;
	if(mes2)delete mes2;
	if(mes3)delete mes3;
	if(mes4)delete mes4;
}

void DOMTreeErrorReporter::resetErrors()
{
    fSawErrors = false;
}


int parse (const char* xmlFile, CString& errmsg)
{
char* message = NULL;

	try
	{
		XMLPlatformUtils::Initialize();
	}
	catch (const XMLException& toCatch)
	{
		char*message = XMLString::transcode(toCatch.getMessage());
		errmsg = message;
		XMLString::release(&message);
		return -1;
	}

	XercesDOMParser* parser = new XercesDOMParser();
	//parser->setValidationScheme(XercesDOMParser::Val_Always);    // optional.
	parser->setDoNamespaces(true);    // optional
	//parser->setValidationSchemaFullChecking(true);
	//parser->setValidationConstraintFatal(true);
	parser->setDoValidation(true);
	//parser->setDoSchema(true);
	//parser->setExitOnFirstFatalError(true);
    //parser->setCreateEntityReferenceNodes(true);
	//parser->setExternalSchemaLocation("//test/xalan/Release/mem-pte2.dtd"
							/*"C:/test/xalan/Release/mathml2.dtd "
							"C:/test/xalan/Release/soextblx.dtd "
							"C:/test/xalan/Release/wipo.ent");*/
	//parser->setExternalNoNamespaceSchemaLocation("//test/xalan/Release/mem-pte2.dtd");
	//ErrorHandler* errHandler = (ErrorHandler*) new HandlerBase();

	//DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter();
	//parser->setErrorHandler(errReporter);

	//
	//  Parse the XML file, catching any XML exceptions that might propogate
	//  out of it.
	//
	bool errorsOccured = false;
	try
	{
		parser->parse(xmlFile);
	}
	catch (const OutOfMemoryException&)
	{
		//XERCES_STD_QUALIFIER cerr << "OutOfMemoryException" << XERCES_STD_QUALIFIER endl;
		errmsg = "OutOfMemoryException\n";
		errorsOccured = true;
	}
	catch (const XMLException& e)
	{
		//XERCES_STD_QUALIFIER cerr << "An error occurred during parsing\n   Message: "
		message = XMLString::transcode(e.getMessage());
		errmsg = message;
		XMLString::release(&message);
		errorsOccured = true;
	}
	catch (const DOMException& e)
	{
		const unsigned int maxChars = 2047;
		XMLCh errText[maxChars + 1];

		if (DOMImplementation::loadDOMExceptionMsg(e.code, errText, maxChars))
		{
			message = XMLString::transcode(errText);
			errmsg = message;
			XMLString::release(&message);
		}
		errorsOccured = true;
	}
	catch (...)
	{
		//XERCES_STD_QUALIFIER cerr << "An error occurred during parsing\n " << XERCES_STD_QUALIFIER endl;
		errmsg = "An error occurred during parsing\n";
		errorsOccured = true;
	}
	XMLString::release(&message);
	delete parser;
	XMLPlatformUtils::Terminate();
	return(errorsOccured ? -1 : 0);
}

*****************************************************
I only call this function for parsing.
Whenever parsing one xml file, this function is called.
i)Adding include directories for compiling:
  xerces-c-src_2_7_0\src
  "ICU 3.4\include"
  xml-xalan\c\src
ii)Adding linked libraries:
  xerces-c-src_2_7_0\Build\Win32\VC7\release\xerces-c_2.lib
  xerces-c-src_2_7_0\Build\Win32\VC7\release\xerces-depdom_2.lib
  xml-xalan\c\Build\Win32\VC6\release\Xalan-C_1.lib
  xml-xalan\c\Build\Win32\VC6\release\Harness_1.lib
  "ICU 3.4\lib\icuuc.lib"



> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical

>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Puyoman (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332556 ] 

Puyoman commented on XERCESC-1518:
----------------------------------

This is my conclusion.
I opened xerces-c-src_2_7_0\src\xercesc\sax\InputSource.cpp
and solved by appending null pointer check from 35 line to 37.
The new source follows:
****************************************
InputSource::~InputSource()
{
 if(fMemoryManager&&fEncoding)
  fMemoryManager->deallocate(fEncoding);
 if(fMemoryManager&&fPublicId)
  fMemoryManager->deallocate(fPublicId);
 if(fMemoryManager&&fSystemId)
  fMemoryManager->deallocate(fSystemId);
}
*******************************************
I suspect that there is not null check inside a destructor
process though it is already anyhow good.

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Updated: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Puyoman (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1518?page=all ]

Puyoman updated XERCESC-1518:
-----------------------------

    Attachment: UAE1.GIF

i) push close button
ii) ExitInstance() is called and exited.
iii) bomb...

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332452 ] 

Alberto Massari commented on XERCESC-1518:
------------------------------------------

I don't see any evident error in the code (apart the fact that you use "delete mes1" to deallocate data created by XMLString::transcode; you should use XMLString::release as you do in other places, or you could have crashes if the application and Xerces have been compiled using different C runtime).
>From the link libraries it looks you have built the sources yourself: can you build Xerces in debug, so that the debugger can show the location of the error? Also, to exclude other possible causes, can you remove the Xalan-C library from the project?

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Puyoman (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332547 ] 

Puyoman commented on XERCESC-1518:
----------------------------------

I have forgotten to write in addition.
fMemoryManager is also NULL.
As long as XMLPlatformUtils::Initialize and XMLPlatformUtils::Terminate() were pairs,how many times might not I call those?

> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical
>  Attachments: UAE1.GIF
>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] Commented: (XERCESC-1518) Always General Exception Error when being called from MFC application

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESC-1518?page=comments#action_12332378 ] 

Alberto Massari commented on XERCESC-1518:
------------------------------------------

Please give us some code to look at: from what you write I can only think that you have a static Xalan object that does cleanup after the call to XMLPlatformUtils::Terminate()


> Always General Exception Error when being called from MFC application
> ---------------------------------------------------------------------
>
>          Key: XERCESC-1518
>          URL: http://issues.apache.org/jira/browse/XERCESC-1518
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (DTD)
>     Versions: 2.7.0
>  Environment: OS:windows XP Pro sp2
> compiler: VC++ 7.0 2002
> memory:512MB
> Xerces version:2.7.0
> Xalan version: 1.9
> ICU version:3.4
>     Reporter: Puyoman
>     Priority: Critical

>
> I built Xerces+ICU and the parsing MFC application.
> When my application window closed and end to ExitInstance(), general protection
> error happened (read address:0xC0000005 place:0x00000000).
> In other case, if application don't call parse functions, these errors don't 
> happen.
> Its parse is validating parse and DOM creating.
> So much exception is generated:
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0012263c
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x00123460
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011ead4
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011eb98
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f8f8
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011f9bc
> Microsoft C++ exception: xercesc_2_7::EndOfEntityException @ 0x0011e8e4
> Does xerces (especially, debugging version) consume a large amount of 
> heap areas?
> Xerces destroys even the area of MFC and the application program. 

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org