在Xp上用VC6.0调试程序,不知什么时候开始,就不能使用调试了,总提示一堆的错误,但是能正常运行,就连按提示直接建的对话框程序都不能使用调试,按调试建后就直接退出,特别奇怪,但是建立的纯C工程能进行调试.只要加了对话框就不行,有没有碰到过啊?帮忙解答下,我很是郁闷.以下是我按VC提示建的一个最简单的对话框程序按调试后显示的输出信息:(建完后我一个字没改,只是加了调试断点),我也试过把access violation异常的action改成了stop always,但是还是一样的
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\NTDLL32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comdlg32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shlwapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shell32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\winspool.drv', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\oledlg.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\olepro32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\setupapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\WebPageParser.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\CharSet.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\CreateDomTree.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\wininet.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\crypt32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msasn1.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ws2_32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ws2help.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\wsock32.dll', no matching symbolic information found.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
The thread 0xCAC has exited with code 2147323904 (0x7FFD9000).
The program 'E:\code\vc_code\testdialog\Debug\testdialog.exe' has exited with code 2147323904 (0x7FFD9000).
)
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\NTDLL32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comdlg32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shlwapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shell32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\winspool.drv', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\oledlg.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\olepro32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\setupapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\WebPageParser.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\CharSet.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\CreateDomTree.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\wininet.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\crypt32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msasn1.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ws2_32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ws2help.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2982_x-ww_ac3f9c03\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\wsock32.dll', no matching symbolic information found.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
First-chance exception in testdialog.exe: 0xC0000005: Access Violation.
The thread 0xCAC has exited with code 2147323904 (0x7FFD9000).
The program 'E:\code\vc_code\testdialog\Debug\testdialog.exe' has exited with code 2147323904 (0x7FFD9000).
)
INFO: First and Second Chance Exception Handling (Q105675)
Structured exception handling (SEH) takes a little getting used to, particularly when debugging. It is common practice to use SEH as a signaling mechanism. Some application programming interfaces (APIs) register an exception handler in anticipation of a failure condition that is expected to occur in a lower layer. When the exception occurs, the handler may correct or ignore the condition rather than allowing a failure to propagate up through intervening layers. This is very handy in complex environments such as networks where partial failures are expected and it is not desirable to fail an entire operation simply because one of several optional parts failed. In this case, the exception can be handled so that the application is not aware that an exception has occurred.
However, if the application is being debugged, it is important to realize that the debugger will see all exceptions before the program does. This is the distinction between the first and second chance exception. The debugger gets the "first chance," hence the name. If the debugger continues the exception unhandled, the program will see the exception as usual. If the program does not handle the exception, the debugger will see it again (the "second chance"). In this latter case, the program normally would have crashed had the debugger not been present.
If you do not want to see the first chance exception in the debugger, then disable the feature. Otherwise, during execution, when the debugger gets the first chance, continue the exception unhandled and allow the program to handle the exception as usual. Check the documentation for the debugger that you are using for descriptions of the commands to be used.
网上搜的:)
The thread 0xCAC has exited with code 2147323904 (0x7FFD9000).很明显内存访问出错,且导致了程序的崩溃,一个很严重的错误,不能忽略。
建议楼主贴出相关的代码。