1

Topic: The debugger produces an error

I develop the conversational program on a Visual Studio 2012. And at me in a debugger jumps out the message: Debug Assertion Failed! Program: F:\Roman\Roman\MyProgram\MyProgram\Debug\MyProgram.exe File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c Line: 1332 Expression: _CrtIsValidHeapPointer (pUserData) That it means? How to rectify this error?

2

Re: The debugger produces an error

Hello, RussianFellow, you wrote: RF> Expression: _CrtIsValidHeapPointer (pUserData) RF> [/q] RF> That it means? How to rectify this error? Normally such happens at attempt of repeated clearing of storage or at attempt to cause detele for an array (created new []) and on the contrary to cause delete [] for the pointer single object

3

Re: The debugger produces an error

Hello, RussianFellow, you wrote: RF> I develop the conversational program on a Visual Studio 2012. RF> And at me in a debugger jumps out the message: It not the debugger produces an error. It is the program produces an error, and  is able to show it. RF> RF> File: f:\dd\vctools\crt_bld\self_x86\crt\src\dbgheap.c the Word heap in a file title as hints that it is a question of storage selection/clearing. RF> RF> Expression: _CrtIsValidHeapPointer (pUserData) words IsValidHeapPointer as though hint that is a question of validity check (IsValid) the pointer (Pointer) on a certain object in a heap (Heap). And words UserData as though hint that the pointer has been received from "user" (User). And as it is a question of a C run-time library (CRT) its user is the program which uses it. Adding all together, we can assume that to library has been transferred  the pointer. As in a context of selection/clearing of storage the pointer is transferred to library normally for the purpose of clearing, and occasionally for the purpose of reselection (realloc) we go to source codes of the program and we try to understand, from what she would try to release something that the library does not consider  (i.e., earlier selected) as object. Normally such happens, when a storage piece release twice, or try to release what did not take (for example earlier, the pointer on static object, on object on a stack, or on the middle quite  object, or generally in the pointer the garbage contains, i.e., we forgot to suppose in it intelligent value).

4

Re: The debugger produces an error

And how to localize this error? ASSERT_VALID to put?

5

Re: The debugger produces an error

Check up that all ID is dialogue in resource.h different.