Access Voilation in std::pair
- by sameer karjatkar
I have an application which is trying to populate a pair . Out of no where the application crashes .
The Windbg analysis on the crash dump suggest
PRIMARY_PROBLEM_CLASS: INVALID_POINTER_READ
DEFAULT_BUCKET_ID: INVALID_POINTER_READ
STACK_TEXT:
0389f1dc EPFilter32!std::vector,std::allocator ::size+0xc
INVALID_POINTER_READ_c0000005_Test.DLL!std::vector_std::pair_unsigned_int,
unsigned_int_,std::allocator_std::pair_unsigned_int,unsigned_int___::size
Following is the statement in the code where it fails
const branch_info& b1 = en1.m_branches[i1];
where branch_info is std::pair
and the en1.m_branches[i1] fetches me a pair value