2009-08-25 10 views
1

お客様の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

  1. 正確にはパースタックの 上のameters?
  2. の値を調べるにはどうすればよいですか?

私はまだ根本的な原因を見つけたとは思わない。 ThreadExceptionハンドラがあります。それはなぜ呼ばれなかったのですか? System.AccessViolationExceptionの原因

!analyze -vSTATUS_BREAKPOINTと報告されていることに注意してください。ユーザーがエラーダイアログボックス「アプリケーションで例外が発生しました...」で停止しているためです。あなたは、最初の例外コンテキストにコンテキストを設定する必要があり

答えて

3

:次に

.ecxr 

ローカルキャッシュパスで、すべてのNTモジュールの最新のパブリックシンボルをダウンロードsympathを持っていることを確認してください。

.sympath srv*C:\<cache>\sym*http://msdl.microsoft.com/download/symbols 

これらの手順では、正しいネイティブスタックをkから取得する必要があります。これは管理対象スタックにも反映される必要があります。プライベートシンボルを持たないネイティブフレームのパラメータを取得するのは難しいので、呼び出し規約とパラメータの位置を知っているスタックから基本的に再構成する必要があります。dvはパブリックシンボルでは機能しません。

ThreadExceptionハンドラの質問については、Application.SetUnhandledExceptionModeをCatchExceptionに設定しましたか?

+1

あなたが急いでいる場合は、.symfixは:)速く、すべてのユーザーのための –

+0

またはSet _NT_SYMBOL_PATHそれを設定して、再度心配することはありません。) –

+0

問題:それはブレークポイントであった間、私はダンプを作成しました。私が.ecxrを試してみると、「Minidumpには例外コンテキストがありません。シンボルパスが設定されています。未処理例外モードは自動であり、設定ファイルによって無効にされていません。 –

0

あなたが望むすべてのウィンドウメッセージであれば、DV/Vを使用して、ネイティブフレームの1つからそれを引く

編集:あなたはAccessViolationExceptionを追いかけているという事実は、あなたが間違い見なければならないことを意味kn100と.frameを使って実際のAVを把握するネイティブスタックで

0

kn100以下のスタックを返します。私はここで何をすべきか分からない。 .frameをどこに設定しますか?そして何をする?

このアプリケーションは、大規模なC#WinFormsクライアントです。私たちはネイティブコードを書いていません。私は通常、コード内の未処理の例外をかなり迅速に診断できますが、これは私が診断しようとした最初のネイティブエラーです。

00 00132d4c 7739bf53 ntdll!KiFastSystemCallRet 
01 00132d84 7738965e user32!NtUserWaitMessage+0xc 
02 00132dac 7739f762 user32!InternalDialogBox+0xd0 
03 0013306c 7739f047 user32!SoftModalMessageBox+0x94b 
04 001331bc 7739eec9 user32!MessageBoxWorker+0x2ba 
05 00133214 7739ee65 user32!MessageBoxTimeoutW+0x7a 
06 00133234 7739ee41 user32!MessageBoxExW+0x1b 
07 00133250 7a14c82e user32!MessageBoxW+0x45 
08 00133274 7a1507ae mscorwks!WszMessageBox+0x8b 
09 00134150 7a1509ea mscorwks!UtilMessageBoxNonLocalizedVA+0x351 
0a 001341d4 7a2cea8d mscorwks!UtilMessageBoxVA+0x6b 
0b 001341f4 7a2cf209 mscorwks!Debugger::MessageBox+0x1a 
0c 00134230 7a2d2cae mscorwks!Debugger::NotifyUserOfFault+0x65 
0d 00134270 7a2d5c67 mscorwks!Debugger::ShouldAttachDebugger+0xa2 
0e 001342b4 7a2d95fa mscorwks!Debugger::ShouldAttachDebuggerProxy+0x66 
0f 001342c0 7a0974d1 mscorwks!Debugger::FallbackJITAttachPrompt+0x9 
10 001342dc 7a09c0c7 mscorwks!WatsonLastChance+0x63 
11 00134334 7a09c173 mscorwks!CLRAddVectoredHandlers+0x209 
12 0013433c 7c35f0c3 mscorwks!InternalUnhandledExceptionFilter+0x22 
13 00134348 61585e4e msvcr71!__CxxUnhandledExceptionFilter+0x46 
WARNING: Stack unwind information not available. Following frames may be wrong. 
14 00134620 77e76a20 SACommLayer_RES_EN!GetResDllVersion+0x4e2e 
15 00134628 77e61ac1 kernel32!BaseProcessStart+0x39 
16 00134650 7c828772 kernel32!_except_handler3+0x61 
17 00134674 7c828743 ntdll!ExecuteHandler2+0x26 
18 0013471c 7c82865c ntdll!ExecuteHandler+0x24 
19 001349fc 77e4bef7 ntdll!RtlRaiseException+0x3d 
1a 00134a5c 7a1997f7 kernel32!RaiseException+0x53 
1b 00134a74 7a1915c4 mscorwks!RtlRaiseStatus+0x13 
1c 00134a7c 79e9a8a9 mscorwks!_purecall+0xa 
1d 00134a8c 79e9a92c mscorwks!MethodDataCache::FindHelper+0x17 
1e 00134ac4 79e8a9b0 mscorwks!MethodDataCache::Find+0x52 
1f 00134b00 79e8aa6a mscorwks!MethodTable::GetMethodDataHelper+0x23 
20 00134b38 79e8aab3 mscorwks!MethodTable::GetMethodData+0x1a 
21 00134b50 79e8aad9 mscorwks!MethodTable::MethodIterator::Init+0x13 
22 00134b64 79e8b677 mscorwks!MethodTable::MethodIterator::MethodIterator+0x11 
23 00134bb4 79e8b874 mscorwks!EEClass::FindMethod+0x38 
24 00134c38 79e89332 mscorwks!MemberLoader::GetDescFromMemberDefOrRefThrowing+0x3e8 
25 00134ec0 79fc44bf mscorwks!MemberLoader::GetMethodDescFromMemberDefOrRefOrSpecThrowing+0x219 
26 00134f88 79fc43cf mscorwks!CEEInfo::findMethodInternal+0x12a 
27 00134ff4 79062ea6 mscorwks!CEEInfo::findMethod+0xc4 
28 0013500c 79062fa9 mscorjit!Compiler::eeFindMethod+0x22 
29 001350f4 790633e8 mscorjit!Compiler::impImportCall+0xda 
2a 001356fc 790643a1 mscorjit!Compiler::impImportBlockCode+0x2bbb 
2b 00135774 790644d6 mscorjit!Compiler::impImportBlock+0x1df 
2c 0013578c 7906465c mscorjit!Compiler::impImport+0xe2 
2d 00135798 7906467a mscorjit!Compiler::fgImport+0x20 
2e 001357a8 79065b8e mscorjit!Compiler::compCompile+0xc 
2f 001357f4 79065d33 mscorjit!Compiler::compCompile+0x44f 
30 0013587c 79066448 mscorjit!jitNativeCode+0xef 
31 001358a0 79fc722c mscorjit!CILJit::compileMethod+0x25 
32 0013590c 79fc72c5 mscorwks!invokeCompileMethodHelper+0x72 
33 00135950 79fc7338 mscorwks!invokeCompileMethod+0x31 
34 001359a4 79fc70ad mscorwks!CallCompileMethodWithSEHWrapper+0x5b 
35 00135d4c 79fc6e6f mscorwks!UnsafeJitFunction+0x31b 
36 00135df0 79e811eb mscorwks!MethodDesc::MakeJitWorker+0x1a8 
37 00135e48 79e813ab mscorwks!MethodDesc::DoPrestub+0x41b 
38 00135e98 00361efe mscorwks!PreStubWorker+0xf3 
39 00135eb0 7b6eef3b 0x361efe 
3a 00135f10 7b6f7916 System_Windows_Forms_ni+0x71ef3b 
3b 00135f1c 7b6fa39c System_Windows_Forms_ni+0x727916 
3c 0013f17c 7739b6e3 System_Windows_Forms_ni+0x72a39c 
3d 0013f1a8 7739b874 user32!InternalCallWinProc+0x28 
3e 0013f220 7739ba92 user32!UserCallWinProcCheckWow+0x151 
3f 0013f288 7739bad0 user32!DispatchMessageWorker+0x327 
40 0013f298 03c341d2 user32!DispatchMessageW+0xf 
41 0013f2b4 7b1d8d2e 0x3c341d2 
42 0013f368 7b1d8997 System_Windows_Forms_ni+0x208d2e 
43 0013f3c0 7b1d87e1 System_Windows_Forms_ni+0x208997 
44 0013f3f0 7b195931 System_Windows_Forms_ni+0x2087e1 
45 0013f480 79e71b4c System_Windows_Forms_ni+0x1c5931 
46 0013f490 79e821f9 mscorwks!CallDescrWorker+0x33 
47 0013f510 79e96571 mscorwks!CallDescrWorkerWithHandler+0xa3 
48 0013f648 79e965a4 mscorwks!MethodDesc::CallDescr+0x19c 
49 0013f664 79e965c2 mscorwks!MethodDesc::CallTargetWorker+0x1f 
4a 0013f67c 79eefac5 mscorwks!MethodDescCallSite::CallWithValueTypes+0x1a 
4b 0013f7e0 79eef9e5 mscorwks!ClassLoader::RunMain+0x223 
4c 0013fa48 79eeff35 mscorwks!Assembly::ExecuteMainMethod+0xa6 
4d 0013ff18 79ef011f mscorwks!SystemDomain::ExecuteMainMethod+0x456 
4e 0013ff68 79ef004f mscorwks!ExecuteEXE+0x59 
4f 0013ffb0 79007c24 mscorwks!_CorExeMain+0x15c 
50 0013ffc0 77e6f23b mscoree!_CorExeMain+0x2c 
51 0013fff0 00000000 kernel32!BaseProcessStart+0x23 
関連する問題