error about that use the function Transcode() of PVRTexLib on the windows

when i run my aplication , the vs2008 ouput the error : The value of ESP was not properly saved across a function call

and i use the static lib… anyone can help me??

Hi wpp,



PVRTexLib was created with VS2010 - using any other version of VS can produce a number of undefined results such as that which you’ve encountered above. Unfortunately there’s not much we can do about it, the only way to avoid the problem is to upgrade to VS2010 (or VS2012 using the VS2010 toolset should work).



Thanks,

Tobias

hi , i use the vs2010 and vs 2012 , end the error is therea also…

and i use the debug build

Hi wpp,



I had to search for the answer to this, but according to this stackoverflow post, it’s probably caused by one of two things.



It’s possible that you’re using a version of the header file which is incorrect, though I’ve never changed the function definition for this, so it’d have to be something you’ve modified yourself. It’s also possible if you’re calling the function that calls “Transcode” with a different declaration to the implementation. It’s worth a cursory check to make sure that the headers are correct.



The other possible scenario is that the stack has become corrupted somehow, usually from an invalid pointer being accessed.



If you’re getting this in a minimal application without much else going on (or it worked fine before you added the Transcode call) could you share with me the code which replicates the issue? If I can see all the interaction with PVRTexLib, I should be able to spot any obvious errors.



Thanks,

Tobias

Every time I had this happen to me was because of stack corruption caused by plain memory overrun type of bugs.