2012-11-12 38 views
-3

使用我的C#Windows應用程序時,它掛起並進入不響應模式。有時會拋出DR.Watson調試器錯誤。我的C#應用​​程序崩潰或掛起

我剛纔提到的錯誤的詳細信息從Windows錯誤報告了,

 
**Event Type: Error 
Event Source: .NET Runtime 2.0 Error Reporting 
Event Category: None 
Event ID: 1000 
Date:  11/12/2012 
Time:  1:01:58 PM 
User:  N/A 
Computer: My PC 
Description: 
Faulting application aod_gfvt.exe, version 1.0.0.0, stamp 50a0a39d, faulting module 
wininet.dll, version 7.0.6000.17114, stamp 503bc6a7, debug? 0, fault address
0x00004606. For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.**
+7

對不起您的損失。 –

+0

你覺得我們怎麼沒有提供源代碼來幫助你? – Haris

+0

看起來像你的問題是'地址'0x00004606'處的'aod_gfvt.exe'顯示一些代碼 –

回答

1

你會得到沃森日誌中沒有的信息。

將全局異常處理添加到您的應用程序或應用程序域。

例如AppDomain.CurrentDomain.UnhandledException

[STAThread] 
    static void Main() 
    { 
     AppDomain.CurrentDomain.UnhandledException += 
     new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); 
     Application.EnableVisualStyles(); 
     Application.SetCompatibleTextRenderingDefault(false); 
     Application.Run(new Form1()); 
    } 

當您添加全局異常處理程序,你會得到更多的信息。 Watson正在攔截您的錯誤,因爲一些嚴重的無用例外已將您的應用程序崩潰。