Closed Bug 285791 Opened 20 years ago Closed 20 years ago

draft messages saved when offline cause crash when going online [@ nsImapOfflineSync::ProcessAppendMsgOperation]

Categories

(MailNews Core :: Networking: IMAP, defect)

1.7 Branch
x86
All
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: Bienvenu)

Details

(Keywords: crash)

Crash Data

Attachments

(2 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217

Messages saved to the drafts folder while offline are not only not available
offline, but when going back online, selecting the folder causes a crash.


Reproducible: Always

Steps to Reproduce:
This happens on both Windows XP professional and Linux (Mandrakelinux 10.1):
The server side is UW-imap 2002d.

1. Start with empty drafts folder (when online)
2. Set the available offline checkbox for the Drafts folder
3. Go offline, then save a message in the Drafts folder.  I note that one cannot
retrieve the message saved in the (offline Drafts) folder - the header is there
but in the display pane it says the message will be available only while online.
4. Quit Mozilla and restart.
5. Go online and select the Drafts folder.
Actual Results:  
9 out of 10 times Mozilla crashes as soon as the Drafts folder is selected.  The
other time some part of Mozilla hangs with an hourglass icon, and from that
point it's impossible to open any other folders.

Expected Results:  
Messages saved to the Drafts folder should have been synced with the server at
"go online" time.

In the Drafts file saved in the Mozilla profile, the saved Drafts message(s) are
there, but are inaccessable as above.  I was able to recover the message by cut
and pasting the body of the inaccessable message into a new email.
This bug bears some similarity to 195478 but that guy is reporting different
behavior, and notably not a crash.
any talkback id's?

Have you tried a recent trunk build? I did fix one problem with saving offline
drafts, though it didn't involve a crash.
OK, I made a mistake in my reporting how to recreate the bug. 

Change step 2 to be *uncheck* the offline box for the Drafts folder properties.
 Once offline, it's possible to drag a message into the Drafts folder which is
then unviewable, and Mozilla then crashes when going online.
Keywords: crash
worksforme with linux trunk 2005031205
I just recreated the problem twice, with the Windows trunk build of
2005-03-14-08.   At this moment I don't have a good way to confirm how the trunk
behaves on Linux.  I sent in a couple talkback reports for the crash too listing
dave at jamsoft.com for the email address.

It's as if once the problem occurs, Messenger crashes no matter what the offline
setting is for the Drafts folder.  The only way I can get it to stop crashing is
to delete the local cached copy of Drafts in ImapMail (profile) AND zero out the
 corresponding folder on the IMAP server side.

Note: Dragging a message from another folder into Drafts does not cause a problem. 
It's the case of composing a new email, hitting X to close the window, then
accepting the save to drafts option that brings the crash when I attempt to go
back online.
Version: unspecified → Trunk
what was the talkback ID for the crash?  you can look at your own talkback
stacks here:  http://talkback-public.mozilla.org/talkback/fastfind.jsp, but
we/you can't search by email address
Here are talkback IDs of reports I submitted.  Looks like there are at least a
couple others too with the same stack signature and circumstances.
4340930
4342908
4271762
talkback stack:

nsImapOfflineSync::ProcessAppendMsgOperation 
[d:/BUILDS/tinderbox/Mozilla1.7/WINNT_5.0_Clobber/mozilla/mailnews/imap/src/nsImapOfflineSync.cpp,
line 378]
nsImapOfflineSync::ProcessNextOperation 
[d:/BUILDS/tinderbox/Mozilla1.7/WINNT_5.0_Clobber/mozilla/mailnews/imap/src/nsImapOfflineSync.cpp,
line 845]
nsImapOfflineSync::ProcessNextOperation 
[d:/BUILDS/tinderbox/Mozilla1.7/WINNT_5.0_Clobber/mozilla/mailnews/imap/src/nsImapOfflineSync.cpp,
line 826]
nsImapOfflineSync::ProcessNextOperation 
[d:/BUILDS/tinderbox/Mozilla1.7/WINNT_5.0_Clobber/mozilla/mailnews/imap/src/nsImapOfflineSync.cpp,
line 826]
nsImapOfflineSync::ProcessNextOperation 
[d:/BUILDS/tinderbox/Mozilla1.7/WINNT_5.0_Clobber/mozilla/mailnews/imap/src/nsImapOfflineSync.cpp,
line 826]
nsImapOfflineSync::OnStopRunningUrl 
[d:/BUILDS/tinderbox/Mozilla1.7/WINNT_5.0_Clobber/mozilla/mailnews/imap/src/nsImapOfflineSync.cpp,
line 
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: draft messages saved when offline cause crash when going online → draft messages saved when offline cause crash when going online [@ nsImapOfflineSync::ProcessAppendMsgOperation]
Component: MailNews: Offline → Networking: IMAP
Product: Mozilla Application Suite → Core
Version: Trunk → 1.7 Branch
Attached patch proposed fix (obsolete) — Splinter Review
I can't reproduce the crash, but I think I see an error in the code. I'd like
to check this in and see if it fixes the crash.  However, if this fixes it,
there must have been an error trying to do the offline append...
Attachment #177886 - Flags: superreview?(mscott)
this makes it clear what's going on in the patch.
Attachment #177886 - Attachment is obsolete: true
Attachment #177887 - Flags: superreview?(mscott)
Attachment #177886 - Flags: superreview?(mscott)
Attachment #177887 - Flags: superreview?(mscott) → superreview+
fix checked in - please try a build from tomorrow or later...
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
I just tried the 3/20-09 trunk 1.7 build on Windows XP SP2 (same as before) and
was able to recreate the same crash.

There's still something strange with the behavior of the Drafts folder when
offline.  I started with the folder empty (on the server), verified it was
marked for offline use, then went offline, accepting the offer to download all
messages.  I started to compose a new email, then clicked the window close
widget.  I accepted the save to Drafts option, which appeared to complete
successfully.  I then clicked on the Drafts folder.  This appeared to hang
Mozilla with an hourglass icon (was it trying to connect?).   I quit out of
Mozilla, verified it was gone in Task Manager, then restarted.  Looking again in
the Drafts folder, the message was shown but in the body area was a message that
the message was not downloaded and was unavailable (incorrect - I just saved
it?).  As soon as I clicked the go online icon, Mozilla crashed.

Unfortunately this morning I cannot send the talkback report yet - keeps timing
out on the server side.   Will keep trying and post the talkback ID when I have it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #13)
> I just tried the 3/20-09 trunk 1.7 build on Windows XP SP2 (same as before) and
> was able to recreate the same crash.

No wonder ;), this patch was only checked in on trunk. You want to test a build
from http://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest/
Oops, the 'trunk' notation for the 1.7 builds got me. 

The bug appears fixed in the 'latest' (1.8-trunk) build.
The offline and online behavior of Drafts now works as I expect it should -
thank you very much!
Status: REOPENED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
also, the other problem you mentioned is fixed on the trunk, I believe. That
sounds like the problem I referred to in c#2.
OK, I'll check the other problem too. 

BTW, any chance the patch will make it into 1.7.6?   I just crashed the 1.8
trunk build (that was shown to fix this bug) attempting to notify some users by
email of this patch... :-(
Product: Core → MailNews Core
Crash Signature: [@ nsImapOfflineSync::ProcessAppendMsgOperation]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: