c++ - wxWidgets debug assertion failed, xtree not deferencable, when modifying wxTextCtrl value -
when come in wxdialog , focus 1 wxtextctrl nil bad happens modify in text, deleting 1 character, application crashes message:
"debug assertion failed: map/set iterator not dereferencable"
the lastly method found out called before crashing one:
bool wxwindowmsw::handlekillfocus(wxhwnd hwnd) { #if wxuse_caret // deal caret if ( m_caret ) { m_caret->onkillfocus(); } #endif // wxuse_caret #if wxuse_textctrl // if it's wxtextctrl don't send event done // after command gets process it. wxtextctrl *ctrl = wxdynamiccastthis(wxtextctrl); if ( ctrl ) { homecoming false; } #endif // don't send event when in process of beingness deleted. can // cause problems if event handler tries access object. if ( m_isbeingdeleted ) { homecoming false; } wxfocusevent event(wxevt_kill_focus, m_windowid); event.seteventobject(this); // wxfindwinfromhandle() may homecoming null, ok event.setwindow(wxfindwinfromhandle(hwnd)); homecoming geteventhandler()->processevent(event); } while running application, method called many times; ctrl having value of 0x00000000 time , therefor not returning false in first if clause. while beingness within dialog , modifying text, value of ctrl changes real value 0x031194b0; enters if clause, returns false, , crashes.
the problem came code modification still not find how have effect. internal behaviour of wxwidgets library maybe?
c++ wxwidgets
No comments:
Post a Comment