All libraries are built by myself, using the same IDE as for the samples
All testing dome under the up-to-date Win 10 OS with an up-to-date MSVC community edition IDE
the full stack trace at the time of the crash below - with the Exception message:
Exception thrown at 0x76F341CA (kernel32.dll) in debugrpt.exe: 0xC0000005: Access violation reading location 0x868BF18F.
Code: Select all
kernel32.dll!IsBadReadPtr() Unknown
> debugrpt.exe!wxDbgHelpDLL::DereferenceSymbol(_SYMBOL_INFOW * pSym, void * * ppData) Line 584 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 417 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 431 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 431 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 431 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 383 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 431 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 431 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 431 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 431 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpField(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 383 C++
debugrpt.exe!wxDbgHelpDLL::DumpUDT(_SYMBOL_INFOW * pSym, void * pVariable, unsigned int level) Line 547 C++
debugrpt.exe!wxDbgHelpDLL::DumpSymbol(_SYMBOL_INFOW * pSym, void * pVariable) Line 610 C++
debugrpt.exe!wxStackFrame::OnParam(_SYMBOL_INFOW * pSymInfo) Line 121 C++
debugrpt.exe!EnumSymbolsProc(_SYMBOL_INFOW * pSymInfo, unsigned long __formal, void * data) Line 146 C++
[External Code]
debugrpt.exe!wxDbgHelpDLL::CallSymEnumSymbols(void * hProcess, unsigned __int64 baseOfDll, int(__stdcall*)(_SYMBOL_INFOW *, unsigned long, void *) callback, void * const callbackParam) Line 920 C++
debugrpt.exe!wxStackFrame::OnGetParam() Line 172 C++
debugrpt.exe!wxStackFrame::GetParamCount() Line 55 C++
debugrpt.exe!XmlStackWalker::OnStackFrame(const wxStackFrame & frame) Line 145 C++
debugrpt.exe!wxStackWalker::WalkFrom(const _CONTEXT * pCtx, unsigned int skip, unsigned int maxDepth) Line 279 C++
debugrpt.exe!wxStackWalker::WalkFrom(const _EXCEPTION_POINTERS * ep, unsigned int skip, unsigned int maxDepth) Line 292 C++
debugrpt.exe!wxStackWalker::WalkFromException(unsigned int maxDepth) Line 305 C++
debugrpt.exe!wxDebugReport::AddContext(wxDebugReport::Context ctx) Line 492 C++
debugrpt.exe!wxDebugReport::AddAll(wxDebugReport::Context context) Line 337 C++
debugrpt.exe!MyApp::GenerateReport(wxDebugReport::Context ctx) Line 429 C++
debugrpt.exe!MyApp::OnFatalException() Line 415 C++
debugrpt.exe!wxGlobalSEHandler(_EXCEPTION_POINTERS * pExcPtrs) Line 93 C++
debugrpt.exe!wxWndProc(HWND__ * hWnd, unsigned int message, unsigned int wParam, long lParam) Line 2850 C++
[External Code]
debugrpt.exe!bar(const char * p) Line 123 C++
debugrpt.exe!foo(int n) Line 138 C++
debugrpt.exe!MyFrame::OnReportForCrash(wxCommandEvent & __formal) Line 339 C++
debugrpt.exe!wxAppConsoleBase::HandleEvent(wxEvtHandler * handler, void(wxEvtHandler::*)(wxEvent &) func, wxEvent & event) Line 657 C++
debugrpt.exe!wxAppConsoleBase::CallEventHandler(wxEvtHandler * handler, wxEventFunctor & functor, wxEvent & event) Line 669 C++
debugrpt.exe!wxEvtHandler::ProcessEventIfMatchesId(const wxEventTableEntryBase & entry, wxEvtHandler * handler, wxEvent & event) Line 1396 C++
debugrpt.exe!wxEventHashTable::HandleEvent(wxEvent & event, wxEvtHandler * self) Line 1004 C++
debugrpt.exe!wxEvtHandler::TryHereOnly(wxEvent & event) Line 1593 C++
debugrpt.exe!wxEvtHandler::TryBeforeAndHere(wxEvent & event) Line 3873 C++
debugrpt.exe!wxEvtHandler::ProcessEventLocally(wxEvent & event) Line 1526 C++
debugrpt.exe!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1499 C++
debugrpt.exe!wxWindowBase::TryAfter(wxEvent & event) Line 3456 C++
debugrpt.exe!wxEvtHandler::ProcessEvent(wxEvent & event) Line 1512 C++
debugrpt.exe!wxEvtHandler::SafelyProcessEvent(wxEvent & event) Line 1617 C++
debugrpt.exe!wxWindowBase::HandleWindowEvent(wxEvent & event) Line 1540 C++
debugrpt.exe!wxMenuBase::DoProcessEvent(wxMenuBase * menu, wxEvent & event, wxWindow * win) Line 673 C++
debugrpt.exe!wxMenuBase::SendEvent(int itemid, int checked) Line 643 C++
debugrpt.exe!wxFrameBase::ProcessCommand(wxMenuItem * item) Line 295 C++
debugrpt.exe!wxFrame::HandleCommand(unsigned short id, unsigned short cmd, HWND__ * control) Line 798 C++
debugrpt.exe!wxFrame::MSWWindowProc(unsigned int message, unsigned int wParam, long lParam) Line 855 C++
debugrpt.exe!wxWndProc(HWND__ * hWnd, unsigned int message, unsigned int wParam, long lParam) Line 2846 C++
[External Code]
debugrpt.exe!wxGUIEventLoop::ProcessMessage(tagMSG * msg) Line 167 C++
debugrpt.exe!wxGUIEventLoop::Dispatch() Line 227 C++
debugrpt.exe!wxEventLoopManual::ProcessEvents() Line 223 C++
debugrpt.exe!wxEventLoopManual::DoRun() Line 268 C++
debugrpt.exe!wxEventLoopBase::Run() Line 76 C++
debugrpt.exe!wxAppConsoleBase::MainLoop() Line 380 C++
debugrpt.exe!wxAppConsoleBase::OnRun() Line 301 C++
debugrpt.exe!wxAppBase::OnRun() Line 336 C++
debugrpt.exe!wxEntryReal(int & argc, wchar_t * * argv) Line 507 C++
debugrpt.exe!wxEntry(int & argc, wchar_t * * argv) Line 184 C++
debugrpt.exe!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ * __formal, char * __formal, int nCmdShow) Line 305 C++
debugrpt.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 227 C++
[External Code]
The crash happens in
Code: Select all
/* static */
wxDbgHelpDLL::SymbolTag
wxDbgHelpDLL::DereferenceSymbol(wxPSYMBOL_INFO pSym, void **ppData)
{
SymbolTag tag = SYMBOL_TAG_NULL;
for ( ;; )
{
if ( !DoGetTypeInfo(pSym, TI_GET_SYMTAG, &tag) )
break;
if ( tag != SYMBOL_TAG_POINTER_TYPE )
break;
ULONG tiNew;
if ( !DoGetTypeInfo(pSym, TI_GET_TYPEID, &tiNew) ||
tiNew == pSym->TypeIndex )
break;
pSym->TypeIndex = tiNew;
// remove one level of indirection except for the char strings: we want
// to dump "char *" and not a single "char" for them
if ( ppData && *ppData && GetBasicType(pSym) != BASICTYPE_CHAR )
{
DWORD_PTR *pData = (DWORD_PTR *)*ppData;
if ( ::IsBadReadPtr(pData, sizeof(DWORD_PTR *)) ) <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
{
break;
}
*ppData = (void *)*pData;
}
}
return tag;
}
When I first ran into the problem with my own code, I thought it might be because not all of the libraries I link against have debug information. So I tried the example - debug version and the problem is very much the same, same place, same message.
3.1.3 - not tried, never even downloaded it - yet, though it might be worth a try.