ASSERT in nsMsgDBView::GetIndicesForSelection() when deleting messages
Categories
(Thunderbird :: Folder and Message Lists, defect)
Tracking
(Not tracked)
People
(Reporter: benc, Unassigned)
Details
(Keywords: assertion)
Steps to reproduce (on a debug build - not sure it shows in release):
- Select all messages in a local folder (CTRL+A)
- Press SHIFT+DELETE to delete without moving to trash
Expected behaviour:
Should all just quietly work.
Observed behavious:
On stdout there's an assertion:
[Parent 346859, Main Thread] ###!!! ASSERTION: selection count is wrong: 'indices.Length() == uint32_t(count)', file /home/ben/tb/mozilla/comm/mailnews/base/src/nsMsgDBView.cpp:2349
Stack traces and more analysis/speculation here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1833665#c24
It's down to a mis-sync with the various update notifications:
In nsMsgDBView, OnHdrDeleted()
calls RemoveByIndex()
, which removes the row from m_keys
and calls NoteChange()
, which calls InvalidateRange()
on the tree control(s). They in turn call nsMsgDBView::GetIndicesForSelection()
which asserts because the new selection contains one more element than the m_keys
array.
It's not serious, but it does hint at a slightly unclear order-of-operations. The treeview and nsMsgDB are out of sync, and there could be other more serious issues lurking there.
Comment 1•1 year ago
|
||
Ben, I'm not seeing the assert when deleting 14000 messages from a Local Folder (Trash) or from an imap Trash folder with 30K messages. This is with Geoff's patch here: https://bugzilla.mozilla.org/show_bug.cgi?id=1833665#c30
Description
•