You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by pr...@wipro.com on 2005/05/03 19:19:03 UTC

Assertion failes

Hi Everybody,


I have written a class called "MyXMLParser", it has many member
fucntions to perform Xalan Transformation and so on.

I get this error after I exit from my application.

Assertion failed: s_initMemoryManager!= 0, file
.../xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.cpp, line
217
Abort(coredump)

I have called the XalanTransformer::terminate in the destructor of the
"MyXMLParser" class and initialise is done in the constructor.

-Praveen



Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately
and destroy all copies of this message and any attachments.

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


Re: Assertion failes

Posted by da...@us.ibm.com.
> I have written a class called "MyXMLParser", it has many member
> fucntions to perform Xalan Transformation and so on.
> 
> I get this error after I exit from my application.
> 
> Assertion failed: s_initMemoryManager!= 0, file

That means you've called XalanTransformer::terminate() twice, without an 
intervening call to XalanTransformer::initialize(). 

> I have called the XalanTransformer::terminate in the destructor of the
> "MyXMLParser" class and initialise is done in the constructor.

XMLPlatformUtils::Initialize() and XalanTransformer::initialize() should 
be called _once_ after your application starts, but before you create any 
Xerces-C or Xalan-C objects.  XalanTransformer::terminate() and 
XMLPlatformUtils::Terminate() should be called _once_ when your 
application is about to terminate, _after_ you have destroyed any Xerces-C 
and Xalan-C objects.  Clearly, making these calls in the constructor and 
destructor of your class is a bad idea if you will have more than one 
instance of this class.

Dave

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