I have downloaded PVRTexLib 4.04 (Build: 18.104.22.16858) to update a project that used an older version of the library. I have done some tests and came to the conclusion that while using the Windows 32-bit version of the library (both static and dynamic) there is some kind of memory error. Whenever the destructor of CPVRTextureHeader is called, I get an assertion failed on _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) [searching for the cause seems that there is a double delete somewhere deep in the library]. My operating system is Windows 7 64 bit and the compiler is Visual Studio 2010 Professional. A program as simple as the following crashes:
CPVRTextureHeader *sourceHeader = new CPVRTextureHeader(PVRStandard8PixelType.PixelTypeID,
CPVRTexture *sourceTexture = new CPVRTexture(&sourceHeader);
if (sourceTexture != NULL)
delete sourceHeader; // Calling this crashes the program. Otherwise, memory isn’t freed and therefore leaks.