vcruntime140.dll!purecall+0x34
wxmsw31u_core_vc_x64_custom.dll!wxTextEntryHintData::RestoreTextColourIfNecessary+0x22 - d:\externals.dev\wxwidgets_v3_1_0\src\common\textentrycmn.cpp(109)
wxmsw31u_core_vc_x64_custom.dll!wxTextEntryHintData::OnSetFocus+0x42 - d:\externals.dev\wxwidgets_v3_1_0\src\common\textentrycmn.cpp(124)
wxbase31u_vc_x64_custom.dll!wxEvtHandler::SearchDynamicEventTable+0xfe - d:\externals.dev\wxwidgets_v3_1_0\src\common\event.cpp(1831)
wxbase31u_vc_x64_custom.dll!wxEvtHandler::TryHereOnly+0x22 - d:\externals.dev\wxwidgets_v3_1_0\src\common\event.cpp(1574)
wxbase31u_vc_x64_custom.dll!wxEvtHandler::ProcessEvent+0xe5 - d:\externals.dev\wxwidgets_v3_1_0\src\common\event.cpp(1484)
wxmsw31u_core_vc_x64_custom.dll!wxWindow::HandleSetFocus+0xcd - d:\externals.dev\wxwidgets_v3_1_0\src\msw\window.cpp(3978)
wxmsw31u_core_vc_x64_custom.dll!wxWindow::MSWHandleMessage+0x171 - d:\externals.dev\wxwidgets_v3_1_0\src\msw\window.cpp(2791)
wxmsw31u_core_vc_x64_custom.dll!wxTextCtrl::MSWHandleMessage+0x33 - d:\externals.dev\wxwidgets_v3_1_0\src\msw\textctrl.cpp(2067)
wxmsw31u_core_vc_x64_custom.dll!wxWindow::MSWWindowProc+0x38 - d:\externals.dev\wxwidgets_v3_1_0\src\msw\window.cpp(3524)
wxmsw31u_core_vc_x64_custom.dll!wxWndProc+0x9b - d:\externals.dev\wxwidgets_v3_1_0\src\msw\window.cpp(2668)
The scenario is that I have one wxTextCtrl. It has both text and hint set. Then I set empty text in code in text ctrl. Then I set some text again and when I click on the control, we have this crash.
I'm handling wxEVT_TEXT and wxEVT_CHAR_HOOK events but according to docs (http://docs.wxwidgets.org/trunk/classwx ... be83f1bed4), I'm using event.Skip(). I'm also using only ChangeValue() and SetValue() methods so this shouldn't be a problem. Do you have any ideas what I might be missing?
EDIT:
I tracked down that the issue happens when I use SetHint for empty string.
In
Code: Select all
bool wxTextEntryBase::SetHint(const wxString& hint)
{
// Hint contents would be shown hidden in a password text entry anyhow, so
// we just can't support hints in this case.
if ( GetEditableWindow()->HasFlag(wxTE_PASSWORD) )
return false;
if ( !hint.empty() )
{
if ( !m_hintData )
m_hintData = new wxTextEntryHintData(this, GetEditableWindow());
m_hintData->SetHintString(hint);
}
else if ( m_hintData )
{
// Setting empty hint removes any currently set one.
delete m_hintData;
m_hintData = NULL;
}
//else: Setting empty hint when we don't have any doesn't do anything.
return true;
}