Visual Studio 2008 で作成された C# WinForms アプリケーションの Windows 7 64 ビットを実行しているターゲット マシンで発生したエラーを追跡しようとしています。イベント ビューアーからの Windows エラー報告の出力だけを追跡する必要があります。ここで多くの役立つ情報を見つけました: http://www.codeilove.com/2012/09/debugging-using-windows-error-reporting.html。
Problem signature:
P1: myprogram.exe // filename of the executable
P2: 1.44.0.0 // assembly version for the executable in P1
P3: 560be2df // assembly timestamp for the executable in P1
P4: mscorlib // assembly where the fault occurred
P5: 2.0.0.0 // assembly version for the assembly in P4
P6: 4ca2b889 // assembly timestamp for the assembly in P4
P7: c43 // token for the method where the fault occurred
P8: 59 // IL offset into the method specified in P7
P9: System.FormatException // name of the exception that caused the fault
リンクから、P7、P8、および P9 が最も重要であり、06000c43 を探すことで、ILDASM を使用して「c43」のメソッド定義を見つけることができるはずです。C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll の System.Number で次の内容を見つけます。
.method /*06000C43*/ assembly hidebysig static
uint64 ParseUInt64(string 'value',
valuetype System.Globalization.NumberStyles/*020003B6*/ options,
class System.Globalization.NumberFormatInfo/*020003B5*/ numfmt) cil managed
この情報によると、System.Number.ParseUInt64 で System.FormatException が発生していますね。Visual Studio でプロジェクトを検索しましたが、コードがこの関数を呼び出しているインスタンスが見つかりません。ここからどこへ行けばいいですか?
未処理の例外をファイルに記録する Application.ThreadException のトップレベルの例外ハンドラーがあります。この場合、アプリケーション クラッシュが発生し、ログ ファイルには何も記録されません。この例外が私の UI 以外のスレッドで発生していると想定しても安全ですか?