Closed Bug 84767 Opened 25 years ago Closed 25 years ago

Crash in ConvertMoveToFolderValue logging into mail server

Categories

(MailNews Core :: Filters, defect, P2)

PowerPC
Mac System 9.x
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: bnesse, Assigned: naving)

References

Details

(Keywords: crash)

Attachments

(3 files)

Fairly regularly I'm getting crashes while logging into mail (I've filed numerous talkbacks on it). The crashes are always in the filter code, which is odd because I have never used mail filters, and generally the only way I can fix it is by creating a new profile. Here is the stack crawl from my latest crash: Calling chain using A6/R1 links Back chain ISA Caller 00000000 PPC 0EA7F910 0AD9E890 PPC 0EA61DF0 main+001AC 0AD9E830 PPC 0EA5EFF0 main1(int, char**, nsISupports*)+009B4 0AD9E5C0 PPC 0E431BBC nsAppShellService::Run()+00054 0AD9E570 PPC 0E3D6178 nsAppShell::Run()+0004C 0AD9E530 PPC 0E3D6D80 nsMacMessagePump::DoMessagePump()+00044 0AD9E4E0 PPC 0E3D76F8 nsMacMessagePump::DispatchEvent(int, EventRecord*)+ 001B0 0AD9E490 PPC 0E3F6D04 Repeater::DoRepeaters(const EventRecord&)+0003C 0AD9E440 PPC 0E3BD990 nsMacNSPREventQueueHandler::RepeatAction(const EventRecord&)+00014 0AD9E400 PPC 0E3BDFA0 nsMacNSPREventQueueHandler::ProcessPLEventQueue()+ 00180 0AD9E380 PPC 0E8CD7B0 nsEventQueueImpl::ProcessPendingEvents()+00068 0AD9E310 PPC 0E9409FC PL_ProcessPendingEvents+000BC 0AD9E2C0 PPC 0E940C50 PL_HandleEvent+00054 0AD9E280 PPC 0E905FB8 EventHandler(PLEvent*)+00074 0AD9E230 PPC 0E8FBE70 XPTC_InvokeByIndex+0002C 0AD9E1F0 PPC 0E8FBF78 _XPTC_InvokeByIndex+000C8 0AD9E13C PPC 0DCDBBF4 nsImapMailFolder::SetupHeaderParseStream(nsIImapProtocol*, unsigned int, const char*, nsIMailboxSpec*)+001B0 0AD9E07C PPC 0DD6F7DC nsMsgIncomingServer::GetFilterList(nsIMsgFilterList* *)+007FC 0AD9DF4C PPC 0AE3B7A8 nsMsgFilterService::OpenFilterList(nsIFileSpec*, nsIMsgFolder*, nsIMsgFilterList**)+002A4 0AD9DE3C PPC 0AE27610 nsMsgFilterList::LoadTextFilters(nsIOFileStream*)+ 0032C Closing log It is dying in "case nsIMsgFilterList::attribActionValue:" in the code: if (m_curFilter->m_action.m_type == nsMsgFilterAction::MoveToFolder) err = m_curFilter->ConvertMoveToFolderValue(value); because m_curFilter is NULL. Most of the other cases in this switch statement check if (m_curFilter) before accessing it... the attribAction and attribActionValue cases don't.
walking through the process I get, in sequence: attribVersion attribLogging attribEnabled attribType AttribAction <- writes to null object, stomps on memory AttribActionValue <- jumps to null object, crashes Is there always supposed to be a valid m_curFilter, or do these last two cases need to be protecting themselves?
Keywords: crash
Brian, do you have any testcase to reproduce this? I've never seen this crash before.
I can reproduce it on my development machine 100% of the time. I assume that it's related to my profile contents... more specifically probably my prefs.js file contents. But that's only a guess and I haven't attempted to narrow it down.
Can you post your rules.dat file please?
Attached file Brian's rules.dat file
The last two cases need to be protected by checking for null. nominating
Keywords: nsbeta1
Looking at your rules.dat file there is no name so m_curFilter is never allocated any memory. Therefore we need to protect for null for these last two cases.
Status: NEW → ASSIGNED
moving to mozilla 0.9.2. if anyone edits there rules.dat or for some reason the rules.dat does not have name for the filter it will crash.
Priority: -- → P2
Target Milestone: --- → mozilla0.9.2
sr=mscott
hwaara can I get r= ?
r=suresh
a=blizzard on behalf of drivers for the trunk
Blocks: 83989
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
brian, please verify this bug.
Nope. Now it dies in ParseCondition() probably doing the same m_curFilter stuff near the bottom.
whoops!!! forgot one more case. patch coming up
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I have tested and it no longer crashes. Sorry, should have been more careful the first time.
r=suresh
sr=mscott
That file looks like it needs some major whitespace cleanup... but a=dbaron for trunk checkin (on behalf of drivers).
fix checked in. should not crash this time.
Status: REOPENED → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
This time it works. Crash is gone.
I tried to reproduce a/the crash in this situation with june21 commercial trunk build, mac OS 9.0 and couldn't. Marking verified based on my tests and reporter's latest comments.
Status: RESOLVED → VERIFIED
I tried to reproduce a/the crash in this situation with june21 commercial trunk build, mac OS 9.0 and couldn't. Marking verified based on my tests and reporter's latest comments.
To crash it edit your rules.dat and remove filter name.
Yes, that's what I did when I tried to reproduce the crash.
June21 build will have the fix, you need to try a build before 17th.
It's already verified. I'm done.
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

Created:
Updated:
Size: