Applicaiton crashes while adding and removing rows into/from a table

Noam Wolf NoamW____flashnetworks.com
Thu May 3 11:03:35 CEST 2001


Hi Neel

The exact thing you are describing happened to me too. It's a linkage
problem of the dll. When I built the agent++ and the snmp++ AND my agent
module - all three as static libs, everything went fine, and there was no
problem in "if (value) delete value;".
You have to make sure that all your libs use the same flags (I am compiling
with "debug multithreaded dll" flags in VC++).
In my case there was no problem using a static lib.

Hope it helped.

Noam Wolf.  

-----Original Message-----
From: Chaudhury, Neel [mailto:nchaudhury____iPolicyNet.COM]
Sent: Wednesday, May 02, 2001 11:04 AM
To: agentpp-dl____agentpp.com
Subject: Applicaiton crashes while adding and removing rows into/from a
table


Hi Mailing List,

I have implemented an Agent using SNMP++ and Agent++. 
For using SNMP++ and Agent++, I have combined files of both SNMP and Agent 
to make a DLL using VC++ on windows NT. I link with the library file
generated along with
the DLL for creating my executable. I have created a MIB that contains a
Table 
and some non-Table objects. I add the my mib to the mib object defined in
Agent.

1.	Now when I try to add a row, my application crashes at the statement
- 
		if (value) delete value;
	in the function MibLeaf::replace_value(SnmpSyntax* v). 
	When I commented the line, I could add rows into it and perform get
and 
	get-next operations on it. 
2. 	When I try to delete an added row, similar type of problem occurs.
	This time the application crashes at the statement
		if (t) delete t;
	in the function
		OidList<MibTableRow>::remove(Oidx *);
When I tried to debug using NuMega Bounds Checker, it gave the message:
	Memory allocation conflict
	Memory was allocated in module pdemain.exe
	Freed in module snmp.dll
The same error comes in case of #1 too.

If you have any idea of what goes here, please help me overcoming this
problem.

Thanking you in advance,
Neel
iPolicy Networks, Inc.
nchaudhury at ipolicynet.com 



More information about the AGENTPP mailing list