_BLOCK_TYPE_IS_VALID assertion error

This is a discussion on _BLOCK_TYPE_IS_VALID assertion error within the C++ Programming forums, part of the General Programming Boards category; From my search on Google on this topic, I am aware that the most common error associated with this error ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    222

    _BLOCK_TYPE_IS_VALID assertion error

    From my search on Google on this topic, I am aware that the most common error associated with this error message to be writing to memory outside the dynamic memory bounds. However, as I traced back to the variable responsible for this assertion error, I have a lot of problems finding code segments that is indexing outside the array's bounds. Would there be other problems associated with this error that I'm not aware of? Thanks.
    Attached Images Attached Images  

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,455
    Either memory corruption (writing outside bounds) or passing in an invalid pointer can also be a cause. Use the debugger with data breakpoints to monitor the address in question to see if you can't catch the culprit.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    And it isn't necessarily true that the block which generates the assertion is the block which was overflowed -- it could have been an adjacent block, or in the case of a truly monstrous overflow, a block far from the block where the error was reported.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    222
    Quote Originally Posted by brewbuck View Post
    And it isn't necessarily true that the block which generates the assertion is the block which was overflowed -- it could have been an adjacent block, or in the case of a truly monstrous overflow, a block far from the block where the error was reported.
    Do you happen to have an example of what is a truly monstrous overflow? At this point, I still have no idea of exactly which block is causing the overflow. What kind of CRT debug tools from Visual Studio is available for me to use for finding this out?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Testing some code, lots of errors...
    By Sparrowhawk in forum C Programming
    Replies: 48
    Last Post: 12-15-2008, 03:09 AM
  3. how do you resolve this error?
    By -EquinoX- in forum C Programming
    Replies: 32
    Last Post: 11-05-2008, 03:35 PM
  4. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  5. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 04:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21