Closed Bug 101845 Opened 23 years ago Closed 23 years ago

Crash if exit while File from Search ongoing.

Categories

(SeaMonkey :: MailNews: Message Display, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: laurel, Assigned: naving)

Details

(Keywords: crash)

Attachments

(1 file)

Using sep26 branch build
Seen on Win98 & Mac OS X  so assuming all platforms

If a File from search messages UI results pane is ongoing and you exit, a crash
occurs. (Note: was not able to crash if doing the same kind of thing from main
mail window.)

Not something that may be encountered a lot, but we shouldn't crash.

Steps:
1.  Search a large newsgroup (I used n.p.m.mail-news) to yield a lot of matches
(I  had 1400-2000).
2.  Select all search results (current Select All doesn't work in search, use
Shift+_Select).
3.  Click File button in search ui and select a mail folder destination. (I
chose a folder in Local Folders.)
4.  File/copy operation begins... while still in progress, File|Quit.

Result: crash occurs. will attach talkback report.
Talkback incident 35926967:
Stack Trace
nsNNTPProtocol::DisplayArticle
[d:\builds\seamonkey\mozilla\mailnews\news\src\nsNNTPProtocol.cpp, line 2518]
nsNNTPProtocol::ReadArticle
[d:\builds\seamonkey\mozilla\mailnews\news\src\nsNNTPProtocol.cpp, line 2560]
nsNNTPProtocol::ProcessProtocolState
[d:\builds\seamonkey\mozilla\mailnews\news\src\nsNNTPProtocol.cpp, line 5127]
nsMsgProtocol::OnDataAvailable
[d:\builds\seamonkey\mozilla\mailnews\base\util\nsMsgProtocol.cpp, line 246]
nsOnDataAvailableEvent::HandleEvent
[d:\builds\seamonkey\mozilla\netwerk\base\src\nsStreamListenerProxy.cpp, line 188]
PL_HandleEvent [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c, line 591]
PL_ProcessPendingEvents [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c,
line 524]
nsEventQueueImpl::ProcessPendingEvents
[d:\builds\seamonkey\mozilla\xpcom\threads\nsEventQueue.cpp, line 375] 
Tried briefly to reproduce using large File from mail message Search results and
did not crash. Maybe only a newsgroup search problem.
Status: NEW → ASSIGNED
Are you crashing on trunk as well ?. I am not seeing any crash on trunk.
I didn't try on the trunk yet. Will do so when I get a chance.
I tried with both today's (sep27) branch and trunk builds on win98.  Was able to
crash most of the time on both branch and trunk, but did make it through once on
the trunk without crashing. Sent another talkback in, but can't retrieve it yet.
ok, I will try again, but I am having hard time reproducing it in VC++ debugger.
adding keywords
Keywords: crash, nsbeta1
Keywords: nsbeta1nsbeta1+
Priority: -- → P2
Is this really a nsbeta1+, P2? If yes, then we need to try and targeted to a
mielstone M1.0 or earlier to make the beta.
Target Milestone: --- → mozilla1.0
Attached patch proposed fixSplinter Review
The fix is to pass a valid msgWindow, which was not happening here because when

we file messages from search we don't allow undo. Use mCopyState->m_msgWindow
so that on File |Quit we are able to cancel the running news url.
crash doesn't happen for imap, only for local. david, you can also review because
fix is in local folders, but I have asked seth too. 
Comment on attachment 70808 [details] [diff] [review]
proposed fix

so the old code uses the msgWindow from the undo txn object, and the new way
used the msg window from the copy state.

which scenarios have you tested?

I'm worried about other scenarios where the this switch will cause problems,
due to us not having a msg window where we did before.
if you look at nsLocalMailFolder::CopyMessages it is same msgWindow for 
both copyState and undoObject. 

Since I have made change to EndCopy in local folder I have tried copying & 
moving msgs from local,imap, news to local and undoing them and it works fine. 
Also Search: filing from news, imap, local to local work fine.
Comment on attachment 70808 [details] [diff] [review]
proposed fix

sr=bienvenu
Attachment #70808 - Flags: superreview+
a=asa (on behalf of drivers) for checkin to 0.9.9
Keywords: mozilla0.9.9+
Severity: normal → critical
fixed
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
OK using feb25 commercial trunk build: win98, mac OS 10.1, linux rh6.2
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
Component: MailNews: Search → MailNews: Message Display
QA Contact: laurel → search
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: