When I am debugging a project, gives me an error on the window
unhandled exception at 0x778215de in prject1.exe: 0xC0000005:
Access violating writing location 0x00000016
And in mlock.c
shows me that code lines:
void __cdecl _unlock (
int locknum
)
{
/*
* leave the critical section.
*/
LeaveCriticalSection( _locktable[locknum].lock );
}
How can I solve this problem?
Looks like you are accessing your array out of its bounds... You should check if your array contains more than 22
items.
OR
You should check if the item is properly initialized at position 22
.
User contributions licensed under CC BY-SA 3.0