Closed Bug 485348 Opened 16 years ago Closed 11 years ago

save draft does not work after compacting of folders

Categories

(SeaMonkey :: MailNews: General, defect)

SeaMonkey 1.1 Branch
x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: zetka, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090303 SeaMonkey/1.1.15
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090303 SeaMonkey/1.1.15

After compacting request from SeaMonkey was done an edited message could not be saved, there was repeated error message although the folders were compacted and the draft folder did not contain any message.

Reproducible: Didn't try

Steps to Reproduce:
1.writing a message in edit window
2. compact folders
3. getting errors to unable save the draft
Actual Results:  
as above

Expected Results:  
after compacting of the folders the message should be saved normally.
Component: General → MailNews: General
Can you reproduce with SeaMonkey v2.0a3 ?
Version: unspecified → SeaMonkey 1.1 Branch
As I wrote in Bug 482836 Comment #5, "manual compaction of local Drafts during composing" produced "undeleted old draft mail" (checked with Seamonkey 1.1.4 and Tb trunk 2009/3/21 build). But I didn't see "errors to unable save the draft" in my test.

IMAP folder? Local mail folder(POP3 or "Local Folders")?

Auto-save case? Or manual "Save As Draft" case? Or both?
Auto-compaction? Or manual compaction?
If manual compaction, "Compact folders"? Or "Compact folder" of Drafts only?
Before start of mail composition, you opened Drafts folder? Or you didn't open Drafts folder after restart of Seamonky?

When problem occurred, was there any active draft mail in Drafts folder?
Or "already deleted draft mail only" in Drafts folder?
(If local Drafts folder, mail data with MSG_FLAG_EXPUNGED bit=ON. See Bug 482836 Commnet #14)
I assume "local Drafts folder" with auto-compact=ON, because you say "compacting request from SeaMonkey". And I assume you use auto-compact with mail.purge.ask=false. (You checked  "Do automatically ..." at confirmation dialog of auto-compact in the past.)

Following phenomenon was observed with Tb latest-trunk(2009/3/21 build).
1. Copy vary big mail folder file(nealry 2GB) to Drafts of a dummy POP3 account.
2. Restart Tb, Click Drafts folder(=> rebuild index), delete a mail of smallest
   "Order Received" cplumn value(smallest offset in Drafts file).
3. Restart Tb, click the dummy POP3 account, compose a mail,
   without explicit open of Drafts folder.
4. "Save As Draft" at compose window
5. "Compact Folders" of file menu while the dummy POP3 account is selected.
6. During compaction is progress, "Save As Draft" at compose window
   => "Save error message" was issued.
   => Reply Retry/OK etc. to error message or dialog.
      (dialog of "Save in Sent or not" existed in such dialogs)
      => Draft mail was saved in "Sent" folder.

Your problem is same phenomenon as above?
Do you use auto-compact with mail.purge.ask=false?
If yes, can you reproduce problem with mail.purge.ask=true and "CANCEL" at confirmation dialog of auto-compact?
Concerning the v2.0a3 I have not installed it and I am not able to test it. 
Concerning WADA's question:
The compacting was done upon the SeaMonkey request after some cleanup in the folder. I am convinced, that the machine compacted all folders, I have about 10, the inbox is about 1GB.
I use POP3 folder, still a continuation of a Netscape folder.
Concerning the sequencing I am can not confirm, if I was in a state of writing an email and then compacting or not. I think that I was opened mail before minimized and when te compacting was in process, firstly the error appeared, but still after compacting done the error in the regular autosave intervals appeared.
The draft folder was empty 0kB size.

Concerning the autossaving as draft there was (I have not seen it some months too) and error, which appeared when the mail was in certain coding (UTF??), than the repeatedly Seamonkey wrote, that it can not save draft in this coding.
Annoying, but I  think this bug was resolved, because I have not seen it again quite long ago...

If you have any further questions, let me know.
I obtained same result as Comment #3 with Tb 2.0.0.21.
  While compaction of Drafts is in progress,
    "Save As Draft" or auto-save fails
    => Error message => Retry => draft is saved in "Sent"
    => Dialog of "save in Sent or not" => OK => 2nd draft is saved in "Sent".
  After compaction of Drafts completes,
    "Save As Draft" or auto-save works as expected,
    except phenomenon of Bug 482836 Comment #5 (ol draft is not deleted).
I still can't reproduce your "save error even after end of compaction".

(In reply to comment #4)
> but still after compacting done the error in the regular autosave intervals appeared.

AFAIR, if task for auto-compact abnormally terminates or is somehow killed internally, folder sometimes stays "compaction is in progress" like status. This will cause "other operation is in progress" issue upon operation such as re-build index, folder move etc. I guess it's cause of your "save error still after compacting done".

> The draft folder was empty 0kB size.

File size=0KB is for "Drafts" file? Or "Drafts.msf" file? Or both?
As I wrote Bug 482836 Comment #19, there are issues around outdated ".msf" file. It may be a cause of your problem.

By the way, you can test Seamonkey latest-trunk by Unzip only.
> http://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/latest-trunk/
> Download win32.zip build and Unzip it.
Note:
Don't forget to create new profile by starting seamonkey with "seamonkey.exe -P" upon first start of seamonky trunk.
Profile structure/directory position is changed, and if seamonkey trunk(Sm 2) is started with no option, migration of currently using profile will be automatically executed. It may produce problems in your daily use of current Seamonkey 1.1.15.
And. if you use POP3 account, don't forget to check "Leave Messages on Server" in account definition of new profile for Sm trunk.
(In reply to comment #4)
> but still after compacting done the error in the regular autosave intervals appeared.

(In addition to comment #5)
As written in Bug 274330 Comment #13, and as I wrote in Bug 274330 Comment #14, killed or failing task is other than "already started compact folder"(Bulk move, Move by filter, second "compact folder" etc.), if contention between "already started compact folder" and other operations(except contension with rebuild-index).

However, if rebuild-index is involved in contention between "compact folder", some problems seem to occur. (quick test with Tb 2.0.0.21 only) 
(Case-1) "Rebuild-Index" while "compact folder is in progress"
   "Rebuild-index" won't run. Message of "Other operation is in progres ..."
   is issued. "Already running compact folder" continues.
(Case-2) "compact folder" while "Rebuild-Index is running"
   No response to "Compact" folder. 
   When I repeated "Compact Folder", nstmp & nstmp.msf with size=0 was created.
   When I requested "Compact Folder" while nstmp & nstmp.msf with size=0 exists,
   nstmp-1 & nstmp-1.msf was created, message of "Other operation is in
   progress ..." was issued, and nstmp-1 & nstmp-1.msf was deleted after OK
   to the error message.
   Some exceptions were displayed in Error console while above operations.
   Finally, folder becomes available again, and nttmp & nstmp.msf was deleted.
   I don't know whether rebuild index normally executed or not.
   I don't know whether "compact" is executed after "rebuild index" or not.

Contention between "(internal) rebuild index due to outdated .msf" and "(auto) compact folder" is possibly involved in your case. I'll try to check with Seamonky and Tb latest-trunk.
Wada, duplicate?

(In reply to WADA from comment #6)
> (In reply to comment #4)
> > but still after compacting done the error in the regular autosave intervals appeared.
> 
> (In addition to comment #5)
> As written in Bug 274330 Comment #13, and as I wrote in Bug 274330 Comment
> #14, killed or failing task is other than "already started compact
> folder"(Bulk move, Move by filter, second "compact folder" etc.), if
> contention between "already started compact folder" and other
> operations(except contension with rebuild-index).
> 
> ...
> Contention between "(internal) rebuild index due to outdated .msf" and
> "(auto) compact folder" is possibly involved in your case. I'll try to check
> with Seamonky and Tb latest-trunk.
(In reply to Wayne Mery (:wsmwk) from comment #7)
> Wada, duplicate?

How can I know about it even though no additional informatio, no problem detail explanation, no data for problem analysis?
Please mentor on appropriate place, in as many *BUGs* in B.M.O as possible, please, please, please...
zetka, do you get an error message?
Flags: needinfo?(zetka)
No, I have not seen it again after a few upgrades of Sea Monkey.
Flags: needinfo?(zetka)
thanks zetka
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.