お客様の1人がクラッシュを報告しました。彼女は、処理されていない例外の後、標準エラーメッセージを見た:WinDbgを使用してメソッドパラメータを検査し、クラッシュダンプのRAWメモリ
"アプリケーションが処理できなかった例外を生成しました...アプリケーションを終了するには、[OK]をクリックします。
DebugDiagを使用してこのプロセスのダンプを生成しました。私はダンプを今見ている。
!スレッドは管理スレッドで例外を表示しました。ネストされた例外がいくつかありました。これは一番下にありました:
0:000> !pe -nested
...
Nested exception -------------------------------------------------------------
Exception object: 14015a98
Exception type: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
InnerException: <none>
StackTrace (generated):
SP IP Function
0013E958 7B6EEF3B System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.OnThreadException(System.Exception)+0x8b
0013E994 7B6F7916 System_Windows_Forms_ni!System.Windows.Forms.Control.WndProcException(System.Exception)+0x16
0013E9A0 7B6FA39C System_Windows_Forms_ni!System.Windows.Forms.Control+ControlNativeWindow.OnThreadException(System.Exception)+0xc
0013E9A4 7B1C8512 System_Windows_Forms_ni!System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)+0x72
0013EC70 7B1D8D2E System_Windows_Forms_ni!System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32, Int32, Int32)+0x24e
0013ED0C 7B1D8997 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)+0x177
0013ED60 7B1D87E1 System_Windows_Forms_ni!System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)+0x61
0013ED90 7B6EDE2B System_Windows_Forms_ni!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form)+0x33
0013EDA4 7B7225AB System_Windows_Forms_ni!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window)+0x373
0013EE30 0DF41E76 PDILibReportProcessor!profdata.com.Library.libReportRenderCrystal.RenderToDisplay(System.Windows.Forms.IWin32Window, profdata.com.Library.libOutputSettings, profdata.com.Library.libApplicationConfig)+0xb6
0013EE4C 0DF416EB PDILibReportProcessor!profdata.com.Library.libReportProcessor.Process(System.Windows.Forms.IWin32Window)+0x153
0013EE60 07B37644 PDILibReportProcessor!profdata.com.Library.libReportProcessor.ProcessCrystalReport(System.String, System.Type, System.Data.DataSet, profdata.com.Library.libOutputSettings, profdata.com.Library.libApplicationConfig, System.Windows.Forms.IWin32Window, System.String)+0x74
0013EEA4 07B375B8 PDILibReportProcessor!profdata.com.Library.libReportProcessor.ProcessReport(System.String, System.Type, System.Data.DataSet, profdata.com.Library.libOutputSettings, profdata.com.Library.libApplicationConfig, System.Windows.Forms.IWin32Window)+0x18
0013EEB8 07B333C4 APRPTCashRequirements!profdata.com.AccountsPayable.frmAPCashRequirements.RunProcessOrReport()+0x7e4
StackTraceString: <none>
HResult: 80004003
コードでは、ユーザーにフォームでCrystal Reportが表示されています。レポートを表示している間、アプリケーションは何かを試みて、System.AccessViolationExceptionを取得しました。
private IntPtr Callback(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
{
Message m = Message.Create(hWnd, msg, wparam, lparam);
try
{
// calls WndProc or DefWndProc
}
catch (Exception exception)
{
this.OnThreadException(exception);
}
finally {...}
}
は、私がメッセージ、wParamに知りたい、と例外の原因となったlParam引数:
NativeWindow.Callbackソースを見ると、私はこれを参照してください。 (私は正しい例外オブジェクトを調べていることを確認したいと思います)。これはUIスレッドに戻るか、通常のWindowsイベントである可能性があります。
私は、スレッド環境ブロックました:
0:000> !teb
TEB at 7ffdf000
ExceptionList: 00134144
StackBase: 00140000
StackLimit: 00130000
を、スタックメモリをダンプ:
0:000> !dqs 00130000 00140000
...
0013e968 00000000`00000000
0013e970 00000000`00000000
0013e978 00000000`00000000
0013e980 140ea9fc`00000000
0013e988 0013e998`0013ea44
0013e990 140c1d4c`7b6f7916
0013e998 7b6fa39c`0013ea54 <--- is NativeWindow.Callback
0013e9a0 0013ea6c`7b1c8512
0013e9a8 0013ec60`79edd757
0013e9b0 0013ec60`00000000
0013e9b8 0013ea6c`e0434f4d
0013e9c0 00000000`0013ea1c
0013e9c8 00000000`00000000
...
だから、署名がこのある場合: SP IP 0013E9A4 7B1C8512 NativeWindow.Callback(のIntPtr、 Int32、IntPtr、IntPtr)+ 0x72
- 正確にはパースタックの 上のameters?
- の値を調べるにはどうすればよいですか?
私はまだ根本的な原因を見つけたとは思わない。 ThreadExceptionハンドラがあります。それはなぜ呼ばれなかったのですか? System.AccessViolationException
の原因
!analyze -v
がSTATUS_BREAKPOINT
と報告されていることに注意してください。ユーザーがエラーダイアログボックス「アプリケーションで例外が発生しました...」で停止しているためです。あなたは、最初の例外コンテキストにコンテキストを設定する必要があり
あなたが急いでいる場合は、.symfixは:)速く、すべてのユーザーのための –
またはSet _NT_SYMBOL_PATHそれを設定して、再度心配することはありません。) –
問題:それはブレークポイントであった間、私はダンプを作成しました。私が.ecxrを試してみると、「Minidumpには例外コンテキストがありません。シンボルパスが設定されています。未処理例外モードは自動であり、設定ファイルによって無効にされていません。 –