Suds
7/27/2007 8:40:00 PM
Hi,
I have been using Reg-Free COM to load a .NET assembly using a CPP client
using manifest files. Recently I deployed my .NET assembly, and the loading
of my .NET assembly was leading to heap corruption and eventually the
crashing my application. I was able to develop a sample project that modeled
my deployed client and .NET assembly. The problem happens with my sample
project also.
I developed a sample client called cppclient.exe. Using the gflags.exe
window debugging utility, I enabled the page heap for my cppclient. I ran my
client in Debug mode in Visual Studio, and at the line where the client
loads my .NET assembly using COM, the program crashes. The stack trace
indicates that the call was made from sxs.dll. The stack trace is below:
> ntdll.dll!_DbgBreakPoint@0()
ntdll.dll!_RtlApplicationVerifierStop@40() + 0x160
ntdll.dll!_RtlpDphReportCorruptedBlock@16() + 0x186
ntdll.dll!_RtlpDphNormalHeapFree@12() + 0x2e
ntdll.dll!_RtlpDebugPageHeapFree@12() + 0x79
ntdll.dll!_RtlDebugFreeHeap@12() + 0x2c
ntdll.dll!_RtlFreeHeapSlowly@12() + 0x23d19
ntdll.dll!_RtlFreeHeap@12() + 0x16470
sxs.dll!operator delete() + 0x1c
sxs.dll!FusionFreeArray<CFusionFilePathAndSize *>() + 0x13
sxs.dll!CFusionArray<CFusionFilePathAndSize *,CFusionFilePathAndSize
*,0,0,1>::~CFusionArray<CFusionFilePathAndSize *,CFusionFilePathAndSize
*,0,0,1>() + 0x10
sxs.dll!SxsLookupClrGuid() + 0x3a4
mscorwks.dll!79f86e9d()
This is exactly the problem with my deployed .NET assembly.
My question is - Is this a known problem with manifest files and Reg-Free
COM? Is there a patch for it or something I can set so that this Heap
corruption does not happen.
If I can't find a solution I will have scrap my deployment with Reg-Free COM
and go back to registering my .NET assembly, which is not preferable.
Any inputs for this issue will be greatly appreciated.
Regards,
Suds