请教各位高手:
MFC SDI在退出的时候,总是报 user break call from ..., debug output:
Free Heap block 345b50 modified at 345e38 after it was freed调试时在0x345b50上设置data breakpoint,有两次中断:第一次:
NTDLL! RtlpCoalesceFreeBlocks@16 + 945 bytes
NTDLL! RtlFreeHeapSlowly@12 + 371 bytes
NTDLL! RtlDebugFreeHeap@12 + 416 bytes
NTDLL! RtlFreeHeapSlowly@12 + 77 bytes
NTDLL! RtlFreeHeap@12 + 133 bytes
_free_base(void * 0x00345b58) line 96
_free_dbg_lk(void * 0x00345b78, int 4) line 1116 + 9 bytes
_free_dbg(void * 0x00345b78, int 4) line 1001 + 13 bytes
CObject::operator delete(void * 0x00345b78) line 46 + 12 bytes
CMainFrame::`scalar deleting destructor'(unsigned int 1) + 56 bytes
CFrameWnd::PostNcDestroy() line 214 + 31 bytes
CWnd::OnNcDestroy() line 854
CWnd::OnWndMsg(unsigned int 130, unsigned int 0, long 0, long * 0x0012f058) line 1836
CWnd::WindowProc(unsigned int 130, unsigned int 0, long 0) line 1596 + 30 bytes
AfxCallWndProc(CWnd * 0x00345b78 {CWnd hWnd=0xdddddddd}, HWND__ * 0x00120928, unsigned int 130, unsigned int 0, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00120928, unsigned int 130, unsigned int 0, long 0) line 379
AfxWndProcBase(HWND__ * 0x00120928, unsigned int 130, unsigned int 0, long 0) line 220 + 21 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! CallWindowProcAorW@24 + 69 bytes
USER32! CallWindowProcA@20 + 25 bytes
HookWndProc(HWND__ * 0x00120928, unsigned int 130, unsigned int 0, long 0) line 161 + 28 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! DispatchClientMessage@20 + 51 bytes
USER32! __fnDWORD@4 + 34 bytes
NTDLL! KiUserCallbackDispatcher@12 + 19 bytes
SMSLISTENER! @ILT+2750(?HookWndProc@@YGJPAUHWND__@@IIJ@Z) address 0x00401ac3
CDocument::OnCloseDocument() line 801
CDocTemplate::CloseAllDocuments(int 0) line 357
CDocManager::CloseAllDocuments(int 0) line 569
CWinApp::CloseAllDocuments(int 0) line 99
CFrameWnd::OnClose() line 805
CMainFrame::OnClose() line 154
CWnd::OnWndMsg(unsigned int 16, unsigned int 0, long 0, long * 0x0012f4d4) line 1836
CWnd::WindowProc(unsigned int 16, unsigned int 0, long 0) line 1596 + 30 bytes
AfxCallWndProc(CWnd * 0x00345b78 {CWnd hWnd=0xdddddddd}, HWND__ * 0x00120928, unsigned int 16, unsigned int 0, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00120928, unsigned int 16, unsigned int 0, long 0) line 379
AfxWndProcBase(HWND__ * 0x00120928, unsigned int 16, unsigned int 0, long 0) line 220 + 21 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! CallWindowProcAorW@24 + 69 bytes
USER32! CallWindowProcA@20 + 25 bytes
CSubclassWnd::WindowProc(unsigned int 16, unsigned int 0, long 0) line 90 + 86 bytes
CTrayIcon::CTrayHook::WindowProc(unsigned int 16, unsigned int 0, long 0) line 138
HookWndProc(HWND__ * 0x00120928, unsigned int 16, unsigned int 0, long 0) line 165 + 25 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! DispatchClientMessage@20 + 51 bytes
USER32! __fnDWORD@4 + 34 bytes
NTDLL! KiUserCallbackDispatcher@12 + 19 bytes
SMSLISTENER! @ILT+2750(?HookWndProc@@YGJPAUHWND__@@IIJ@Z) address 0x00401ac3
USER32! SendMessageA@16 + 71 bytes
CWnd::SendMessageA(unsigned int 16, unsigned int 0, long 0) line 39 + 75 bytes
CMainFrame::OnAppSuspend() line 180
_AfxDispatchCmdMsg(CCmdTarget * 0x00345b78 {CCmdTarget}, unsigned int 32774, int 0, void (void)* 0x004011ef CMainFrame::OnAppSuspend(void), void * 0x00000000, unsigned int 12, AFX_CMDHANDLERINFO * 0x00000000) line 88
CCmdTarget::OnCmdMsg(unsigned int 32774, int 0, void * 0x00000000, AFX_CMDHANDLERINFO * 0x00000000) line 302 + 39 bytes
CFrameWnd::OnCmdMsg(unsigned int 32774, int 0, void * 0x00000000, AFX_CMDHANDLERINFO * 0x00000000) line 898 + 24 bytes
CWnd::OnCommand(unsigned int 32774, long 0) line 2099
CFrameWnd::OnCommand(unsigned int 32774, long 0) line 321
CWnd::OnWndMsg(unsigned int 273, unsigned int 32774, long 0, long * 0x0012fb4c) line 1608 + 28 bytes
CWnd::WindowProc(unsigned int 273, unsigned int 32774, long 0) line 1596 + 30 bytes
AfxCallWndProc(CWnd * 0x00345b78 {CWnd hWnd=0xdddddddd}, HWND__ * 0x00120928, unsigned int 273, unsigned int 32774, long 0) line 215 + 26 bytes
AfxWndProc(HWND__ * 0x00120928, unsigned int 273, unsigned int 32774, long 0) line 379
AfxWndProcBase(HWND__ * 0x00120928, unsigned int 273, unsigned int 32774, long 0) line 220 + 21 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! CallWindowProcAorW@24 + 69 bytes
USER32! CallWindowProcA@20 + 25 bytes
CSubclassWnd::WindowProc(unsigned int 273, unsigned int 32774, long 0) line 90 + 86 bytes
CTrayIcon::CTrayHook::WindowProc(unsigned int 273, unsigned int 32774, long 0) line 138
HookWndProc(HWND__ * 0x00120928, unsigned int 273, unsigned int 32774, long 0) line 165 + 25 bytes
USER32! UserCallWinProc@20 + 24 bytes
USER32! DispatchMessageWorker@8 + 264 bytes
USER32! DispatchMessageA@4 + 11 bytes
CWinThread::PumpMessage() line 853
CWinThread::Run() line 487 + 11 bytes
CWinApp::Run() line 400
AfxWinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00132f53, int 1) line 49 + 11 bytes
WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00132f53, int 1) line 30
WinMainCRTStartup() line 330 + 54 bytes
KERNEL32! BaseProcessSta
第二次,即出现user break的时候:
NTDLL! DbgBreakPoint@0 address 0x77f9193c
NTDLL! RtlpBreakPointHeap@4 + 38 bytes
NTDLL! RtlpValidateHeap@8 + 828 bytes
NTDLL! RtlValidateHeap@12 + 235 bytes
NTDLL! RtlValidateProcessHeaps@0 + 121 bytes
NTDLL! LdrShutdownProcess@0 + 191 bytes
KERNEL32! ExitProcess@4 + 81 bytes
doexit(int 0, int 0, int 0) line 392
exit(int 0) line 279 + 13 bytes
WinMainCRTStartup() line 345
KERNEL32! BaseProcessStart@4 + 61 bytes不知是什么原因?谢谢。