Closed Bug 80539 Opened 23 years ago Closed 23 years ago

viewing email (background downloading?) nsUInt32Array::InsertAt 0ed8ea6c

Categories

(MailNews Core :: Backend, defect)

defect
Not set
critical

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 75296

People

(Reporter: timeless, Assigned: Bienvenu)

Details

(Keywords: crash, topcrash)

Attachments

(1 file)

ftp://ftp.mozilla.org/pub/data/crash-data/detailed-crash-analysis-all.html#.__p
tr_glue

Build: 2001050518 CrashDate: 2001-05-08 UptimeMinutes: 2 Total: 2 
 OS: MacOS version 9.0 
 URL: http://www.badastronomy.com/bad/movies/index.html 
 Comment: Trying to visit link after just installing and opening 0.9 (had IE 
running at the same time 
 BBID: 30144331 

nsUInt32Array::InsertAt 00698d54 

Stack Trace: 
 Source File :  
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/util/nsUInt32
Array.cpp line no: 213
--
Build: 2001050518 CrashDate: 2001-05-11 UptimeMinutes: 598 Total: 598 
 OS: Windows NT 4.0 build 1381 
 URL: 
 Comment: 
 BBID: 30317487 


nsUInt32Array::InsertAt 06a165ef 

Stack Trace: 
 nsUInt32Array::InsertAt 
[d:\builds\seamonkey\mozilla\mailnews\base\util\nsUInt32Array.cpp line 213] 
 nsMsgThreadedDBView::OnNewHeader 
[d:\builds\seamonkey\mozilla\mailnews\base\src\nsMsgThreadedDBView.cpp line 
476] 
 nsMsgDBView::OnKeyAdded 
[d:\builds\seamonkey\mozilla\mailnews\base\src\nsMsgDBView.cpp line 3248] 
 nsMsgDatabase::NotifyKeyAddedAll 
[d:\builds\seamonkey\mozilla\mailnews\db\msgdb\src\nsMsgDatabase.cpp line 438] 
 nsMsgDatabase::AddNewHdrToDB 
[d:\builds\seamonkey\mozilla\mailnews\db\msgdb\src\nsMsgDatabase.cpp line 2585] 
 nsMsgDatabase::CopyHdrFromExistingHdr 
[d:\builds\seamonkey\mozilla\mailnews\db\msgdb\src\nsMsgDatabase.cpp line 2610] 
 nsParseNewMailState::MoveIncorporatedMessage 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsParseMailbox.cpp line 1870] 
 nsParseNewMailState::ApplyFilterHit 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsParseMailbox.cpp line 1677] 
 nsMsgFilterList::ApplyFiltersToHdr 
[d:\builds\seamonkey\mozilla\mailnews\base\search\src\nsMsgFilterList.cpp line 
159] 
 nsParseNewMailState::ApplyFilters 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsParseMailbox.cpp line 1585] 
 nsParseNewMailState::PublishMsgHeader 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsParseMailbox.cpp line 1494] 
 nsPop3Sink::IncorporateComplete 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsPop3Sink.cpp line 429] 
 nsPop3Protocol::HandleLine 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsPop3Protocol.cpp line 2402] 
 nsMsgLineBuffer::ConvertAndSendBuffer 
[d:\builds\seamonkey\mozilla\mailnews\base\util\nsMsgLineBuffer.cpp line 221] 
 nsMsgLineBuffer::BufferInput 
[d:\builds\seamonkey\mozilla\mailnews\base\util\nsMsgLineBuffer.cpp line 191] 
 nsPop3Protocol::RetrResponse 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsPop3Protocol.cpp line 2223] 
 nsPop3Protocol::ProcessProtocolState 
[d:\builds\seamonkey\mozilla\mailnews\local\src\nsPop3Protocol.cpp line 2823] 
 nsMsgProtocol::OnDataAvailable 
[d:\builds\seamonkey\mozilla\mailnews\base\util\nsMsgProtocol.cpp line 236] 
 nsOnDataAvailableEvent::HandleEvent 
[d:\builds\seamonkey\mozilla\netwerk\base\src\nsStreamListenerProxy.cpp line 
183] 
 PL_HandleEvent [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c line 589] 
 PL_ProcessPendingEvents [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c 
line 522] 
 _md_EventReceiverProc [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c 
line 1070] 
 nsAppShellService::Run 
[d:\builds\seamonkey\mozilla\xpfe\appshell\src\nsAppShellService.cpp line 408] 
 main1 [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1012] 
 main [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1312] 
 WinMain [d:\builds\seamonkey\mozilla\xpfe\bootstrap\nsAppRunner.cpp line 1330] 
 WinMainCRTStartup() 
 KERNEL32.DLL + 0x7903 (0x77e87903) 

Source File : 
 
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/util/nsUInt32
Array.cpp line no: 213 

--
 Build: 2001050518 CrashDate: 2001-05-11 UptimeMinutes: 1 Total: 2703 
 OS: Windows NT 5.0 build 2195 
 URL: 
 Comment: i was viewing my email 
 BBID: 30309486 
--
Build: 2001050518 CrashDate: 2001-05-09 UptimeMinutes: 18 Total: 18 
 OS: Windows NT 5.0 build 2195 
 URL: 
 Comment: i was viewing an email with 30 images atchments 
 BBID: 30200057 

nsUInt32Array::InsertAt 0ed8ea6c 

Stack Trace: 
 nsUInt32Array::InsertAt 
[d:\builds\seamonkey\mozilla\mailnews\base\util\nsUInt32Array.cpp line 213] 
 nsMsgThreadedDBView::OnNewHeader 
[d:\builds\seamonkey\mozilla\mailnews\base\src\nsMsgThreadedDBView.cpp line 
476] 
 nsMsgDBView::OnKeyAdded 
[d:\builds\seamonkey\mozilla\mailnews\base\src\nsMsgDBView.cpp line 3248] 
 nsMsgDatabase::NotifyKeyAddedAll 
[d:\builds\seamonkey\mozilla\mailnews\db\msgdb\src\nsMsgDatabase.cpp line 438] 
 nsMsgDatabase::AddNewHdrToDB 
[d:\builds\seamonkey\mozilla\mailnews\db\msgdb\src\nsMsgDatabase.cpp line 2585] 
 nsImapMailFolder::NormalEndHeaderParseStream 
[d:\builds\seamonkey\mozilla\mailnews\imap\src\nsImapMailFolder.cpp line 2440] 
 XPTC_InvokeByIndex 
[d:\builds\seamonkey\mozilla\xpcom\reflect\xptcall\src\md\win32\xptcinvoke.cpp 
line 139] 
 EventHandler [d:\builds\seamonkey\mozilla\xpcom\proxy\src\nsProxyEvent.cpp 
line 510] 
 PL_HandleEvent [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c line 589] 
 PL_ProcessPendingEvents [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c 
line 522] 
 _md_EventReceiverProc [d:\builds\seamonkey\mozilla\xpcom\threads\plevent.c 
line 1070] 
 KERNEL32.DLL + 0x242e7 (0xbff942e7) 
 0x00688b5a 

 Source File : 
 
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/util/nsUInt32
Array.cpp line no: 213
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/mailnews/base/util/nsUInt32
Array.cpp&rev=1.14&mark=60,67-73,81,109,116,196,202,205-206,211-213#189

two things.
(a) ::InsertAt doesn't care if ::SetSize returns an error about allocation ** 
this is my guess about why we crash.
(b) ::InsertAt can call ::SetSize where it needs to grow the array and move the 
current data. which results in a move after copy -- which is probably not very 
efficient.

OTOH 213 is the } ... end of function, not really the while loop which is where 
I think we crash (array index out of bounds -- in the MAX_ARR_ELEMS case).
Keywords: crash, topcrash
Summary: viewing email (background downloading?) nsUInt32Array::InsertAt 0ed8ea6c → viewing email (background downloading?) nsUInt32Array::InsertAt 0ed8ea6c
No, the crash is almost certainly because we're trying to insert at index -1. I
fixed a bug like this earlier. I haven't seen this one. Which threaded view are
you in? normal threaded? threads with unread only, unread messages only?
well, we could assert, but we should also handle the situation. Adding an assert
doesn't really help detect the problem, I think, because we will always crash in
that situation anyway currently. What I really need is a way to recreate this.
Blocks: 82033
One of the reports mentioned Threads with Unread, but I've been unable to
reproduce the crash.
Does anyone know for a fact that this crash still exists?  David fixed a crash
with the same signature in bug 75296.  Taking a file that's in the patch,
nsMsgDBView.cpp, the fix was checked in in revision 1.36.  However the 0.9
branch appears to have been based on 1.34.  So, unless David checked into the
branch, the fix for 75296 isn't in it which could explain why there are so many
crashes in 0.9 but not on recent builds. Someone might want to verify that I'm
reading the revision numbers correctly. 
i think that's a reasonable conclusion

*** This bug has been marked as a duplicate of 75296 ***
No longer blocks: 82033
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
I didn't check into the branch (at least that I remember). Thanks, timeless.
verified dup (same stack)
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: