I am encountering sporadic _SCL_SECURE_OUT_OF_RANGE assertions in CFrame::CollectInvalidRects::addRect() on Windows with Direct2D as the backend.
The relevant part of the callstack, after calling invalid() on e.g. a CTextEdit, looks like this:
std::_Vector_const_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > >::operator*()
std::_Vector_iterator<std::_Vector_val<std::_Simple_typesVSTGUI::CRect > >::operator*()
VSTGUI::CFrame::CollectInvalidRects::addRect(const VSTGUI::CRect & rect)
VSTGUI::CFrame::invalidRect(const VSTGUI::CRect & rect)
VSTGUI::CView::invalidRect(const VSTGUI::CRect & rect)
Another callstack that also has something to do with CFrame::CollectInvalidRects looks like this
std::_DeallocateVSTGUI::CRect(VSTGUI::CRect * _Ptr, unsigned __int64 _Count)
std::allocatorVSTGUI::CRect::deallocate(VSTGUI::CRect * _Ptr, unsigned __int64 _Count)
std::_Wrap_alloc<std::allocatorVSTGUI::CRect >::deallocate(VSTGUI::CRect * _Ptr, unsigned __int64 Count)
std::vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >::Tidy()
std::vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >::~vector<VSTGUI::CRect,std::allocatorVSTGUI::CRect >()
VSTGUI::CFrame::CollectInvalidRects::~CollectInvalidRects()
VSTGUI::CFrame::platformOnMouseMoved(VSTGUI::CPoint & where, const VSTGUI::CButtonState & buttons)
VSTGUI::Win32Frame::WindowProc(HWND * hwnd, unsigned int message, unsigned __int64 wParam, __int64 lParam)
The issue doesn’t occur if I define VSTGUI_DIRECT2D_SUPPORT as 0 and use Gdiplus as the backend. This however isn’t a possible solution in my case, because I rely on Direct2D’s ability to scale CBitmaps on the fly.
EDIT: I was wrong about the idea that it doesn’t occur in Gdiplus, but I get a _SCL_SECURE_INVALID_ARGUMENT assertion here instead.
Is this a known issue and if so, what can I do about it?
Thanks!