問題描述
我使用 Hudson 作為持續集成服務器來測試 C/C++ 代碼.不幸的是,我在某處有一個導致內存損壞的錯誤,因此在某些 Windows 機器上,我有時會收到一個應用程序錯誤"對話框,說明一條指令引用了無法讀取的內存.彈出這個對話框,基本掛了試運行,因為需要人工干預.
I am using Hudson as a continuous integration server to test C/C++ code. Unfortunatly, I have a bug somewhere that causes memory corruption, so on some Windows machines I will sometimes get a "Application Error" dialog box explaining that an instruction referenced memory that could not be read. This dialog box pops up and basically hangs the test run, as it requires manual intervention.
有沒有辦法阻止這個對話框出現,這樣測試運行就會失敗并在 Hudson 中報告這樣的結果?
Is there a way to prevent this dialog box from appearing, so that the test run simply fails and is reported as such in Hudson?
是否可以自動生成小型轉儲而不是顯示對話框?
Is it possible to automatically generate a minidump instead of showing the dialog?
推薦答案
- 按照 Gently 先生的建議,使用禁用錯誤報告".另請參閱這篇 PC World 文章.
- 如果您的構建機器上有 MS Visual Studio,它會捕獲應用程序錯誤并彈出一個對話框.要禁用這些對話框(以及 Visual Studio 的即時調試功能),請運行命令
drwtsn32.exe -i
將 Dr. Watson 設置為默認系統調試器.Watson 博士將生成核心轉儲并靜默退出.(請參閱此 Microsoft 知識庫文章:http://support.microsoft.com/kb/q121434/.)
- Use "Disable error reporting", as Mr. Gently suggests. See also this PC World article.
- If you happen to have MS Visual Studio on your build machine, it will catch Application Errors and pop up a dialog box. To disable these dialogs (and also the Just-In-Time Debugging feature of Visual Studio), run the command
drwtsn32.exe -i
to set Dr. Watson as the default system debugger. Dr. Watson will generate a core dump and silently exit. (See this Microsoft Knowledge Base article: http://support.microsoft.com/kb/q121434/.)
這篇關于“應用程序錯誤"是否可以解決?對話框被禁用?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!