当我尝试在发布模式下运行我的程序时,它会直接进入
FPS Game.exe 中 0x6f2426ef (msvcr100.dll) 处未处理的异常:0xC0000005:访问冲突写入位置 0x12817c19。
这是在 onxit.c 第 325 行的静态 _onexit_t __cdecl _dllonexit_nolock 函数中:*((*pend)++) = (_PVFV)func;
而且我不知道为什么我尝试了很多我无法得到它的东西,如果这就是原因,我将 sdl 链接到我的应用程序,但我真的需要帮助。
这是微软出错的代码:
static _onexit_t __cdecl _dllonexit_nolock (
_onexit_t func,
_PVFV ** pbegin,
_PVFV ** pend
)
{
_PVFV *p=NULL;
size_t oldsize;
/*
* First, make sure the table has room for a new entry
*/
if ( (oldsize = _msize_crt(*pbegin)) <= (size_t)((char *)(*pend) -
(char *)(*pbegin)) )
{
/*
* not enough room, try to grow the table
*/
size_t grow=__min(oldsize, MAXINCR * sizeof(_PVFV));
if((_HEAP_MAXREQ-grow<oldsize) ||
((p = (_PVFV *)_realloc_crt((*pbegin), oldsize + grow)) == NULL))
{
/*
* failed, try to grow by ONEXITTBLINCR
*/
grow=MININCR * sizeof(_PVFV);
if ( (_HEAP_MAXREQ-grow<oldsize) ||
((p = (_PVFV *)_realloc_crt((*pbegin), oldsize + grow)) == NULL ))
{
/*
* failed again. don't do anything rash, just fail
*/
return NULL;
}
}
/*
* update (*pend) and (*pbegin)
*/
(*pend) = p + ((*pend) - (*pbegin));
(*pbegin) = p;
}
/*
* Put the new entry into the table and update the end-of-table
* pointer.
*/
*((*pend)++) = (_PVFV)func;
return func;
}