My friends, my life, my style - James S.F. Hsieh

11/08/2011

Stack of WinRT


來分享一下 WinRT 下 JavaScript 呼叫 C++ WinRT object 的 stack 你發現什麼嗎? :D


.  0  Id: f70.7f0 Suspend: 0 Teb: 7f3dd000 Unfrozen
      Start: WWAHost!mainCRTStartup (001c77a2) 
      Priority: 0  Priority class: 32  Affinity: f
ChildEBP RetAddr  
00eafb44 76e619f8 ntdll_77220000!ZwWaitForSingleObject+0xc
00eafbb0 76e61983 KERNELBASE!WaitForSingleObjectEx+0x8f
00eafbc4 6341b17b KERNELBASE!WaitForSingleObject+0x12
00eafbec 6341b21d twinapi!Windows::ApplicationModel::Core::CoreApplicationFactory::RunWithBackgroundFactoryAndThreadingModel+0x1af
00eafc04 001c92ed twinapi!Windows::ApplicationModel::Core::CoreApplicationFactory::RunWithBackgroundFactory+0x19
00eafc54 001c7750 WWAHost!Host::Run+0xec
00eafc70 001c78a9 WWAHost!RunHost+0x80
00eafc94 74d69391 WWAHost!mainCRTStartup+0x107
00eafca0 772831b0 kernel32!BaseThreadInitThunk+0xe
00eafce0 77283183 ntdll_77220000!__RtlUserThreadStart+0x6f
00eafcf8 00000000 ntdll_77220000!_RtlUserThreadStart+0x1b

.  4  Id: f70.c58 Suspend: 0 Teb: 7f2aa000 Unfrozen
      Start: SHCore!CMemStream::Stat+0x3d (7437aaed) 
      Priority: 0  Priority class: 32  Affinity: f
ChildEBP RetAddr  
038be98c 609875b6 Microsoft_Samples_DllServerAuthoring!XXX+0x8aa5
038be9d0 60987f74 jscript9!Projection::ProjectionMethodInvoker::InvokeUnknown+0x18d
038bea8c 609880a9 jscript9!Projection::InvokeMethodByThisInfo+0x44d
038beac0 608cba2f jscript9!Projection::MethodSignatureThunk+0x74
038beaf8 6098f2e7 jscript9!Js::JavascriptFunction::CallFunction+0x84
038beb20 608cba2f jscript9!Projection::ProjectionWriter::DelayedMethodAssignContinuationThunk+0x89
038beb58 6087ff39 jscript9!Js::JavascriptFunction::CallFunction+0x84
038beb74 6087fef2 jscript9!Js::InterpreterStackFrame::OP_CallI+0x43
038beba8 608dc151 jscript9!Js::InterpreterStackFrame::Process+0x687
038bec9c 04960d71 jscript9!Js::InterpreterStackFrame::InterpreterThunk+0x249
038beca8 608cba2f 0x4960d71
038bece0 608cb92f jscript9!Js::JavascriptFunction::CallFunction+0x84
038bed54 608cb81f jscript9!Js::JavascriptFunction::CallRootFunction+0x105
038bed90 608cb7a6 jscript9!ScriptSite::CallRootFunction+0x52
038bedbc 6087b6d2 jscript9!ScriptSite::Execute+0x76
038bee20 5e22dd06 jscript9!ScriptEngine::Execute+0x10f
038bee90 5e22dc32 mshtml!CListenerDispatch::InvokeVar+0xcb
038beeb0 5e059acc mshtml!CListenerDispatch::Invoke+0x3e
038bf07c 5dfdc38c mshtml!CEventMgr::Dispatch+0x648
038bf0a8 5e673887 mshtml!CEventMgr::DispatchMouseEvent+0x12f
038bf1f0 5e568ee3 mshtml!CEventMgr::DispatchClickEvent+0x236
038bf218 5e563c92 mshtml!CElement::Fire_onclick+0x51
038bf274 5e36330c mshtml!CElement::DoClick+0x10e
038bf344 5dfe786f mshtml!CDoc::PumpMessage+0x14df
038bf49c 5e1e7c35 mshtml!CDoc::OnMouseMessage+0x418
038bf644 5e2b2f16 mshtml!CDoc::OnWindowMessage+0xda3
038bf670 751d6bf8 mshtml!CServer::WndProc+0xf6
038bf69c 751d6d80 user32!InternalCallWinProc+0x23
038bf718 751d7e41 user32!UserCallWinProcCheckWow+0x100
038bf78c 751d7f32 user32!DispatchMessageWorker+0x3d4
038bf79c 60d933b6 user32!DispatchMessageW+0x10
038bf7d4 60d93466 windows_ui!Windows::UI::Core::CDispatcher::ProcessMessage+0xc7
038bf824 001cdfd6 windows_ui!Windows::UI::Core::CDispatcher::ProcessEvents+0x6c
038bf848 001cc4ac WWAHost!CoreWindowDispatcher::RunMessageLoop+0x59
038bf864 6341c6e6 WWAHost!WebInstance::Run+0x4a
038bf87c 7437abc1 twinapi!Windows::ApplicationModel::Core::CoreApplicationView::ViewProviderThreadProc+0x27
038bf8fc 74d69391 SHCore!CMemStream::Stat+0x111
038bf908 772831b0 kernel32!BaseThreadInitThunk+0xe
038bf948 77283183 ntdll_77220000!__RtlUserThreadStart+0x6f
038bf960 00000000 ntdll_77220000!_RtlUserThreadStart+0x1b


.  4  Id: 968.c0c Suspend: 0 Teb: 000007f7`8b995000 Unfrozen
      Start: SHCore!IStream_WriteStr+0xa0 (000007fc`88d099f0) 
      Priority: 0  Priority class: 32  Affinity: f
Child-SP          RetAddr           Call Site
000000d1`b7b4a7b8 000007fc`8ac5110d ntdll!ZwWaitForSingleObject+0xa
000000d1`b7b4a7c0 000007fc`72da393e KERNELBASE!WaitForSingleObjectEx+0x79
000000d1`b7b4a860 000007fc`72da38f0 clr!SafeReleaseHelper+0x14b
000000d1`b7b4a8a0 000007fc`72da396d clr!CLREvent::WaitEx+0x100
000000d1`b7b4a900 000007fc`7312db92 clr!CLREvent::WaitEx+0x6a
000000d1`b7b4a9a0 000007fc`7312dab0 clr!Thread::WaitSuspendEventsHelper+0xc6
000000d1`b7b4aa60 000007fc`7339b90b clr!Thread::WaitSuspendEvents+0x11
000000d1`b7b4aa90 000007fc`72de1a78 clr! ?? ::FNODOBFM::`string'+0x43279
000000d1`b7b4aad0 000007fc`732e78c8 clr!Thread::RareDisablePreemptiveGC+0x229
000000d1`b7b4ab60 000007fc`732ee814 clr!PostSendEvent_Internal+0x35
000000d1`b7b4ab90 000007fc`73412d07 clr!DebuggerController::DispatchPatchOrSingleStep+0x1e4
000000d1`b7b4ac70 000007fc`72e571e0 clr! ?? ::FNODOBFM::`string'+0xcf569
000000d1`b7b4acd0 000007fc`72e5713d clr!Debugger::FirstChanceNativeException+0x64
000000d1`b7b4ad10 000007fc`72dbd0b8 clr!StackTraceInfo::AllocateStackTrace+0xc3
000000d1`b7b4ad50 000007fc`72dbd03c clr!CLRVectoredExceptionHandlerPhase2+0x6d
000000d1`b7b4ada0 000007fc`72dbcf71 clr!CLRVectoredExceptionHandler+0x9d
000000d1`b7b4ae00 000007fc`8da7a7e9 clr!CLRVectoredExceptionHandlerShim+0x95
000000d1`b7b4ae30 000007fc`8da80aad ntdll!RtlpCallVectoredHandlers+0x105
000000d1`b7b4aed0 000007fc`8daca7ba ntdll!RtlDispatchException+0x6d
000000d1`b7b4b5d0 000007fc`13750a1f ntdll!KiUserExceptionDispatcher+0x2e
000000d1`b7b4bb90 000007fc`1375035b 0x7fc`13750a1f
000000d1`b7b4c310 000007fc`13750226 0x7fc`1375035b
000000d1`b7b4c400 000007fc`72fce02e 0x7fc`13750226
000000d1`b7b4c4a0 000007fc`72fce241 clr!zzz_AsmCodeRange_End
000000d1`b7b4c500 000007fc`72fce173 clr!COMToCLRWorkerBody+0x219
000000d1`b7b4c580 000007fc`72fce05a clr!COMToCLRWorkerBody+0x104
000000d1`b7b4c5e0 000007fc`72fcde4a clr!COMToCLRWorkerDebuggerWrapper+0x22
000000d1`b7b4c640 000007fc`72fcdfd7 clr!COMToCLRWorker+0x1ea
000000d1`b7b4c7f0 000007fc`737942a5 clr!zzz_AsmCodeRange_Begin+0x57
000000d1`b7b4c880 000007fc`73824527 jscript9!amd64_ProjectionCall+0x65
000000d1`b7b4c8e0 000007fc`73824f54 jscript9!Projection::ProjectionMethodInvoker::InvokeUnknown+0x117
000000d1`b7b4c9a0 000007fc`738250fb jscript9!Projection::InvokeMethodByThisInfo+0x484
000000d1`b7b4cae0 000007fc`73748458 jscript9!Projection::MethodSignatureThunk+0xeb
000000d1`b7b4cb50 000007fc`7382d028 jscript9!amd64_CallFunction+0x82
000000d1`b7b4cbc0 000007fc`73748458 jscript9!Projection::ProjectionWriter::DelayedMethodAssignContinuationThunk+0xf8
000000d1`b7b4cc30 000007fc`73769584 jscript9!amd64_CallFunction+0x82
000000d1`b7b4cca0 000007fc`7376802d jscript9!Js::InterpreterStackFrame::OP_CallCommon+0x94
000000d1`b7b4cd20 000007fc`73783217 jscript9!Js::InterpreterStackFrame::Process+0x927
000000d1`b7b4ce70 000000d1`b8dd095b jscript9!Js::InterpreterStackFrame::InterpreterThunk+0x2ac
000000d1`b7b4d090 000007fc`73748458 0xd1`b8dd095b
000000d1`b7b4d0c0 000007fc`73769584 jscript9!amd64_CallFunction+0x82
000000d1`b7b4d110 000007fc`7376802d jscript9!Js::InterpreterStackFrame::OP_CallCommon+0x94
000000d1`b7b4d190 000007fc`73894fdc jscript9!Js::InterpreterStackFrame::Process+0x927
000000d1`b7b4d2e0 000007fc`737af33a jscript9!Js::InterpreterStackFrame::OP_TryCatch+0x7c
000000d1`b7b4d350 000007fc`73783217 jscript9!Js::InterpreterStackFrame::Process+0x29f4
000000d1`b7b4d4a0 000000d1`b8dd0963 jscript9!Js::InterpreterStackFrame::InterpreterThunk+0x2ac
000000d1`b7b4d690 000007fc`73748458 0xd1`b8dd0963
000000d1`b7b4d6c0 000007fc`73769584 jscript9!amd64_CallFunction+0x82
000000d1`b7b4d720 000007fc`7376802d jscript9!Js::InterpreterStackFrame::OP_CallCommon+0x94
000000d1`b7b4d7a0 000007fc`73783217 jscript9!Js::InterpreterStackFrame::Process+0x927
000000d1`b7b4d8f0 000000d1`b8dd096b jscript9!Js::InterpreterStackFrame::InterpreterThunk+0x2ac
000000d1`b7b4daa0 000007fc`73748458 0xd1`b8dd096b
000000d1`b7b4dad0 000007fc`73769584 jscript9!amd64_CallFunction+0x82
000000d1`b7b4db20 000007fc`7376802d jscript9!Js::InterpreterStackFrame::OP_CallCommon+0x94
000000d1`b7b4dba0 000007fc`73783217 jscript9!Js::InterpreterStackFrame::Process+0x927
000000d1`b7b4dcf0 000000d1`b8dd0973 jscript9!Js::InterpreterStackFrame::InterpreterThunk+0x2ac
000000d1`b7b4dec0 000007fc`73748458 0xd1`b8dd0973
000000d1`b7b4def0 000007fc`73769584 jscript9!amd64_CallFunction+0x82
000000d1`b7b4df50 000007fc`7376802d jscript9!Js::InterpreterStackFrame::OP_CallCommon+0x94
000000d1`b7b4dfd0 000007fc`73783217 jscript9!Js::InterpreterStackFrame::Process+0x927
000000d1`b7b4e120 000000d1`b8dd097b jscript9!Js::InterpreterStackFrame::InterpreterThunk+0x2ac
000000d1`b7b4e2f0 000007fc`73748458 0xd1`b8dd097b
000000d1`b7b4e320 000007fc`738bdd3e jscript9!amd64_CallFunction+0x82
000000d1`b7b4e370 000007fc`7380a2e5 jscript9!Js::JavascriptFunction::CallFunction+0x7e
000000d1`b7b4e3c0 000007fc`73794370 jscript9!Projection::Delegate::Invoke+0x485
000000d1`b7b4e670 000007fc`8c846a15 jscript9!IndirectMethodInvoker+0x60
000000d1`b7b4e6d0 000007fc`8c84417b rpcrt4!Invoke+0x65
000000d1`b7b4e720 000007fc`8c833696 rpcrt4!NdrStubCall2+0x371
000000d1`b7b4ed60 000007fc`8d728ddf rpcrt4!NdrStubCall3+0xe0
000000d1`b7b4edc0 000007fc`8d728d3c combase!CStdStubBuffer_Invoke+0x67
000000d1`b7b4edf0 000007fc`8d643927 combase!SyncStubInvoke+0x60
000000d1`b7b4ee60 000007fc`8d728bcf combase!CCtxComChnl::ContextInvoke+0x27d
000000d1`b7b4f090 000007fc`8d72f5cf combase!ComInvokeWithLockAndIPID+0x695
000000d1`b7b4f360 000007fc`8d696479 combase!ComInvoke+0x182
000000d1`b7b4f3a0 000007fc`8d6bd29b combase!ThreadDispatch+0x29
000000d1`b7b4f3d0 000007fc`8d709316 combase!CComApartment::ASTAHandleMessage+0x117
000000d1`b7b4f400 000007fc`8d6bd968 combase!`Microsoft::WRL::Module<1,Microsoft::WRL::Details::DefaultModule<1> >::Create'::`2'::`dynamic atexit destructor for 'module''+0x309a
000000d1`b7b4f6a0 000007fc`7fbbc70f combase!CoMsgWaitInProcessEvents+0xbc
000000d1`b7b4f710 000007f7`8c35232b windows_ui!Windows::UI::Core::CDispatcher::ProcessEvents+0x77
000000d1`b7b4f7c0 000007f7`8c3503af WWAHost!CoreWindowDispatcher::RunMessageLoop+0x6f
000000d1`b7b4f800 000007fc`884dbc26 WWAHost!WebInstance::Run+0x4f
000000d1`b7b4f840 000007fc`88d09ad1 twinapi!Windows::ApplicationModel::Core::CoreApplicationView::ViewProviderThreadProc+0x3a
000000d1`b7b4f880 000007fc`8d093cdc SHCore!IStream_WriteStr+0x187
000000d1`b7b4f980 000007fc`8dac3c85 kernel32!BaseThreadInitThunk+0x18
000000d1`b7b4f9b0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d