exception by class Vb distructor,when running trap example intest_app

Trausmuth Robert trausmuth____fhwn.ac.at
Wed Jun 4 08:15:41 CEST 2003


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