I found the root cause...
It cause on next instruction
char msg[1024] = {0};
// ...
PyTaskEvent event( wxEVT_PYTASK, -1 );
event.SetString(wxString::Format(_T("SocketThread %d\n%s"), count, wxString::FromUTF8(msg)));
Crash at Format convert wxString to %s!?
CB will stop callstack at "PyTaskEvent event( wxEVT_PYTASK, -1 );"
Sorry to bother you...
BTW, where can I found wxString::Format() parameter mapping with wchar_t*, char* and wxString?