exception by class Vb distructor,when running trap example intest_app

Dave Mason dmason____transat-tech.com
Wed Jun 4 17:03:14 CEST 2003


Hi Robert,
Don't the Makefiles normally use the same switches?  I run on Red Hat 
Linux 7.2.  I dont remember changing the Makefiles, but I edited 
agent++/include/threads.h to increase the stack size, and 
snmp++/include/config.h to turn off SNMPv3.    One other thing - My main 
agent Makefile has a different look than the one supplied with the 
example agents.  I have other code from our development environment here 
that I link in, with a static link.  That code is also used in other 
applications with no problem, but maybe something happens when I link it 
into the agent that somehow steps on other memory.  It's possible they 
are built with different compiler flags than the agent++ libraries, 
though the ones for multi-threading are the same.  If the others are 
important I'll check them out.  Anyway, I'm still stumped on this one.

Regards,
Dave

Trausmuth Robert wrote:

>Hi all
>I had the same problem and solved it by recompiling everything with exactly
>the same settings for the compiler switches
>You have to take care not to mix the MSVCRT and MSVCRTD libs
>Because this is fatal!
>
>Yours truly, robert
>
>-----Original Message-----
>From: Sharon Yohay [mailto:SharonY____netgame.co.il] 
>Sent: Dienstag, 03. Juni 2003 18:02
>To: 'Dave Mason'
>Cc: snmp_pp-Dl (E-mail)
>Subject: RE: exception by class Vb distructor,when running trap example
>intest_app
>
>hello
>I think I know more now:
>in windows the function: _CrtIsValidHeapPointer
>	is called only in debug config, every time u call delete,
>	this function fails not only if the pointer is not valid but also if
>the memory
>	is not from local heap, when allocated from a dll the memory is from
>another heap.
>	(see MSDN index: _CrtIsValidHeapPointer)
>thanks
>
>-----Original Message-----
>From: Dave Mason [mailto:dmason____transat-tech.com]
>Sent: Tuesday, June 03, 2003 4:53 PM
>To: Jochen Katz
>Cc: Sharon Yohay; Agent++ Mailing List
>Subject: Re: exception by class Vb distructor,when running trap example
>intest_app
>
>
>Hi,
>I've had this problem many times myself.  After pouring through my user 
>code and the toolkit code, I couldnt find anything wrong.  Later, I saw 
>another post here from somebody who mentioned he saw a crash like this, 
>and he said the problem went away after he rebuilt the snmp++ and 
>agent++ libraries.  Unfortunately I dont know more than that, but it has 
>to be some kind of memory corruption problem that is caused by something 
>in the toolkit build process.
>
>Dave
>
>Jochen Katz wrote:
>
>  
>
>>Hi,
>>
>>    
>>
>>>using snmp++ as a dll , win2k.
>>>It seems that pointer attribute iv_vb_value is used for operator delete,
>>>    when the memory pointed by it, is already freed.
>>>      
>>>
>>the class Vb will never delete this value twice, so there must be 
>>another problem.
>>
>>Do you use agent++ in your app? Then try increasing the thread stack 
>>size in threads.h.
>>
>>Can you reproduce it with a simple example? Does it also occur if you 
>>compile snmp++ as a static lib?
>>
>>Regards,
>>  Jochen
>>
>>
>>    
>>
>
>  
>




More information about the AGENTPP mailing list