[omniORB] VC++ 5.0 heap error when using -a option
Peter Craig
pcraig@coactive.com
Fri, 13 Nov 1998 12:24:53 -0800
Here is some more information:
The problem only occurs when using the DLL version of the omniORB
libraries.
The problem goes away when I add the _WINSTATIC macro and link to
omniORB2d.lib and omnithreadd.lib.
I searched my system to make sure I only had 1 copy of the DLL.
Pete Craig
> -----Original Message-----
> From: Peter Craig [SMTP:pcraig@coactive.com]
> Sent: Thursday, November 12, 1998 2:31 PM
> To: 'omniorb-list@orl.co.uk'
> Subject: [omniORB] VC++ 5.0 heap error when using -a option
>
> I have an VC++ 5.0 MFC dialog application that gets a heap error
> during
> initialization.
> This error only occurs when I use the "-a" option with the omniidl2
> compiler.
> Any ideas?
>
> ============================================================
> My IDL:
> #ifndef __ECHO_IDL__
> #define __ECHO_IDL__
>
> struct DateType // The Date
> {
> unsigned short year;
> octet month; // 1..12
> octet day; // 1..31
> };
>
>
> interface Echo {
>
>
> string echoString(in string mesg);
> };
>
> #endif
>
>
> When I run my program I get the following error during initialization:
>
> Debug Assertion Failed!
>
> Program: ...archive.exe [my program]
> File: dbgheap.c
> Line: 1011
>
> Expression: _CtrlsValidHeapPointer(pUserData)
>
> When I go into the debugger I see the following call stack:
>
> _free_dbg_lk(void *,int)
> _free_dbg(void*,int)
> operator delete(void*)
> CORBA::TypeCode::'scalar deleting destructor'(unsigned
> int)
> CORBA::release(CORBA::TypeCode *)
> CORBA::TypeCode::TypeCode(CORBA::TCKind,char *,char
> *,CORBA::PR_structMember *,unsigned long)
> $E86()
> $E89()
> _initterm(void(void)**,void(void)**)
> _cinit()
> WinMainCRTStartup()
> KERNEL32! 77f1b304()
>
> The code at $E86() corresponds to the last line below from echoSK.cpp:
>
> static CORBA::PR_structMember _02RL_Echo__tc_DateType[]
> = {
> {"year", new CORBA::TypeCode(CORBA::tk_ushort)},
> {"month", new CORBA::TypeCode(CORBA::tk_octet)},
> {"day", new CORBA::TypeCode(CORBA::tk_octet)} };
> static CORBA::TypeCode
> _01RL_Echo__tc_DateType(CORBA::tk_struct, "IDL:Echo/DateType:1.0",
> "DateType", _02RL_Echo__tc_DateType, 3);
>
>