Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 670935 - News crash [@ nsMsgKeySet::Output(char**) ] | [@ nsMsgNewsFolder::UpdateSummaryFromNNTPInfo ] and [@ nsMsgKeySet::Output ] (Mac)
: News crash [@ nsMsgKeySet::Output(char**) ] | [@ nsMsgNewsFolder::UpdateSumma...
: crash
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: x86 All
: -- critical (vote)
: Thunderbird 11.0
Assigned To: Joshua Cranmer [:jcranmer]
: 672603 694522 706002 (view as bug list)
Depends on: 662228
  Show dependency treegraph
Reported: 2011-07-12 08:25 PDT by Wayne Mery (:wsmwk, NI for questions)
Modified: 2011-11-30 01:06 PST (History)
5 users (show)
standard8: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Make FindGroup use escaped names (8.25 KB, patch)
2011-11-21 18:57 PST, Joshua Cranmer [:jcranmer]
mozilla: review+
standard8: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description Wayne Mery (:wsmwk, NI for questions) 2011-07-12 08:25:53 PDT
News crash [@ nsMsgKeySet::Output(char**) ] | [@ nsMsgNewsFolder::UpdateSummaryFromNNTPInfo ]

spun off from bug 188243

bp-284b8e61-2f00-46a4-ae2b-dfb7b2110710 can't support chinese newsgroup

bp-18667bce-acea-47a3-b972-577992110710 cannot read email since the last update [to version 5]. up until now. it's alway crash.

bp-60e19aae-c370-4323-b8c0-f5e422110630 (osd)

bp-9dfe2c9e-9c25-4837-a86f-c28bc2110705 (chris) a single NNTP server added and as soon as I expand the list of newsgroups on this server (using the left panel that shows "Local Folders" and my NNT Server), within seconds, Thunderbird crashes. Happens every time since I upgraded to Thunderbird 5.0. Worked fine before the upgrade from previous version.
0	xul.dll	nsMsgKeySet::Output	mailnews/base/util/nsMsgKeySet.cpp:315
1	xul.dll	nsMsgNewsFolder::UpdateSummaryFromNNTPInfo	mailnews/news/src/nsNewsFolder.cpp:735
2	xul.dll	nsNNTPProtocol::BeginReadXover	mailnews/news/src/nsNNTPProtocol.cpp:3118
3	xul.dll	nsNNTPProtocol::ProcessProtocolState	mailnews/news/src/nsNNTPProtocol.cpp:4659
4	xul.dll	nsMsgProtocol::OnDataAvailable	mailnews/base/util/nsMsgProtocol.cpp:387
5	xul.dll	nsInputStreamPump::OnStateTransfer	netwerk/base/src/nsInputStreamPump.cpp:510
6	xul.dll	nsInputStreamPump::OnInputStreamReady	netwerk/base/src/nsInputStreamPump.cpp:400
Comment 1 Joshua Cranmer [:jcranmer] 2011-07-12 10:08:29 PDT
Hmm, we're getting a null nsMsgKeySet. It looks like the mReadSet is initially set by AddNewsgroup (effectively) fairly early on, so I doubt that it's an initialization failure.

More likely, someone is triggering us to delete the mReadSet before we read from it again. Doing some more research.
Comment 2 Wayne Mery (:wsmwk, NI for questions) 2011-09-23 10:35:23 PDT
(In reply to Joshua Cranmer [:jcranmer] from comment #1)
> More likely, someone is triggering us to delete the mReadSet before we read
> from it again. Doing some more research.

Joshua, did the research bear fruit?
Comment 3 Joshua Cranmer [:jcranmer] 2011-11-03 14:58:37 PDT
Research yielding fruit:

So, this is a combination of RDF, URIs, and characters needing escapes. We create two folders, one with an escaped name and one without. One of these gets initialized; the other one does not. We're crashing because we end up using the uninitialized folder.

If you will excuse me, I need to bash something with a bloody hammer.
Comment 4 Joshua Cranmer [:jcranmer] 2011-11-03 14:59:37 PDT
*** Bug 672603 has been marked as a duplicate of this bug. ***
Comment 5 Joshua Cranmer [:jcranmer] 2011-11-03 15:01:27 PDT
*** Bug 694522 has been marked as a duplicate of this bug. ***
Comment 6 Joshua Cranmer [:jcranmer] 2011-11-21 18:57:27 PST
Created attachment 576066 [details] [diff] [review]
Make FindGroup use escaped names

Fortunately, all of the news URI work means there are very few places where I need to change this to fix the problems caused by RDF's ability to conjure up nonexistent folder names if they aren't sufficiently well-escaped.

Side rant of the day: if you have dependent strings in use, you can end up with wrong results.
Comment 7 David :Bienvenu 2011-11-22 14:43:19 PST
Comment on attachment 576066 [details] [diff] [review]
Make FindGroup use escaped names

Thx for the patch; I'll build and try it now.

Can you explain why (and what) is necessary? I assume it's the temp var, and the reason is that you can't unescape into the (sub) string you're unescaping from. If that's the case, please just say // Can't unescape into the string we're unescaping from.  or something like that.

+    // Yes, this is necessary
+    nsCAutoString unescapedGroup;
+    MsgUnescapeString(Substring(group, groupSeparator + 1), 0, unescapedGroup);
+    group = unescapedGroup;
Comment 8 David :Bienvenu 2011-11-22 15:15:08 PST
Comment on attachment 576066 [details] [diff] [review]
Make FindGroup use escaped names

r=me, modulo my comment about your obscure comment ;-)
Comment 9 Joshua Cranmer [:jcranmer] 2011-11-26 19:57:21 PST
This has been pushed, with the comment changed. I think I meant to change the name originally, but forgot when I uploaded the patch.
Comment 10 Joshua Cranmer [:jcranmer] 2011-11-29 19:45:59 PST
*** Bug 706002 has been marked as a duplicate of this bug. ***
Comment 11 Joshua Cranmer [:jcranmer] 2011-11-29 19:46:08 PST
Comment on attachment 576066 [details] [diff] [review]
Make FindGroup use escaped names

Since this crash was introduced in Version 8, I'd like to request that this gets uplifted to aurora and beta.
Comment 12 Mark Banner (:standard8) 2011-11-30 01:06:15 PST
Please remember to include the changeset details in bugs when landing patches. This makes it easier to find them, or transplant them if we're looking at bugs in future. The original landing was:

I've transplanted this to aurora & beta, as we are building a new beta today:

(oh and on the idl front, I'm pretty sure the attribute name change doesn't affect binary extensions - due to not being a critical part of the function definition - which is why I've allowed it).

Note You need to log in before you can comment on or make changes to this bug.