No error or warning during compile and build period.
When I run the problem(debug mode) and when it goes to mu::Parser myParser;
There is an error like this:
Windows has triggered a breakpoint in cascade.exe.
This may be due to a corruption of the heap, and indicates a bug in myParser.exe or any of the DLLs it has loaded.
The output window may have more diagnostic information.
The debug run stops at a xutility file which is a "xutility internal header".
If I continue the run, finally the following error occurs!
Debug Assertion Failed!
Program: ...
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++ documention on asserts.
However, the Release run is ok.
And the codes works well in Visual C++ 6.0 under Debug and Release mode!
I am searching the method to cop with this.
1)http://www.tek-tips.com/viewthread.cfm?qid=1228487&page=5
... something is being deleted twice. When ever you do a delete, be sure to set the pointer to 0 so a second delete will not cause issue.
2)
writing into unallocated memory (either on the heap or on the stack).
3)etc.
But the above advice seems not useful!
没有评论:
发表评论