请看:0:000> !analyze -v
*******************************************************************************
* *
* Exception Analysis *
* *
********************************************************************************************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: kernel32!pNlsUserInfo ***
*** ***
*************************************************************************
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: kernel32!pNlsUserInfo ***
*** ***
*************************************************************************FAULTING_IP:
ntdll!DbgBreakPoint+0
7c81a3e1 cc int 3EXCEPTION_RECORD: 050dcb1c -- (.exr 0x50dcb1c)
ExceptionAddress: 10211920 (MSVCRTD!_heap_alloc_dbg+0x00000060)
ExceptionCode: 80000003 (Break instruction exception)
ExceptionFlags: 00000000
NumberParameters: 3
Parameter[0]: 00000000
Parameter[1]: 87980db0
Parameter[2]: ffffffffDEFAULT_BUCKET_ID: STATUS_BREAKPOINTPROCESS_NAME: CCGW.exeERROR_CODE: (NTSTATUS) 0x80000003 - {NTGLOBALFLAG: 0APPLICATION_VERIFIER_FLAGS: 0FAULTING_THREAD: 00000d44CONTEXT: 050dcb3c -- (.cxr 0x50dcb3c)
eax=ffffffff ebx=00000000 ecx=5f4ccb18 edx=ffffffff esi=00000000 edi=00000000
eip=10211920 esp=050dce08 ebp=050dce24 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
MSVCRTD!_heap_alloc_dbg+0x60:
10211920 cc int 3
Resetting default scopePRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINTBUGCHECK_STR: APPLICATION_FAULT_STATUS_BREAKPOINTLAST_CONTROL_TRANSFER: from 10211863 to 10211920STACK_TEXT:
050dce24 10211863 00000055 00000001 5f4ccb18 MSVCRTD!_heap_alloc_dbg+0x60
050dce40 1021180e 00000055 00000000 00000001 MSVCRTD!_nh_malloc_dbg+0x23
050dce5c 5f4275cb 00000055 00000001 5f4ccb18 MSVCRTD!_malloc_dbg+0x1e
050dce80 5f42718b 00000055 00000001 5f4ccb18 MFC42D!operator new+0x24
050dce98 5f42afdb 00000055 5f4ccb18 00000076 MFC42D!operator new+0x16
050dcec4 5f42baff 00000048 00000000 00000000 MFC42D!CString::AllocBuffer+0x6c
050dcee8 5f4065da 00000048 00000000 00000000 MFC42D!CString::GetBuffer+0xaf
050dcf64 5f4066fa 0045807c 050dcf9c 00000000 MFC42D!CString::FormatV+0x6c0
050dcf84 0040ae67 050dfaac 0045807c 0070634c MFC42D!CString::Format+0x46
050dfee4 5f438576 00000000 00000000 00706590 CCGW!CIVRThread::Run+0x2a7 [D:\SPDB\CCGW\EncryptThd.cpp @ 152]
050dff84 1020c323 019df190 00000000 00000000 MFC42D!_AfxThreadEntry+0x326
050dffb8 77e64829 00706590 00000000 00000000 MSVCRTD!_beginthreadex+0x133
050dffec 00000000 1020c2b0 00706590 00000000 kernel32!BaseThreadStart+0x34
FOLLOWUP_IP:
MSVCRTD!_heap_alloc_dbg+60
10211920 cc int 3SYMBOL_STACK_INDEX: 0SYMBOL_NAME: MSVCRTD!_heap_alloc_dbg+60FOLLOWUP_NAME: MachineOwnerMODULE_NAME: MSVCRTDIMAGE_NAME: MSVCRTD.DLLDEBUG_FLR_IMAGE_TIMESTAMP: 3587eddbSTACK_COMMAND: .cxr 0x50dcb3c ; kbFAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_MSVCRTD.DLL!_heap_alloc_dbgBUCKET_ID: APPLICATION_FAULT_STATUS_BREAKPOINT_MSVCRTD!_heap_alloc_dbg+60Followup: MachineOwner
---------下一步怎么看呢?
不好意思,现在没有可用分!
*******************************************************************************
* *
* Exception Analysis *
* *
********************************************************************************************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: kernel32!pNlsUserInfo ***
*** ***
*************************************************************************
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: kernel32!pNlsUserInfo ***
*** ***
*************************************************************************FAULTING_IP:
ntdll!DbgBreakPoint+0
7c81a3e1 cc int 3EXCEPTION_RECORD: 050dcb1c -- (.exr 0x50dcb1c)
ExceptionAddress: 10211920 (MSVCRTD!_heap_alloc_dbg+0x00000060)
ExceptionCode: 80000003 (Break instruction exception)
ExceptionFlags: 00000000
NumberParameters: 3
Parameter[0]: 00000000
Parameter[1]: 87980db0
Parameter[2]: ffffffffDEFAULT_BUCKET_ID: STATUS_BREAKPOINTPROCESS_NAME: CCGW.exeERROR_CODE: (NTSTATUS) 0x80000003 - {NTGLOBALFLAG: 0APPLICATION_VERIFIER_FLAGS: 0FAULTING_THREAD: 00000d44CONTEXT: 050dcb3c -- (.cxr 0x50dcb3c)
eax=ffffffff ebx=00000000 ecx=5f4ccb18 edx=ffffffff esi=00000000 edi=00000000
eip=10211920 esp=050dce08 ebp=050dce24 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
MSVCRTD!_heap_alloc_dbg+0x60:
10211920 cc int 3
Resetting default scopePRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINTBUGCHECK_STR: APPLICATION_FAULT_STATUS_BREAKPOINTLAST_CONTROL_TRANSFER: from 10211863 to 10211920STACK_TEXT:
050dce24 10211863 00000055 00000001 5f4ccb18 MSVCRTD!_heap_alloc_dbg+0x60
050dce40 1021180e 00000055 00000000 00000001 MSVCRTD!_nh_malloc_dbg+0x23
050dce5c 5f4275cb 00000055 00000001 5f4ccb18 MSVCRTD!_malloc_dbg+0x1e
050dce80 5f42718b 00000055 00000001 5f4ccb18 MFC42D!operator new+0x24
050dce98 5f42afdb 00000055 5f4ccb18 00000076 MFC42D!operator new+0x16
050dcec4 5f42baff 00000048 00000000 00000000 MFC42D!CString::AllocBuffer+0x6c
050dcee8 5f4065da 00000048 00000000 00000000 MFC42D!CString::GetBuffer+0xaf
050dcf64 5f4066fa 0045807c 050dcf9c 00000000 MFC42D!CString::FormatV+0x6c0
050dcf84 0040ae67 050dfaac 0045807c 0070634c MFC42D!CString::Format+0x46
050dfee4 5f438576 00000000 00000000 00706590 CCGW!CIVRThread::Run+0x2a7 [D:\SPDB\CCGW\EncryptThd.cpp @ 152]
050dff84 1020c323 019df190 00000000 00000000 MFC42D!_AfxThreadEntry+0x326
050dffb8 77e64829 00706590 00000000 00000000 MSVCRTD!_beginthreadex+0x133
050dffec 00000000 1020c2b0 00706590 00000000 kernel32!BaseThreadStart+0x34
FOLLOWUP_IP:
MSVCRTD!_heap_alloc_dbg+60
10211920 cc int 3SYMBOL_STACK_INDEX: 0SYMBOL_NAME: MSVCRTD!_heap_alloc_dbg+60FOLLOWUP_NAME: MachineOwnerMODULE_NAME: MSVCRTDIMAGE_NAME: MSVCRTD.DLLDEBUG_FLR_IMAGE_TIMESTAMP: 3587eddbSTACK_COMMAND: .cxr 0x50dcb3c ; kbFAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_MSVCRTD.DLL!_heap_alloc_dbgBUCKET_ID: APPLICATION_FAULT_STATUS_BREAKPOINT_MSVCRTD!_heap_alloc_dbg+60Followup: MachineOwner
---------下一步怎么看呢?
不好意思,现在没有可用分!
BUG 就在 D:\SPDB\CCGW\EncryptThd.cpp 第 152 行,调用 CString::Format 的时候。请检查代码!
2 另不要将DEBUG 版本的DLL 和release 版本的程序一起执行哦
3 重要, 不要在多线程中传递 MFC 对象!
2. 内存越界的问题我一直在努力查找,但还是不敢完全确定
3. debug/release问题好久前已查过,应该没有问题了
4. 听说过很多次不要在线程中传递MFC对象,能举几个例子吗?