[omniORB] Re: DynAny & CORBA 2.3 spec.
David Riddoch
djr@uk.research.att.com
Wed, 31 May 2000 13:24:07 +0100 (BST)
On Thu, 25 May 2000, Francois Laflamme wrote:
> We`ve try the following code with the orb v.2.8 and we get an assertion
> failure from debug heap pointer (under vc++ v6) when the Any_var goes out of
> scope.
> //////////////////////////
> {
> CORBA::DynAny_var da;
> CORBA::Any_var a;
>
> da = Orb->create_basic_dyn_any(CORBA::_tc_long);
> da->insert_long(1);
>
> a = da->to_any();
>
>
> da->destroy();
> }
> //////////////////////////
>
> Should we absolutly use the v.3 to make it running?
No, it should work fine in 2.8. It looks like you are mixing code
compiled with debugging and code without. I think omniORB is compiled
without debugging info, and I expect you program is being compiled with
debugging info. The any is allocated using a normal allocator inside
omniORB, and deallocated using a debugging allocator inside your
application code, and it so it gets confused.
Try disabling the debugging stuff, or re-compile omniORB with the
debugging enabled.
Cheers,
David