in C++ "unhandled exception at 0x778215de in prject1.exe: 0xC0000005:Access violating writing location 0x00000016"

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?

exception
unhandled
asked on Stack Overflow Apr 11, 2013 by 11532 • edited Apr 11, 2013 by Cheran Shunmugavel

1 Answer

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.

answered on Stack Overflow Apr 11, 2013 by bash.d

User contributions licensed under CC BY-SA 3.0