Hi!
I recently converted an application from VS2003 to VS2005.
The application consists of a main 'unmanaged C++ executable' which
calls a managed C++ .dll. The .dll basically launches a separate
form.
The application use to work fine in VS2003. Now that I have converted
to VS2005 the main executable is working but an exception gets
thrown when it trys to call the .dll (basically the new separate
form
never launches). The .dll was compiled with (/clr:oldSyntax).
I put a breakpoint in the constructor code of the .dll but it never
reaches it.
This is the exception that gets thrown:
File: dbgheap.c
Line: 1414
Expression: _CrtIsValidHeapPointer(pUserData)
I click on Retry and it triggers a breakpoint at
if ( (oldsize = _msize_crt(*pbegin)) <= (size_t)((char *)(*pend) -
(char *)(*pbegin)) )
This is the call stack:
msvcr80d.dll!_msize_dbg(void * pUserData=0x1ba3922e, int nBlockUse=2)
Line 1414 + 0x30 bytes C++
msvcr80d.dll!_dllonexit_nolock(int (void)* func=0x1005ef90, void
(void)* * * pbegin=0x0012cb88, void (void)* * * pend=0x0012cb80)
Line
295 + 0xd bytes C
msvcr80d.dll!__dllonexit(int (void)* func=0x1005ef90, void (void)* *
*
pbegin=0x0012cb88, void (void)* * * pend=0x0012cb80) Line 273 + 0x11
bytes C
MultiSegmentFilter.dll!_onexit(int (void)* func=0x1005ef90) Line 110
+ 0x11 bytes C
MultiSegmentFilter.dll!atexit(void (void)* func=0x1005ef90) Line 127
+ 0x9 bytes C
MultiSegmentFilter.dll!`dynamic initializer for 'g_Allocator''()
Line
23 + 0x17 bytes C++
[External Code]
[Frames below may be incorrect and/or missing, no symbols loaded for
mscorwks.dll]
ntdll.dll!7c926a44()
kernel32.dll!7c83971e()
ntdll.dll!7c91b686()
....
ntdll.dll!7c91056d()
mscoree.dll!7901fa44()
REN.exe!CSetup::GetRunname(char* setup_name = 0x0012E58C) Line 572 +
0xa4 bytes C++
I already checked and made sure that both the .exe and the .dll we
compiled with /MDd.
any help would be much appreciated!!!
thanks
Karen