Open Bug 1158471 Opened 9 years ago Updated 5 years ago

ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265

Categories

(MailNews Core :: Backend, defect)

x86_64
All
defect
Not set
major

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: mmokrejs, Assigned: ishikawa)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 Build ID: 20150425013755 Actual results: ++DOMWINDOW == 120 (0x7f2c39b47600) [pid = 18632] [serial = 278] [outer = 0x7f2c5b023780] [18632] WARNING: Failed to retarget HTML data delivery to the parser thread.: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/parser/html/nsHtml5StreamParser.cpp, line 952 [18632] WARNING: GetDefaultCharsetForLocale: need to add multi locale support: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/intl/locale/unix/nsUNIXCharset.cpp, line 101 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: We should have hit the document element...: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/layout/xul/BoxObject.cpp, line 183 JavaScript error: chrome://navigator/content/tabbrowser.xml, line 331: TypeError: browsers[i] is undefined GetDiskSpaceAvailable returned: 1149019549696 bytes ^G[18632] ###!!! ASSERTION: POP: authMethod pref invalid: 'false', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/local/src/nsPop3Protocol.cpp, line 1607 Begin mail message delivery. Abort mail message delivery. ++DOMWINDOW == 121 (0x7f2c365d2600) [pid = 18632] [serial = 279] [outer = 0x7f2c5b023780] [18632] WARNING: Failed to retarget HTML data delivery to the parser thread.: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/parser/html/nsHtml5StreamParser.cpp, line 952 [18632] WARNING: GetDefaultCharsetForLocale: need to add multi locale support: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/intl/locale/unix/nsUNIXCharset.cpp, line 101 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 [18632] WARNING: NS_ENSURE_TRUE(isFileURI) failed: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/dom/base/ThirdPartyUtil.cpp, line 366 JavaScript error: chrome://navigator/content/tabbrowser.xml, line 331: TypeError: browsers[i] is undefined --DOMWINDOW == 120 (0x7f2c356ba980) [pid = 18632] [serial = 277] [outer = (nil)] [url = mailbox:///home/mmokrejs/.mozilla/seamonkey/mjpwg8sv.default/Mail/127.0.0.1/Inbox?number=399004927] --DOMWINDOW == 119 (0x7f2c39b47600) [pid = 18632] [serial = 278] [outer = (nil)] [url = mailbox:///home/mmokrejs/.mozilla/seamonkey/mjpwg8sv.default/Mail/127.0.0.1/Inbox?number=399015428] GetDiskSpaceAvailable returned: 1149019516928 bytes ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ^G[18632] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1265 ++DOMWINDOW == 120 (0x7f2c356ba980) [pid = 18632] [serial = 280] [outer = 0x7f2c5b023780] [18632] WARNING: Failed to retarget HTML data delivery to the parser thread.: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/parser/html/nsHtml5StreamParser.cpp, line 952 [18632] WARNING: GetDefaultCharsetForLocale: need to add multi locale support: file /var/tmp/portage/www-client/seamonkey-2.33.1/work/comm-release/mozilla/intl/locale/unix/nsUNIXCharset.cpp, line 101 JavaScript error: chrome://navigator/content/tabbrowser.xml, line 331: TypeError: browsers[i] is undefined
Component: General → Backend
OS: Unspecified → Linux
Product: SeaMonkey → MailNews Core
Hardware: Unspecified → x86_64
Version: SeaMonkey 2.33 Branch → 36
Still happens: ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /var/tmp/portage/www-client/seamonkey-2.38/work/comm-release/mailnews/base/src/nsMsgDBView.cpp, line 1277
I see it in C-C TB local build, too. After running |make mozmill| test suite against the local DEBUG BUILD of TB (under 64-bit linux), I count 39 such assertions. 39 [4070] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /NREF-COMM-CENTRAL/comm-central/mailnews/base/src/nsMsgDBView.cpp, line 1278 After inserting a few dumps of values of selection.Length() and count, I found that many of cases are count==0 while selection.Length() is a small positive number, but there are 7 vs 5, etc. The following is the value pairs that triggered the assertion. (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 7 != count =5 (debug): selection.Length() = 7 != count =5 (debug): selection.Length() = 6 != count =5 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 6 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 4 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 6 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 4 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 6 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 4 != count =2 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0
Status: UNCONFIRMED → NEW
Ever confirmed: true
After other fatal errors are fixed (including Bug 1224840 - mozmill run: Assertion failure: IsOuterWindow(), at /builds/slave/tb-c-cen-lx-d-0000000000000000/build/mozilla/dom/base/nsGlobalWindow.cpp:7678 ), this bug was triggered in new places, and I got today 45 assertions. (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 7 != count =5 (debug): selection.Length() = 7 != count =5 (debug): selection.Length() = 6 != count =5 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 6 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 4 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 6 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 4 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 7 != count =2 (debug): selection.Length() = 6 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 5 != count =2 (debug): selection.Length() = 4 != count =2 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0 (debug): selection.Length() = 1 != count =0
I raised the severity as major. Assertion being triggered should not be taken lightly and this assertion is relatively new (either underlying cause has appeared late or the assertion was put in late and points to the problem we had not known before.) TIA
Severity: normal → major
I still see it: [27536] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /scratch/var/tmp/portage/www-client/seamonkey-2.42.3.0_p0/work/thunderbird-45.3.0/mailnews/base/src/nsMsgDBView.cpp, line 1278
After seeing a local error dump related to this message over the past several months now and then, I realized the following.now observe that - selection count is misused a little bit. It stands for different numbers in different places. In some places, it seems it stands (?) for the selected lines as in selection of message headers in the header pane. If you select, say, 30 headers, then this should be 30. However, in some places, this number seems to be used for the lines that are currently *visible* in, say, header pane and selected. So even if we may have selected 30 header lines as a whole, suppose the header pane shows only 10 headers, only 10 selected lines can be shown at maximum, and if we scroll the headers, fewer selected lines are visible depending on the position of selected lines and where we look at the headers through the header pane. No wonder assertion failures occur (!) Just an observation. Not sure how to go about fixing it at this stage. TIA
If anyone cares, this is the local patch that prints out various values when the mismatch occurs.
(In reply to ISHIKAWA, Chiaki from comment #7) > Created attachment 8797121 [details] [diff] [review] > a patch to dump count values when mismatch occurs. > > If anyone cares, this is the local patch that prints out various values when > the mismatch occurs. The above patch no longer applies clean since a line a couple of lines before the changed part is modified in C-C TB tree now.
[7004] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /scratch/var/tmp/portage/www-client/seamonkey-2.46/work/seamonkey-2.46/mailnews/base/src/nsMsgDBView.cpp, line 1278 User agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 Build identifier: 20170109050756
[7260] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /scratch/var/tmp/portage/www-client/seamonkey-2.48_beta1/work/seamonkey-2.48b1/mailnews/base/src/nsMsgDBView.cpp, line 1279
[6920] ###!!! ASSERTION: selection count is wrong: 'selection.Length() == uint32_t(count)', file /scratch/var/tmp/portage/www-client/seamonkey-2.49.2.0_p0/work/thunderbird-52.2.0/mailnews/base/src/nsMsgDBView.cpp, line 1287

Bug 1562158 removed the use of [array] in the code.
So we may see a different behavior here. I am looking out.
I have a local patch to dump relevant numbers when this assert hits.
(Yet to run the test locally... I have a few issues of mixed up Cargo setup.)

+#ifdef DEBUG

  •  // LHS is unsigned long long under MSVC.
    
  •  // OTOH, it is long unsigned int under linux.
    
  •  // Strict format checking barfs if we use %lu under Windows.
    
  •  // Using %llu causes the compiler to barf under linux and presumably OSX.
    
  •  unsigned long tmp = indices.Length(); 
    
  •  fprintf(stderr, "(debug): Is selection count wrong? indices.Length() = %lu != count =%u\n",
    
  •          tmp, uint32_t(count));
    

+#endif

You can do
fprintf("... %" PRIi32, count)

count seems to be int32_t so the right argument type is PRIi32, which should work on all platforms. We do that in many format strings in the code.
There are constants for all the other types too like PRIu64 etc.

(In reply to :aceman from comment #13)

You can do fprintf("... %" PRIi32, count)

Assignee: nobody → ishikawa
Status: NEW → ASSIGNED
Flags: needinfo?(ishikawa)
OS: Linux → All

(In reply to Wayne Mery (:wsmwk) from comment #14)

(In reply to :aceman from comment #13)

You can do fprintf("... %" PRIi32, count)

I have modified the source code, but have had local test issues... Once it is cleared, I will upload a renewed patch.

Flags: needinfo?(ishikawa)

An updated patch.

TryServer job.
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=9dc8b92d074cab5fbc7524ecf28311557d8cda92

You can see the dump in
linux x64 debug in the live logs of
bct3, bct4, and bct5.

Attachment #8797121 - Attachment is obsolete: true
Attachment #9127051 - Attachment is patch: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: