[omniORB] .NET 2003 & omniOrb403 invalid heap crash

Luke Deller ldeller at xplantechnology.com
Tue Apr 27 11:00:57 BST 2004


John, Gareth (Poole) wrote:
> Hi,
> 
> After updgrading our project to VS .NET 2003 using omniorb403 windows 
> binaries, when running in debug I get an
> 
> "Invalid heap pointer exception when string destructor called." in 
> _CrtIsValidHeapPointer
> 
> I have checked the archives and this seems to be normally due to 
> incorrect libraries being used. I have checked this and believe them to 
> be correct, as they are the same as under Visual Studio V6.0.
...
> Are the released omnOrb binaries complied with .NET200?

No, the released binaries are compiled with Visual C++ 6.0.  If you want 
to use omniORB with VS .NET 2003 then you will need to rebuild omniORB 
from source.

The reason for your problems is that vc6 and vc7.1 have different 
runtime library DLLs.  Each runtime library maintains its own memory 
heap, providing its own implementations of malloc, free, new and delete. 
  If the omniORB DLL allocates some memory for you using the vc6 
library, then you try to deallocate it using the vc7.1 library, chaos 
will ensue.

The debug versions of the runtime libraries will detect such problems 
and report the error you see; the release versions of the runtime 
libraries will silently ignore the problem and your heap(s) will become 
corrupt.

Regards,
Luke.



More information about the omniORB-list mailing list