+++ This bug was initially created as a clone of Bug #823819 +++ Deleting all messages from folder generates the following assertion: ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file e:/projs/smdb/mailnews/base/src/nsMsgDBView.cpp, line 1379 Click Abort to exit the Application. Click Retry to Debug the Application. Click Ignore to continue running the Application. Need to click the Ignore four times before it goes back to Mail & news.
As mentioned in the cloned from bug, gDBView.hdrForFirstSelectedMessage is 'funky' when I delete all the messages in the inbox. Tracing the calls when it gets to: mailnews/base/src/nsMsgDBView.cpp#7368: if (startRange < 0 || uint32_t(startRange) >= GetSize()) return NS_ERROR_UNEXPECTED; This is where it chokes and the assertion happens in line #1379. Debugging this, I find that startRange == GetSize() == 0. I'm wondering if this is actually a valid condition and that it shouldn't be asserting or failing? Karsten?
(In reply to Edmund Wong (:ewong) from comment #1) > Debugging this, I find that startRange == GetSize() == 0. > > I'm wondering if this is actually a valid condition and that > it shouldn't be asserting or failing? Oh, but it should. If GetSize() (aka m_keys.Length()) is 0, there is no header to get and hdrForFirstSelectedMessage shouldn't be called in the first place. Or the exception has to be handled, which may not be the case everywhere (yet).