Closed Bug 556749 Opened 14 years ago Closed 8 years ago

deleting multiple mails at a time in unified folder fails to delete some selected messages

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: ebaynegs, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

when i select a lot of mails in the message list pane and right click then select delete, often times, only a handful of the messages i have selected actually get deleted.

i have a feeling it might be due to a "for loop that keeps checking the length of the list of selected messages" or something similar, as i have come across bugs like this before

eg for(i=0;i<messagelist.length;i++)
     delete message[i]

every time a message is deleted in the loop the length of messagelist changes, i think this can cause an exception that will stop the loops execution.

the order that the mails are listed in seems to have an effect too, if i list the selected mails in reverse date order, and then attempt to delete them, it seems to work fine.

Reproducible: Always
Is this an IMAP account (i.e., the messages are accessed directly on the server rather than downloaded to your local folders), and if yes, is synchronization switched on? Check in Tools > Account Settings > /account/ > Synchronization & Storage. Also, is there any pattern, e.g., messages with attachments are less likely to be deleted than those without, etc.?
I've just seen this with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 and an IMAP account set to
"Mark deleted messages only". I've first marked to messages and clicked on delete (multi-message view), they were marked deleted as intended. Then, I've selected a single message and deleted it (no attachments). All three messages were marked deleted now. Compacting the folder however only removed the two ones marked first though, and I had to compact a second time to also get rid
of the third message. Nothing in the Error Console.
ive only seen it occur in local mail folders, but i would assume it would happen in imap folders too
though saying that, i just tried it again and couldnt reproduce the bug this time, hmmm, strange
I have Thunderbird configured to move all messages with the tag [SPAM] to trash. When I go to Trash folder in smart view, when I press Ctrl+A all messages are selected but after that if I press the delete key, only a part of them are deleted. I believe only the ones visible on the screen are deleted.
Either way, only a part of them get deleted.
Please supply imap:5 protocol log
 https://wiki.mozilla.org/MailNews:Logging

I wouldn't expect anything in error console.
Component: Folder and Message Lists → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: folders-message-lists → networking.imap
You should distinguish between this happening in smart folders and normal folders, since smart folders are significantly different in how they handle multiple deletes when the messages are in different real folders.
Dan, do I remember correct that you had seen something like this?

Marius, imap account? or pop?
Wayne, I'm not 100% sure but I believe the accounts are POP3 with SSL/TLS and authentification set, on port 995

I see this when on "Unified Folders" view. 

Clicking Trash, I press Ctrl+A, all emails are selected and in the preview window it says "7206 conversations".
Press Delete, hourglass cursor appears, disk churns for about 5 seconds and then emails are still visible in Trash and just the top first email is selected.
If I press Ctrl+A again, it says "3232 conversations", so only 3974 emails were deleted...
Repeating the process, I'm now left with 1339 conversations. Repeat the process again, down to "1294 conversations" and to continue until all are gone:
322
79
3
2
0

Looking at the error console, I see this repeated lots of times but I'm not sure if it's related to this process of deleting the emails in Trash:

Security Error: Content at mailbox:///C|/Documents%20and%20Settings/Administrator/Application%20Data/Thunderbird/Profiles/swiel3tm.default/Mail/contact@xxxxxx.net/Inbox?number=68491884 may not load or link to about:blank.

But a few items above, I also get this which it looks like it's related to the same email:

Warning: Unknown property 'scrollbar-track-color'.  Declaration dropped.
Source File: mailbox:///C|/Documents%20and%20Settings/Administrator/Application%20Data/Thunderbird/Profiles/swiel3tm.default/Mail/contact@xxxxxx.net/Inbox?number=68491884
Line: 0

Warning: Unknown property 'scrollbar-darkshadow-color'.  Declaration dropped.
Source File: mailbox:///C|/Documents%20and%20Settings/Administrator/Application%20Data/Thunderbird/Profiles/swiel3tm.default/Mail/contact@xxxxxx.net/Inbox?number=68491884
Line: 24
I have the same problem as Marius Hudea where deleting all the messages from the unified trash fails to delete all the messages.

I do Not have the problem when I delete messages from the unified inbox.

Using Latest release of TB.
Do you all still see this when using version 10?  Or 11, which is just out?
Summary: deleting multiple mails at a time fails to delete all the messages you have selected → deleting multiple mails at a time in unified folder fails to delete all the selected messages
Yes, just applied the latest update.

Went to Trash. 459 mails, select all, delete => 360 mails left.
360 => 184
184 => 83
 83 => 22
 22 => 16
 16 => 1
  1 => 0

In case it helps, the trash email is from 11 separate mail accounts but all on the same email server. One of them is a very low traffic postmaster@domain, so that receives and shows email directed to mailboxes that don't exist on the mail server.
(In reply to Marius Hudea from comment #12)
> Yes, just applied the latest update.
> 
> Went to Trash. 459 mails, select all, delete => 360 mails left.
> 360 => 184
> 184 => 83
>  83 => 22
>  22 => 16
>  16 => 1
>   1 => 0
> 
> In case it helps, the trash email is from 11 separate mail accounts but all
> on the same email server. One of them is a very low traffic
> postmaster@domain, so that receives and shows email directed to mailboxes
> that don't exist on the mail server.

was this in unified folder?
or global inbox?
Flags: needinfo?(mariusads)
v 17.0.2

view > folders > unified

click trash
click on random deleted email 
press ctrl + a 
press del
repeat last two steps

still happens.
Flags: needinfo?(mariusads)
v 24.5.0

I just deleted 2 very large subfolders from an imap account.

Click a message in subfolder
press ctrl + a
Press delete button
<Thunderbird hangs for a very long time>

Single message is left behind in both cases
I'm on OS X, BTW
(In reply to bfg from comment #17)
> v 24.5.0
> 
> I just deleted 2 very large subfolders from an imap account.

bfg, deleting subfodlers is a differnet issue. If you still see a problem, please file a new bug report
Just to be clear, the original bug report is not about deleting all messages in a folder, it is a selection for which *some* of those do not get deleted.  (In otherwords, not Ctrl+A)

That said, does anyone still see this problem using a current version.  *Please speak up*.
Please specify type of folder, and quantity of messages.
Thanks
Flags: needinfo?(rsx11m.pub)
Flags: needinfo?(mariusads)
Flags: needinfo?(ebaynegs)
Summary: deleting multiple mails at a time in unified folder fails to delete all the selected messages → deleting multiple mails at a time in unified folder fails to delete some selected messages
I can't be sure if the bug is fixed, because my installation of Thunderbird suffers from another bug.

If I go into individual mail boxes in the Trash folder and hit Ctrl+A , then Delete, I get the popup asking to confirm I want to delete all mails and after clicking OK, all mails are deleted. 

However, I think the bug was about hitting Delete on the "Trash" folder where you get all the emails from various accounts mixed up. 

As it stands now, if I click on the Trash section, nothing happens, The Trash entry is highlighted but the list of emails is the same view as before hitting Trash. Moving mouse over entries causes the entry to basically disappear from screen. Hitting Ctrl+A or Delete doesn't do anything.
When clicking Trash, the following error shows up in Error Console : 

TypeError: this._sort[aIndex] is undefined  resource://gre/modules/dbViewWrapper.js  Line 1570

Example of this behavior (400 KB gif) : http://savedonthe.net/image/2497/example_bug_thunderbird.gif
I haven't seen this in a while, but then, usually walk through the message list and delete messages one by one (in which case it doesn't happen, but that would still be in agreement with the theory). Using Ctrl+Click do mark multiple messages, it may have been a month or two ago that I've last got the impression that not all messages selected were actually deleted, but that's hard to verify after the fact if it wasn't user error by accidentally unmarking or skipping a message intended to be deleted.

(In reply to Marius Hudea from comment #21)
> As it stands now, if I click on the Trash section, nothing happens, The
> Trash entry is highlighted but the list of emails is the same view as before
> hitting Trash. Moving mouse over entries causes the entry to basically
> disappear from screen. Hitting Ctrl+A or Delete doesn't do anything.

That may be a different bug and better handled in a separate bug report.
Flags: needinfo?(rsx11m.pub)
Whiteboard: [closeme 2016-05-15]
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(mariusads)
Flags: needinfo?(ebaynegs)
Resolution: --- → INCOMPLETE
Whiteboard: [closeme 2016-05-15]
You need to log in before you can comment on or make changes to this bug.