On 27. 12. 2010 18:15, Nelson B Bolyard wrote:
On 2010-12-27 01:44 PDT, Matej Kurpel wrote:

If I only was able to load the source code of Thunderbird in Visual
Studio, that would be great. I could debug it line-by-line as usual.
You can.  Download and unpack the sources from

ftp://ftp.mozilla.org/pub/thunderbird/releases/latest-3.1/source/thunderbird-3.1.7.source.tar.bz2

(or substitute the release you're running, as needed).

You don't need to build it yourself.
Use the symbol server (You've already done this step, IIRC).
Just tell your debugger where you put the sources locally.

Wow - I was able to "Attach To Process..." in VS2008 and then I caused the crash deliberately. It showed me the source code and call stack, which is great. But evaluating most of the variables returned "CXX0069: Error: variable needs stack frame". No idea what that means. The source code is far too complex for me to understand anyway :( I am sending you the call stack as VS displayed it to me. It crashed on a line in nsGlobalWindow.cpp saying:

nsWindowSH::InvalidateGlobalScopePolluter(cx, currentInner->mJSObject);

saying Uncaught exception occurred.

Call stack:

> thunderbird.exe!nsGlobalWindow::SetNewDocument(nsIDocument * aDocument=0x00a02c00, nsISupports * aState=0x00000000, int aClearScopeHint=0x00000001, int aIsInternalCall=0x0000000b) Line 1760 + 0x3 bytes C++ thunderbird.exe!nsGlobalWindow::SetNewDocument(nsIDocument * aDocument=0x00a02c00, nsISupports * aState=0x00000000, int aClearScopeHint=0x00000001) Line 1569 C++ thunderbird.exe!DocumentViewerImpl::InitInternal(nsIWidget * aParentWidget=0x04e498c0, nsISupports * aState=0x00000000, const nsIntRect & aBounds={...}, int aDoCreation=0x00000001, int aInPrintPreview=0x00000000, int aNeedMakeCX=0x00000001) Line 960 C++ thunderbird.exe!DocumentViewerImpl::Init(nsIWidget * aParentWidget=0x00a79580, const nsIntRect & aBounds={...}) Line 699 C++ thunderbird.exe!nsDocShell::SetupNewViewer(nsIContentViewer * aNewViewer=0x04e8c3c0) Line 7304 + 0x1b bytes C++ thunderbird.exe!nsDocShell::Embed(nsIContentViewer * aContentViewer=0x04e8c3c0, const char * aCommand=0x01ab0481, nsISupports * aExtraInfo=0x00000000) Line 5472 C++ thunderbird.exe!nsDocShell::CreateContentViewer(const char * aContentType=0x03c37d68, nsIRequest * request=0x050c6740, nsIStreamListener * * aContentHandler=0x050c6740) Line 7090 + 0x15 bytes C++ thunderbird.exe!nsDSURIContentListener::DoContent(const char * aContentType=0x03c37d68, int aIsContentPreferred=0x00000000, nsIRequest * request=0x050c6740, nsIStreamListener * * aContentHandler=0x04effb5c, int * aAbortProcess=0x0045ac48) Line 150 C++ thunderbird.exe!nsDocumentOpenInfo::TryContentListener(nsIURIContentListener * aListener=0x06eb4e80, nsIChannel * aChannel=0x04effb5c) Line 734 C++ thunderbird.exe!nsDocumentOpenInfo::DispatchContent(nsIRequest * request=0x050c6740, nsISupports * aCtxt=0x00000000) Line 434 + 0x15 bytes C++ thunderbird.exe!nsDocumentOpenInfo::OnStartRequest(nsIRequest * request=0x050c6740, nsISupports * aCtxt=0x00000000) Line 287 C++ thunderbird.exe!nsJARChannel::OnStartRequest(nsIRequest * req=0x05bac330, nsISupports * ctx=0x00000000) Line 867 + 0x16 bytes C++
     thunderbird.exe!nsInputStreamPump::OnStateStart()  Line 445    C++
thunderbird.exe!nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream * stream=0x04e7cb68) Line 407 C++
     xpcom_core.dll!nsOutputStreamReadyEvent::Run()  Line 113    C++
xpcom_core.dll!nsThread::ProcessNextEvent(int mayWait=0x00000001, int * result=0x0045aef0) Line 527 + 0x6 bytes C++ xpcom_core.dll!NS_ProcessNextEvent_P(nsIThread * thread=0x00000001, int mayWait=0x00000001) Line 250 + 0xd bytes C++
     xpcom_core.dll!nsThread::Shutdown()  Line 468 + 0xa bytes    C++
     thunderbird.exe!nsSound::PurgeLastSound()  Line 140    C++
     thunderbird.exe!nsSound::~nsSound()  Line 135    C++
thunderbird.exe!nsSound::`scalar deleting destructor'() + 0x8 bytes C++ thunderbird.exe!nsIndexedToHTML::Release() Line 62 + 0x18 bytes C++ thunderbird.exe!XPCJSRuntime::GCCallback(JSContext * cx=0x04f1d400, JSGCStatus status=JSGC_END) Line 760 + 0x2a bytes C++ thunderbird.exe!DOMGCCallback(JSContext * cx=0x04f1d400, JSGCStatus status=JSGC_END) Line 3827 + 0x14 bytes C++ thunderbird.exe!XPCCycleCollectGCCallback(JSContext * cx=0x04f1d400, JSGCStatus status=JSGC_END) Line 412 + 0x10 bytes C++ js3250.dll!js_GC(JSContext * cx=0x04f1d400, JSGCInvocationKind gckind=GC_NORMAL) Line 3822 + 0x5 bytes C++ js3250.dll!JS_GC(JSContext * cx=0x04f1d400) Line 2439 + 0x8 bytes C++
     thunderbird.exe!nsXPConnect::Collect()  Line 479    C++
xpcom_core.dll!nsCycleCollector::Collect(unsigned int aTryCollections=0x00000001) Line 2434 + 0x5 bytes C++
     xpcom_core.dll!nsCycleCollector_collect()  Line 3130    C++
     thunderbird.exe!nsJSContext::CC()  Line 3641 + 0x6 bytes    C++
     thunderbird.exe!nsJSContext::IntervalCC()  Line 3730    C++
     xpcom_core.dll!nsTimerImpl::Fire()  Line 427 + 0x6 bytes    C++
     xpcom_core.dll!nsTimerEvent::Run()  Line 521    C++
xpcom_core.dll!nsThread::ProcessNextEvent(int mayWait=0x00000001, int * result=0x0045f060) Line 527 + 0x6 bytes C++ xpcom_core.dll!NS_ProcessNextEvent_P(nsIThread * thread=0x00000001, int mayWait=0x00000001) Line 250 + 0xd bytes C++
     thunderbird.exe!nsXULWindow::ShowModal()  Line 416 + 0x9 bytes    C++
     thunderbird.exe!nsContentTreeOwner::ShowAsModal()  Line 529    C++
thunderbird.exe!nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow * aParent=0x00a47780, const char * aUrl=0x01c5e844, const char * aName=0x01ab0bd0, const char * aFeatures=0x01ab0bd8, int aDialog=0x00000001, nsIArray * argv=0x04e20720, int aCalledFromJS=0x00000000, nsIDOMWindow * * _retval=0x0045f35c) Line 1011 C++ thunderbird.exe!nsWindowWatcher::OpenWindow(nsIDOMWindow * aParent=0x00a47780, const char * aUrl=0x01c5e844, const char * aName=0x01ab0bd0, const char * aFeatures=0x01ab0bd8, nsISupports * aArguments=0x04eef740, nsIDOMWindow * * _retval=0x0045f35c) Line 425 + 0x24 bytes C++ thunderbird.exe!nsPromptService::DoDialog(nsIDOMWindow * aParent=0x04e498c0, nsIDialogParamBlock * aParamBlock=0x04eef740, const char * aChromeURL=0x01c5e844) Line 797 C++ thunderbird.exe!nsPromptService::Alert(nsIDOMWindow * parent=0x00a47780, const wchar_t * dialogTitle=0x04eff8e0, const wchar_t * text=0x0773c268) Line 148 C++ thunderbird.exe!nsPrompt::Alert(const wchar_t * dialogTitle=0x04eff8e0, const wchar_t * text=0x0773c268) Line 199 C++ thunderbird.exe!nsMsgDisplayMessageByString(nsIPrompt * aPrompt=0x06eb4e40, const wchar_t * msg=0x0773c268, const wchar_t * windowTitle=0x04eff8e0) Line 124 C++ thunderbird.exe!nsMsgSendReport::DisplayReport(nsIPrompt * prompt=0x06eb4e40, int showErrorOnly=0x00000001, int dontShowReportTwice=0x00000000, unsigned int * _retval=0x0045f57c) Line 428 + 0xe bytes C++ thunderbird.exe!nsMsgComposeAndSend::Fail(unsigned int failure_code=0x06eb4e40, const wchar_t * error_msg=0x00000000, unsigned int * _retval=0x0045f57c) Line 3812 C++ thunderbird.exe!nsMsgComposeAndSend::GatherMimeAttachments() Line 1147 C++ thunderbird.exe!nsMsgAttachmentHandler::UrlExit(unsigned int status=0x00000000, const wchar_t * aMsg=0x00000000) Line 1315 + 0x4 bytes C++ thunderbird.exe!FetcherURLDoneCallback(unsigned int aStatus=0x00000000, const nsACString_internal & aContentType={...}, const nsACString_internal & aCharset={...}, int totalSize=0x000000f1, const wchar_t * aMsg=0x00000000, void * tagData=0x04e56920) Line 534 + 0xd bytes C++ thunderbird.exe!nsURLFetcher::OnStopRequest(nsIRequest * request=0x04e7ce0c, nsISupports * ctxt=0x00000000, unsigned int aStatus=0x00000000) Line 327 + 0x15 bytes C++ thunderbird.exe!nsDocumentOpenInfo::OnStopRequest(nsIRequest * request=0x04e7ce0c, nsISupports * aCtxt=0x00000000, unsigned int aStatus=0x00000000) Line 324 C++ thunderbird.exe!nsBaseChannel::OnStopRequest(nsIRequest * request=0x04e63b00, nsISupports * ctxt=0x00000000, unsigned int status=0x00000000) Line 681 C++
     thunderbird.exe!nsInputStreamPump::OnStateStop()  Line 579    C++
thunderbird.exe!nsInputStreamPump::OnInputStreamReady(nsIAsyncInputStream * stream=0x04e7d428) Line 404 C++
     xpcom_core.dll!nsOutputStreamReadyEvent::Run()  Line 113    C++
xpcom_core.dll!nsThread::ProcessNextEvent(int mayWait=0x00000001, int * result=0x0045f8dc) Line 527 + 0x6 bytes C++ xpcom_core.dll!NS_ProcessNextEvent_P(nsIThread * thread=0x00000001, int mayWait=0x00000001) Line 250 + 0xd bytes C++
     thunderbird.exe!nsBaseAppShell::Run()  Line 177 + 0x9 bytes    C++
     thunderbird.exe!nsAppStartup::Run()  Line 184    C++
thunderbird.exe!XRE_main(int argc=0x00000001, char * * argv=0x00a110a8, const nsXREAppData * aAppData=0x00a17340) Line 3485 C++ thunderbird.exe!NS_internal_main(int argc=0x00000001, char * * argv=0x00a110a8) Line 102 C++ thunderbird.exe!wmain(int argc=0x00a110a8, wchar_t * * argv=0x00a1b700) Line 122 C++
     thunderbird.exe!__tmainCRTStartup()  Line 591 + 0x19 bytes    C
     kernel32.d...@basethreadinitthunk@12()  + 0x12 bytes
     ntdll.dll!___rtluserthreadst...@8()  + 0x27 bytes
     ntdll.dll!__rtluserthreadst...@8()  + 0x1b bytes


Anything more I could do?

M. Kurpel

-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to