Re: MSVC2005: problem with valarray<valarray<T> >
- From: Abdelrazak Younes <younes.a@xxxxxxx>
- Date: Fri, 25 Aug 2006 15:23:34 +0200
Abdelrazak Younes wrote:
Igor Tandetnik wrote:The program compiles and runs successfully without crashing. Show the complete program that actually produces a crash.
Yes, I did that also and it worked. I guess the problem is elsewhere and that this valarray use is not at cause. It seems that the memory is corrupted somewhere else before because when I insert those two lines before the array2d construction it crashes the same at the delete call:
char * Line_str = new char[10000];
delete Line_str;
Very weird... I guess I have to go step by step through the program to see if there's a problem somewhere... I don't understand though why this problem doesn't show up with VC6...
I know where the problems lies, this simple program crashes for me:
int main(int argc, char * argv[])
{
char * Line_str = new char[10000];
delete[] Line_str;
return 0;
..... the rest of my program ...
}
I have this dialog:
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: d:\PEGASUS\SVN-2005\delivery_debug\gnss_core.exe
File: dbgdel.cpp
Line: 52
Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
And here is the backtrace:
msvcr80d.dll!102527a6()
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr80d.dll]
mfc42.dll!5f403844()
msvcr80d.dll!1026917c()
gnss_core.exe!main(int argc=5, char * * argv=0x00a55f20) Line 25 + 0x15 bytes C++
Could it be that it is because my program is linked to a library that uses mfc42?
Abdel.
.
- Follow-Ups:
- Re: MSVC2005: problem with valarray<valarray<T> >
- From: Alex Blekhman
- Re: MSVC2005: problem with valarray<valarray<T> >
- References:
- MSVC2005: problem with valarray<valarray<T> >
- From: Abdelrazak Younes
- Re: MSVC2005: problem with valarray<valarray<T> >
- From: Alex Blekhman
- Re: MSVC2005: problem with valarray<valarray<T> >
- From: Abdelrazak Younes
- Re: MSVC2005: problem with valarray<valarray<T> >
- From: Igor Tandetnik
- Re: MSVC2005: problem with valarray<valarray<T> >
- From: Abdelrazak Younes
- MSVC2005: problem with valarray<valarray<T> >
- Prev by Date: Re: MSVC2005: problem with valarray<valarray<T> >
- Next by Date: Re: MSVC2005: problem with valarray<valarray<T> >
- Previous by thread: Re: MSVC2005: problem with valarray<valarray<T> >
- Next by thread: Re: MSVC2005: problem with valarray<valarray<T> >
- Index(es):
Relevant Pages
|