From: bernd on 27 May 2010 05:15 Hi, sometimes I get a debug error message (ASSERT: Unhandled exception at 0x7c812afb in docviewtest.exe: Microsoft C++ exception: CResourceException at memory location 0x00f4fc38..) The error occured in the wincore.cpp ------------- LPCTSTR AFXAPI AfxRegisterWndClass(UINT nClassStyle, HCURSOR hCursor, HBRUSH hbrBackground, HICON hIcon) return lpszName; //<- debugger stopps here } The output window showed the following messages: ---------------------------------------- OnNewDocument() Snmp-Thread Http-Thread Snmp-Thread Http-Thread 'docviewtest.exe': Loaded 'C:\WINDOWS\system32\mswsock.dll', Cannot find or open the PDB file 'docviewtest.exe': Loaded 'C:\WINDOWS\system32\hnetcfg.dll', Cannot find or open the PDB file 'docviewtest.exe': Loaded 'C:\WINDOWS\system32\wshtcpip.dll', Cannot find or open the PDB file Can't register window class named Afx:00400000:0 First-chance exception at 0x7c812afb in docviewtest.exe: Microsoft C++ exception: CResourceException at memory location 0x00f4fc38.. First-chance exception at 0x7c812afb in docviewtest.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000.. Unhandled exception at 0x7c812afb in docviewtest.exe: Microsoft C++ exception: CResourceException at memory location 0x00f4fc38.. ------------------------------------- OnNewDocument is a Trace message within the same method; Http-Thread is a Trace message within HttpSoc::InitInstance() as well as Snmp- Thread is a Trace message within SnmpSoc::InitInstance(). So it seems that both InitInstances are called twice at the startup (if tried to set a breakpoint at this trace messages to debug this phenomenon but it failed, because now the function is only called once). After the main window is shown I install two threads, m_httpThread = (HttpThread*)AfxBeginThread(RUNTIME_CLASS(HttpThread), THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED); Maybe someone of you have some hints to find the error. best regards Bernd
From: Hans-J. Ude on 27 May 2010 08:07 bernd schrieb: >The error occured in the wincore.cpp >------------- >LPCTSTR AFXAPI AfxRegisterWndClass(UINT nClassStyle, > HCURSOR hCursor, HBRUSH hbrBackground, HICON hIcon) > > return lpszName; //<- debugger stopps here >} > What about your cursor, brush and icon, are they valid objects? Hans
|
Pages: 1 Prev: Toolbar & OnUpdateCmdUI - some Buttons are more buttons than others. Next: about rc file |