[AGENT++] heap corruption when delete a dynamic Snmp object
Jochen Katz
katz at agentpp.com
Wed Jul 21 21:45:19 CEST 2010
Hi,
please make sure that the settings of the project you used to build the
snmp++ library are identical to the settings of your test project. In
case you compiled snmp++ to a dll, verify that at runtime the right dll
is loaded.
Regards,
Jochen
Am 21.07.2010 14:04, schrieb Wang Fang:
> Hi
>
> I am using vc++ 2008 and SNMP++v3.2.24, the testing code are:
> #include "snmp_pp.h"
> int main()
> {
> Snmp::socket_startup();
> int status;
> Snmp *p = new Snmp(status);
> delete p; // heap corruption
> Snmp::socket_cleanup();
> return 0;
> }
>
> The error message are:
> Windows has triggered a breakpoint in SNMPTrapSender.exe.
>
> This may be due to a corruption of the heap, which indicates a bug in
> SNMPTrapSender.exe or any of the DLLs it has loaded.
>
> This may also be due to the user pressing F12 while SNMPTrapSender.exe
> has focus.
>
> The output window may have more diagnostic information.
>
More information about the AGENTPP
mailing list