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 / February 2004

Tip: Looking for answers? Try searching our database.

runtime crashes using MS STL libraries in VS .Net.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sandeep - 19 Feb 2004 13:32 GMT
Hi all,
   I was using earlier using Dinkumware STL librarires in VC6.0, now while
migrating to VC7.1 i started using MS lib ( for e.g. xtree file).
   Everything compiled fine with minor changes but now I am getting strange
memory corruptions while using the Queue (gives access violation while
trying to delete).
   I wonder if this is a bug with MS library, or what else could be the
problem? Does anyone faced such probelms (i saw similar one about bug in
vector's iterator implementation.).
Can I get Dinkumware's trial STL library to see if it has any fix for such
an issue, so that I can revert back to Dinkumware?

Thanks in advance,
Sandip
Sven Carstensen - 20 Feb 2004 17:18 GMT
Hi sandeep,

> Hi all,
>     I was using earlier using Dinkumware STL librarires in VC6.0, now while
> migrating to VC7.1 i started using MS lib ( for e.g. xtree file).
>     Everything compiled fine with minor changes but now I am getting strange
> memory corruptions while using the Queue (gives access violation while
> trying to delete).

Are your allocations and deletions in the same module or are you passing
objects around different dlls or exe/dll? If so you must ensure to use the
shared dll c++ runtime in all modules so that every module is using the same
heap. Even better would be to have every module control exclusively its own
memory allocation/deallocation. So you could mix modules with different
runtime versions.

--
SvenC
[mail: swap first letters of first and family name, reverse domain]
tom_usenet - 26 Feb 2004 13:57 GMT
>Hi all,
>    I was using earlier using Dinkumware STL librarires in VC6.0, now while
>migrating to VC7.1 i started using MS lib ( for e.g. xtree file).

Both libs are Dinkumware, VC7.1 has a much more recent version.

>    Everything compiled fine with minor changes but now I am getting strange
>memory corruptions while using the Queue (gives access violation while
>trying to delete).

Sounds like you've corrupted the heap somewhere.

>    I wonder if this is a bug with MS library, or what else could be the
>problem? Does anyone faced such probelms (i saw similar one about bug in
>vector's iterator implementation.).

I doubt this is an MS bug, it is probably a bug in your code that
didn't cause a crash under VC6 (but possibly silently did something
wrong), but fortunately does cause a crash under VC7.1 (so at least
you have a hope of finding the problem).

>Can I get Dinkumware's trial STL library to see if it has any fix for such
>an issue, so that I can revert back to Dinkumware?

You can get a more recent version of Dinkumware than the one shipped
with VC7.1, but I doubt they've fixed anything in <queue> - you could
ask them (try microsoft.public.vc.stl - PJ Plauger and Pete Becker
read posts there).

Tom
Signature

C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html


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.