[omniORB] Assertion error

Thomas Legault blister_foo@hotmail.com
Mon Nov 25 20:23:00 2002


Hello,

I'm trying to run a simple (generated by omniidl using omniidl -bcxx -Wbh=.h 
-Wbs=.cpp -Wbtp -Wbexample "FILE") test and I get an assertion error in this 
code

Testing_i* myTesting_i = new Testing_i();
PortableServer::ObjectId_var myTesting_iid = 
poa->activate_object(myTesting_i);

// Obtain a reference to each object and output the stringified
// IOR to stdout
{
	// IDL interface: Testing
	CORBA::Object_var ref = myTesting_i->_this();	  CORBA::String_var sior = 
orb->object_to_string(ref);
	cout << "IDL object Testing IOR = '" << (char*)sior << "'" << endl;
//ASSERTION ERROR HERE. This is due to the sior object which wants to 
deallocate it's string pointer.
}

I tried changing the code to char * test = orb->object_to_string(ref);
...

This stops the assertion error but leaks memory.

I'm using VC++ 6.0 SP5 - Win2k Pro

Any help would be appreciated.

Thanks,
Thomas aka B|iSteR



_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail