I have C++ app that contains std::list of custom structs. However, in debug mode (release is working), app crashes after several calls of clear with
0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
inside library method void _Orphan_non_end() noexcept { // orphan iterators except end()
and variable _Iterator_base12** _Pnextnext = &(*_Pnext)->_Mynextiter
; is 0xdddddddddddddde5
.
I cannot locate the problem nor create a minimal working example that will crash, so I guess the problem is somewhere else (heap corruption?) in the program. I have tried to run "Application Verifier" but with no luck. How can I find the source of the problem?
I am using Visual Studio 2022, Windows app, x64 mode