0

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?

Cheran Shunmugavel
  • 8,319
  • 1
  • 33
  • 40
11532
  • 1
  • 3

1 Answers1

0

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.

bash.d
  • 13,029
  • 3
  • 29
  • 42