Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / October 2003

Tip: Looking for answers? Try searching our database.

unhandled exception in _CrtIsValidHeapPointer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Aravindakumar - 24 Sep 2003 09:04 GMT
i am using a static library dll , for the static library i
am passing a reference of STL list( list of STL string )
which fills the list. when i clear the list in the client
side i am getting unhandled exception in
_CrtIsValidHeapPointer in dbgheap.c( the exception
occuring only in debug mode ) ..

version : Visual Studio .net 2003
I am setting MDd option in c++ \code generation\Runtime
library

How can overcome the problem ?
Liu Xiong [MSFT] - 29 Sep 2003 19:10 GMT
--------------------
>  Content-Class: urn:content-classes:message
>  From: "Aravindakumar" <aravind_accet@yahoo.com>
[quoted text clipped - 13 lines]
>  Path: cpmsftngxa06.phx.gbl
>  Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.vc.libraries:2429
>  NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
>  X-Tomcat-NG: microsoft.public.dotnet.languages.vc.libraries
[quoted text clipped - 13 lines]
>  How can overcome the problem ?
>  

Did you compile your dll and client code with the same compiler options?
If yes, how did you create the list reference in the client side?

Try to  create the list reference in the crt heap: list<string> *l = new
list<string>;
and pass *l to the dll function.

Thanks

Liu Xiong, Visual C++ Team
This posting is provided AS IS with no warranties, and confers no rights.
Aravindakumar - 01 Oct 2003 14:07 GMT
I am creating the list in CRT heap in the same way you
have mentioned
        (
         >list<string> *l = new
         >list<string>;
         >and pass *l to the dll function.
        }
But the library is 7.0 .net compiled and the client
in .net 2003 where it will be a problem for this issue ??

>-----Original Message-----
>
[quoted text clipped - 48 lines]
>
>.
"Pranish Kumar [VC++ MSFT]" - 02 Oct 2003 19:58 GMT
Allocating memory from one version of the CRT and deallocating from another
is not supported and is likely the cause of this problem.

--------------------
>Content-Class: urn:content-classes:message
>From: "Aravindakumar" <aravind_accet@yahoo.com>
>Sender: "Aravindakumar" <aravind_accet@yahoo.com>
>References: <d39f01c38272$78032320$a601280a@phx.gbl>
<WVMVAUrhDHA.2332@cpmsftngxa06.phx.gbl>
>Subject: RE: unhandled exception in _CrtIsValidHeapPointer
>Date: Wed, 1 Oct 2003 06:07:16 -0700
[quoted text clipped - 10 lines]
>Path: cpmsftngxa06.phx.gbl
>Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.vc.libraries:2473
>NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
>X-Tomcat-NG: microsoft.public.dotnet.languages.vc.libraries
[quoted text clipped - 72 lines]
>>
>>.

Pranish Kumar, Microsoft Visual C++ Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.