_block_type_is_invalid assertion failure

AshMcConnell
Posts: 29
Joined: Sat Sep 23, 2006 1:35 pm
Location: Northern Ireland

_block_type_is_invalid assertion failure

Post by AshMcConnell »

Hi Folks,

Stupid question, but has anyone had this problem when upgrading the bullet collision detection project in VC8.0?

I have updated the CodeGeneration -> Runtime library to Multithreaded Debug DLL (MDd).

I remember that I did something to get rid of this the last time I added the latest library. I just can't remember what it was! Can anyone help, i've been stuck for a few hours now :(

I know its not a coding error as I've not changed anything, its probably just a compiler / linker setting or something.

All the best,
Ash
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: _block_type_is_invalid assertion failure

Post by Erwin Coumans »

AshMcConnell wrote:Hi Folks,

I have updated the CodeGeneration -> Runtime library to Multithreaded Debug DLL (MDd).
Did you make sure to set the same setting for _all_ project/libraries etc.?
Also, you need a full clean/rebuild all.

Next time, you better rename your projectfiles, so they don't get overwritten by bullet. There are only a few files that need to be added usually.

Thanks,
Erwin
Juicebox
Posts: 1
Joined: Thu Feb 17, 2011 9:47 am

Re: _block_type_is_invalid assertion failure

Post by Juicebox »

Hi,

Just in case for other developers, i've got this error too but because of another mistake.

Indeed, it is possible to pre-declare a class without including the associated source (where the class is defined) and
call a "delete" on a variable using the declared class. The C++ compiler will just call the default delete operator...

In Bullet, if i'm right, there is new and delete operator redefined for aligned allocation in each class.

So, if some Bullet class instance is created somewhere and deleted somewhere else without the class defined, it will result
in a call of a redefined new and then a call of the default delete => Incompatibility new/delete => _BLOCK_TYPE_IS_VALID assertion failure.

Conclusion : Check your bullet includes where the delete is called ;)