![]() |
| ||
| Debug assertion failed Hi all, I got this assertion problem that i cant seem to solve, could you guys help me on this. So far, i think the problem might be due to the while loop for the iterator line by line check and i have made changes to it but still cant solve it. Debug assertion failed file:f\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c Line: 1317 Expression: _CrtIsValidHeappointer(pUserData) file:f\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c Line: 1419 Expression: _pFirstBlock == pHead private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) |
| ||
| Re: Debug assertion failed You've trashed your allocated memory pool. Unfortunately, the code you've posted is probably OK (if you've been staring at it for that long without solving the problem). The thing of it is, where the fault occurred (the real code you need to fix) is seldom the same as the code which notices there's a problem (the code you posted). It's this remoteness of "cause" and "effect" which really takes the time in solving these kinds of problems. The fact that your code hasn't crashed up to now just makes you lucky, not good. What you do about it now however is harder to say. You could look at the MALLOC_DBG options, and cause it to call the pool-checking functions on every alloc/free call. This will slow it down, but it will notice the problem a lot sooner. |
| ||
| Re: Debug assertion failed The weird part is that it had no problem compiling and executing in any com with vc++ 2008 express edition. Initially, it could not even be executed in com without vc++ express installed, come with error saying->"application failed to start because application configuration is incorrect. reinstalling the application may fixed the problem". I did followed msdn example of copying the msvcr, msvcm, msvcp.dll and a manifest file into the same folder as the .exe file for those com which dont have vc++ express installed. Then it was able to execute but disappointingly come with the above mentioned error which i cant seem to solve. Current changes are those ifstream i had changed to fstream but still cant solve it. Can someone kind enough to spare some time on this and give me some advices, pointers or any link that can assist me. Thanks in advance. |
| ||
| Re: Debug assertion failed On the folder "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86" on the PC with installed Visual Studio 8 placed the file "vcredist_x86.exe" (for VS 2008 installation there are similar redistributable package). Sometimes running this installer on the machine without installed development environment can bring better results than copying the required MFC and CRT dlls to the system PATH of that computer. |
| ||
| Re: Debug assertion failed Quote:
I have tried installing the vcredist_x86 on target com with no Microsoft Visual studio but it cant even be executed. after pasting the dlls then it can be executed. during debugging, after i exited my program i saw red wording in the stack frame: xxx.exe!main(array<system::string^>^args={Length=0})Line 17. Anyone know what causes this? or is this the cause to my assertion failed? int main(array<System::String ^> ^args) |
| ||
| Re: Debug assertion failed Quote:
Im glad that the problem is not due to my code but because vc++ express is free so it has its limitation. Sad and angry that i spent quite a considerable amount of time on it which seem is fruitless. |
| All times are GMT -4. The time now is 1:17 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC