[Winpcap-users] Debugging a winpcap exception
Chris Morgan
chmorgan at gmail.com
Tue Jan 5 18:28:11 PST 2010
Anyone?
If I could get line numbers it might be easier to tell what the
failure case is. I'm not sure if it has to do with trying to marshal
an invalid pointer, the garbage collector freeing memory that was
passed to unmanaged winpcap code etc. It would really help to have
someone experienced in debugging to help me get through this debugging
issue so I can try to figure it out.
Chris
On Mon, Jan 4, 2010 at 4:45 PM, Chris Morgan <chmorgan at gmail.com> wrote:
> I'm trying to debug some very odd behavior in a .net application that
> pinvokes winpcap to capture network packets. The behavior I see seems
> indicative of memory corruption, when I run under the vs debugger all
> events seem to stop until I do a 'break all' and continue after
> setting breakpoints. Even then things only run for a short while.
>
> I switched to using windbg and after running I see this exception
> which may or may not be the issue. I'm having trouble continuing
> because I'm having difficulty building wpcap.dll in debug mode, it
> wants packet.lib but after building packet.lib it still won't build.
>
> Here is what I have thus far, I'm hoping someone can provide some help
> so I can continue debugging the issue.
>
> ...
> ModLoad: 66430000 66664000
> C:\Windows\assembly\NativeImages_v2.0.50727_32\System.Core\e78709bedd31f237055667ad99b9451f\System.Core.ni.dll
> (570.107c): Access violation - code c0000005 (first chance)
> First chance exceptions are reported before any exception handling.
> This exception may be expected and handled.
> 04e0b9f4 3909 cmp dword ptr [ecx],ecx ds:002b:00000000=????????
>
>
> WARNING: Frame IP not in any known module. Following frames may be wrong.
> 00 0622efe8 04e07683 0x4e0b9f4
> 01 0622f024 04e0a7eb 0x4e07683
> 02 0622f044 04e0a6ef 0x4e0a7eb
> 03 0622f058 04e04af0 0x4e0a6ef
> 04 0622f0c8 04e046c5 0x4e04af0
> 05 0622f110 04e020a3 0x4e046c5
> 06 0622f25c 10015ee6 0x4e020a3
> 07 0622f280 10016a3f wpcap!wsockinit+0x296
> 08 0622f2c8 728313f4 wpcap!pcap_dispatch+0x3f
> 09 0622f3b8 6e416e16 mscorwks!LogHelp_NoGuiOnAssert+0x5398
> 0a 0622f3c4 6e42029f mscorlib_ni+0x216e16
> 0b 0622f3d8 6e416d94 mscorlib_ni+0x22029f
> 0c 0622f3f0 72821b6c mscorlib_ni+0x216d94
> 0d 0622f400 72832209 mscorwks+0x1b6c
> 0e 0622f480 72846511 mscorwks!LogHelp_NoGuiOnAssert+0x61ad
> 0f 0622f5b8 72846544 mscorwks!CoUninitializeEE+0x2ea9
> 10 0622f5d4 72846562 mscorwks!CoUninitializeEE+0x2edc
> 11 0622f5ec 728fe9c3 mscorwks!CoUninitializeEE+0x2efa
> 12 0622f7d4 7284846f mscorwks!CorExitProcess+0x1e4d
> 13 0622f7e8 7284840b mscorwks!CoUninitializeEE+0x4e07
> 14 0622f87c 72848331 mscorwks!CoUninitializeEE+0x4da3
> 15 0622f8b8 728484bd mscorwks!CoUninitializeEE+0x4cc9
> 16 0622f8e0 728fe794 mscorwks!CoUninitializeEE+0x4e55
> 17 0622f8f8 728fe86e mscorwks!CorExitProcess+0x1c1e
> 18 0622f994 72961ec9 mscorwks!CorExitProcess+0x1cf8
> 19 0622fdb4 767d3f39 mscorwks!CreateApplicationContext+0x4509
> 1a 0622fdc0 76f70409 KERNEL32!BaseThreadInitThunk+0x12
> 1b 0622fe00 76f703dc ntdll32!RtlInitializeExceptionChain+0x63
> 1c 0622fe18 00000000 ntdll32!RtlInitializeExceptionChain+0x36
>
>
> Thanks,
> Chris
>
More information about the Winpcap-users
mailing list