This is stressing me so much! It's a weird error that occurs very often but not all the time. Basically if i change the build mode from debug to release and viceversa and then clean & build it will eventually show up. This error show up at program initializaion at the very first time vorbis_synthesis_init is called.
The code looks like this:
int main()
{
vorbis_info vi = {0};
vorbis_info_init(&vi);
vorbis_info_clear (&vi); // crash occurs here
// other stuff
....
}
And the stack looks like this:
ntdll.dll!7c901230()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!7c96c943()
ntdll.dll!7c96cd80()
ntdll.dll!7c960af8()
kernel32.dll!7c85e9cf()
Endeavour.exe!_CrtIsValidHeapPointer(const void * pUserData=0x003d5fb8) Line 2103 C++
Endeavour.exe!_free_dbg_nolock(void * pUserData=0x003d5fb8, int nBlockUse=1) Line 1317 + 0x9 bytes C++
Endeavour.exe!_free_dbg(void * pUserData=0x003d5fb8, int nBlockUse=1) Line 1258 + 0xd bytes C++
Endeavour.exe!free(void * pUserData=0x003d5fb8) Line 49 + 0xb bytes C++
Endeavour.exe!_vorbis_info_clear() + 0x14e bytes
> Endeavour.exe!main() Line 149 + 0x9 bytes C++
Endeavour.exe!__tmainCRTStartup() Line 266 + 0x19 bytes C
Endeavour.exe!mainCRTStartup() Line 182 C
kernel32.dll!7c816fd7()
I'm wondering what debug options i have in this case. It seems i'm running out of ideas...
Also, I am using the latest vorbis library.
I am assuming this is my fault because if i compile only 1 .cpp(main) with the code posted above it does not crash(currently i am compiling more than one source file but the code that crashes is always called first).