STL fails while running ported VC6.0 code on VC7 
Author Message
 STL fails while running ported VC6.0 code on VC7

Hi,
       I have ported VC6.0 MFC Dialog Based Application on VC7 .NET.
This application is using lots of STLs ( likne Vector, List,Map, Set).

In Release Mode, STLs are not creating problems. Execution of the code is
successful.   When i try to execute the code in Debug Mode. Assertion Failure
comes while executing the below mentioned statement.

typedef List<CString> List_t

List_t  pList;
CString  str;

str  = RerSrcFileName();

pList.insert(str);

__crtcheckMemory Assertion Failure comes during insertion in List.

Can someone tell me what extra effort is required for running my Application
in debug mode.

On my machine VC6.0 is not installed. Only .NET Development environment is there.  

IF there is any bug in VC7 STLs then from, where i can get the upgrade..

Thanks in advance.

-
manoj



Sat, 05 Mar 2005 19:58:32 GMT  
 STL fails while running ported VC6.0 code on VC7
This doesn't necessarily have anything to do with the list insertion. That
is just the place the corruption is detected, it probably isn't the place
where it happens.

It is extremely likely you have a bug in your code that overwrites memory.

See the following help topic for how to track this with the help of the CRT:
(product docs)
<ms-help://MS.VSCC/MS.MSDNQTR.2002JAN.1033/vsdebug/html/_core_Solving_Buffer
_Overwrites_and_Memory_Leaks.htm>

(online)
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsde...
l/_core_solving_buffer_overwrites_and_memory_leaks.asp

Ronald Laeremans
Visual C++ compiler and libraries team


Quote:
> Hi,
>        I have ported VC6.0 MFC Dialog Based Application on VC7 .NET.
> This application is using lots of STLs ( likne Vector, List,Map, Set).

> In Release Mode, STLs are not creating problems. Execution of the code is
> successful.   When i try to execute the code in Debug Mode. Assertion
Failure
> comes while executing the below mentioned statement.

> typedef List<CString> List_t

> List_t  pList;
> CString  str;

> str  = RerSrcFileName();

> pList.insert(str);

> __crtcheckMemory Assertion Failure comes during insertion in List.

> Can someone tell me what extra effort is required for running my
Application
> in debug mode.

> On my machine VC6.0 is not installed. Only .NET Development environment is
there.

> IF there is any bug in VC7 STLs then from, where i can get the upgrade..

> Thanks in advance.

> -
> manoj



Sun, 06 Mar 2005 01:24:36 GMT  
 STL fails while running ported VC6.0 code on VC7

Quote:
> This doesn't necessarily have anything to do with the list insertion. That
> is just the place the corruption is detected, it probably isn't the place
> where it happens.

> It is extremely likely you have a bug in your code that overwrites memory.

> See the following help topic for how to track this with the help of the CRT:
> (product docs)
> <ms-help://MS.VSCC/MS.MSDNQTR.2002JAN.1033/vsdebug/html/_core_Solving_Buffer
> _Overwrites_and_Memory_Leaks.htm>

> (online)
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsde...
> l/_core_solving_buffer_overwrites_and_memory_leaks.asp

> Ronald Laeremans
> Visual C++ compiler and libraries team



> > Hi,
> >        I have ported VC6.0 MFC Dialog Based Application on VC7 .NET.
> > This application is using lots of STLs ( likne Vector, List,Map, Set).

> > In Release Mode, STLs are not creating problems. Execution of the code is
> > successful.   When i try to execute the code in Debug Mode. Assertion
>  Failure
> > comes while executing the below mentioned statement.

> > typedef List<CString> List_t

> > List_t  pList;
> > CString  str;

> > str  = RerSrcFileName();

> > pList.insert(str);

> > __crtcheckMemory Assertion Failure comes during insertion in List.

> > Can someone tell me what extra effort is required for running my
>  Application
> > in debug mode.

> > On my machine VC6.0 is not installed. Only .NET Development environment is
>  there.

> > IF there is any bug in VC7 STLs then from, where i can get the upgrade..

> > Thanks in advance.

> > -
> > manoj

Hi,
    I am trying to find the root causes of Heap corruption..  
the problem that I can see is that I am using List<CString> and inserting
char* variable in List.  Don't u think this will be the cause of problem
Every crash results due to CString release/heap allocation function call.

-
manoj



Sun, 06 Mar 2005 20:10:19 GMT  
 STL fails while running ported VC6.0 code on VC7
Hi!
maybe I'm missing something, but I do not see STL list in your code!
And even if I replace List by list (lower case) , it still cannot
compile as insert need an iterator to know where to insert.

Maybe some local guru :-(, made his own stl like container and it has
a bug in it ?

Daniel

Quote:

> Hi,
>        I have ported VC6.0 MFC Dialog Based Application on VC7 .NET.
> This application is using lots of STLs ( likne Vector, List,Map, Set).

> In Release Mode, STLs are not creating problems. Execution of the code is
> successful.   When i try to execute the code in Debug Mode. Assertion Failure
> comes while executing the below mentioned statement.

> typedef List<CString> List_t

> List_t  pList;
> CString  str;

> str  = RerSrcFileName();

> pList.insert(str);

> __crtcheckMemory Assertion Failure comes during insertion in List.

> Can someone tell me what extra effort is required for running my Application
> in debug mode.

> On my machine VC6.0 is not installed. Only .NET Development environment is there.  

> IF there is any bug in VC7 STLs then from, where i can get the upgrade..

> Thanks in advance.

> -
> manoj



Sun, 06 Mar 2005 21:33:36 GMT  
 STL fails while running ported VC6.0 code on VC7
That is not what you are doing in your example. You are adding a CString
object. Can you just try debugging through the insertion?



Quote:
> > This doesn't necessarily have anything to do with the list insertion.
That
> > is just the place the corruption is detected, it probably isn't the
place
> > where it happens.

> > It is extremely likely you have a bug in your code that overwrites
memory.

> > See the following help topic for how to track this with the help of the
CRT:
> > (product docs)

<ms-help://MS.VSCC/MS.MSDNQTR.2002JAN.1033/vsdebug/html/_core_Solving_Buffer
Quote:
> > _Overwrites_and_Memory_Leaks.htm>

> > (online)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsde...
Quote:
> > l/_core_solving_buffer_overwrites_and_memory_leaks.asp

> > Ronald Laeremans
> > Visual C++ compiler and libraries team



> > > Hi,
> > >        I have ported VC6.0 MFC Dialog Based Application on VC7 .NET.
> > > This application is using lots of STLs ( likne Vector, List,Map, Set).

> > > In Release Mode, STLs are not creating problems. Execution of the code
is
> > > successful.   When i try to execute the code in Debug Mode. Assertion
> >  Failure
> > > comes while executing the below mentioned statement.

> > > typedef List<CString> List_t

> > > List_t  pList;
> > > CString  str;

> > > str  = RerSrcFileName();

> > > pList.insert(str);

> > > __crtcheckMemory Assertion Failure comes during insertion in List.

> > > Can someone tell me what extra effort is required for running my
> >  Application
> > > in debug mode.

> > > On my machine VC6.0 is not installed. Only .NET Development
environment is
> >  there.

> > > IF there is any bug in VC7 STLs then from, where i can get the
upgrade..

> > > Thanks in advance.

> > > -
> > > manoj

> Hi,
>     I am trying to find the root causes of Heap corruption..
> the problem that I can see is that I am using List<CString> and inserting
> char* variable in List.  Don't u think this will be the cause of problem
> Every crash results due to CString release/heap allocation function call.

> -
> manoj



Mon, 07 Mar 2005 02:42:31 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Using VC7's STL in VC6?

2. STL interface changed between VC6 and VC7?

3. Using VC7 STL in VC6?

4. STL queue linker error moving from VC6 to VC7

5. STL problem moving from VC6 to VC7 (again :-(

6. compiler error C2582 of STL streams from VC6 to VC7

7. ASSERT in CString::Mid() when porting from VC6 to VC7

8. CControlBar::m_bAutoDelete=TRUE causes shutdown crash porting from VC6 to VC7

9. access violation due to bad CString copy ctor when porting from VC6 to VC7 (VC++.NET)

10. Problem while porting VC6 to VC7

11. Porting from VC6.0 to VC7.0

12. Porting MFC from vc6 to vc7

 

 
Powered by phpBB® Forum Software