The default bug view has changed. See this FAQ.

crash nsNNTPProtocol::Initialize

RESOLVED FIXED in Thunderbird 15.0

Status

MailNews Core
Networking: NNTP
--
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: m_kato, Assigned: aceman)

Tracking

({crash})

Trunk
Thunderbird 15.0
x86
Windows NT
crash

Firefox Tracking Flags

(Not tracked)

Details

(crash signature)

Attachments

(1 attachment, 2 obsolete attachments)

2.57 KB, patch
aceman
: review+
Details | Diff | Splinter Review
(Reporter)

Description

5 years ago
This bug was filed from the Socorro interface and is 
report bp-b037d74c-94b5-46d9-883c-c4be62120108 .
============================================================= 
0 	xul.dll 	nsNNTPProtocol::Initialize 	mailnews/news/src/nsNNTPProtocol.cpp:381
1 	xul.dll 	nsNntpIncomingServer::GetNntpConnection 	mailnews/news/src/nsNntpIncomingServer.cpp:592
2 	xul.dll 	nsNntpIncomingServer::LoadNewsUrl 	mailnews/news/src/nsNntpIncomingServer.cpp:623
3 	xul.dll 	nsNntpService::RunNewsUrl 	mailnews/news/src/nsNntpService.cpp:1195
4 	xul.dll 	nsNntpService::GetNewNews 	mailnews/news/src/nsNntpService.cpp:1226
5 	xul.dll 	nsMsgNewsFolder::GetNewsMessages 	mailnews/news/src/nsNewsFolder.cpp:923
6 	xul.dll 	nsMsgNewsFolder::GetNewMessages 	mailnews/news/src/nsNewsFolder.cpp:894
7 	xul.dll 	nsNntpIncomingServer::DownloadMail 	mailnews/news/src/nsNntpIncomingServer.cpp:705
8 	xul.dll 	nsNntpIncomingServer::PerformExpand 	mailnews/news/src/nsNntpIncomingServer.cpp:682
9 	xul.dll 	NS_InvokeByIndex_P 	xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:102
10 	xul.dll 	XPCWrappedNative::CallMethod 	js/src/xpconnect/src/xpcwrappednative.cpp:2334
11 	xul.dll 	XPC_WN_CallMethod 	js/src/xpconnect/src/xpcwrappednativejsops.cpp:1629
12 	mozjs.dll 	CallCompiler::generateNativeStub 	js/src/methodjit/MonoIC.cpp:937
13 	mozjs.dll 	js::mjit::ic::NativeCall 	js/src/methodjit/MonoIC.cpp:1162
14 	mozjs.dll 	js::mjit::EnterMethodJIT 	js/src/methodjit/MethodJIT.cpp:884
15 	mozjs.dll 	js::mjit::JaegerShot 	js/src/methodjit/MethodJIT.cpp:962
16 	mozjs.dll 	js::Interpret 	js/src/jsinterp.cpp:4075
17 	mozjs.dll 	js::RunScript 	js/src/jsinterp.cpp:614
18 	mozjs.dll 	js::InvokeKernel 	js/src/jsinterp.cpp:678
19 	mozjs.dll 	js::Invoke 	js/src/jsinterp.cpp:710
20 	mozjs.dll 	JS_CallFunctionValue 	js/src/jsapi.cpp:5039
21 	xul.dll 	nsXPCWrappedJSClass::CallMethod 	js/src/xpconnect/src/xpcwrappedjsclass.cpp:1660
22 	xul.dll 	nsXPCWrappedJS::CallMethod 	js/src/xpconnect/src/xpcwrappedjs.cpp:585
23 	xul.dll 	PrepareAndDispatch 	xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp:114
24 	xul.dll 	SharedStub 	xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp:141
25 	xul.dll 	NS_InvokeByIndex_P 	xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp:102


m_nntpServer seems to be null.  connection pool has closed connection?
(Reporter)

Updated

5 years ago
Component: General → Networking: NNTP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.nntp
(Assignee)

Comment 1

5 years ago
Should I add the check?
(In reply to :aceman from comment #1)
> Should I add the check?

go for it
(Assignee)

Updated

5 years ago
Assignee: nobody → acelists
(Assignee)

Comment 3

5 years ago
Created attachment 592218 [details] [diff] [review]
patch

Should the function exit like this, or can the server be initialized somehow?
Attachment #592218 - Flags: review?(dbienvenu)
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED

Comment 4

5 years ago
Comment on attachment 592218 [details] [diff] [review]
patch

probably better to ask Joshua...
Attachment #592218 - Flags: review?(dbienvenu) → review?(Pidgeot18)
(Assignee)

Comment 5

5 years ago
Jcranmer, any idea?
Comment on attachment 592218 [details] [diff] [review]
patch

Review of attachment 592218 [details] [diff] [review]:
-----------------------------------------------------------------

The problem is not the server isn't initialized (that has to happen when it's created), but that it's apparently being used after the server is dead. I'd rather see an assertion on m_nntpServer not being present and using some other error (NS_ERROR_UNEXPECTED perhaps?).
Attachment #592218 - Flags: review?(Pidgeot18) → review-
(Assignee)

Comment 7

5 years ago
But why would that happen? You don't know but you want to see the message in error console so that the user can report it and we can ask him what he does?

Is NS_ENSURE_TRUE an assertion? Or what exactly should I make it?
NS_ASSERTION is how you get an assertion (it won't fail in release builds, so you still need a check to prevent a crash).

As for how it happens, we end up a lot of time in NNTP having values which can't be null being null somewhow, so I'm going to chalk it up to the same effect.
(Assignee)

Comment 9

5 years ago
OK, so the only thing I have to do in the patch is just add an NS_ASSERTION line next to the NS_ENSURE_TRUE line?
I'm also not thrilled with the use of NS_ERROR_UNITIALIZED; another one would be better.
(Assignee)

Comment 11

5 years ago
Created attachment 628472 [details] [diff] [review]
patch v2
Attachment #592218 - Attachment is obsolete: true
Attachment #628472 - Flags: review?(Pidgeot18)
Comment on attachment 628472 [details] [diff] [review]
patch v2

Review of attachment 628472 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/news/src/nsNNTPProtocol.cpp
@@ +329,5 @@
>    }
>    nsMsgProtocol::InitFromURI(aURL);
>  
>    nsCOMPtr<nsIMsgIncomingServer> server = do_QueryInterface(m_nntpServer);
> +  NS_ASSERTION(m_nntpServer, "m_nntpServer is null!");

Change this message to "nsNNTPProtocol needs an m_nntpServer"
Attachment #628472 - Flags: review?(Pidgeot18) → review+
(Assignee)

Comment 13

5 years ago
Created attachment 628819 [details] [diff] [review]
patch v3

Thanks, done.
Attachment #628472 - Attachment is obsolete: true
Attachment #628819 - Flags: review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/62b83330b36c
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 15.0
You need to log in before you can comment on or make changes to this bug.