Closed Bug 1758743 Opened 4 years ago Closed 2 months ago

Constant debug output: WARNING: NS_ENSURE_TRUE(doc) failed: file c:/mozilla-source/mozilla-central/comm/mailnews/base/src/nsMsgWindow.cpp:80

Categories

(MailNews Core :: General, defect)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: rachel, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Just run a debug build and you get a flood of
WARNING: NS_ENSURE_TRUE(doc) failed: file c:/mozilla-source/mozilla-central/comm/mailnews/base/src/nsMsgWindow.cpp:80

Actual results:

Looking at the call sites of nsMsgWindow::GetMessageWindowDocShell() getting this error appears to signify that something has gone badly wrong since that docshell is used for a variety of things.

Assignee: nobody → benc
Status: UNCONFIRMED → NEW
Ever confirmed: true

I have seen them in my local mochitest log, but the number of such error lines were not that great and so I put them on back burner.

I got curious and ran the following against the log files of local mochitest and xpcshell tests.
My log files are serially named.

for f in /FF-NEW/log*.txt; do n=$(fgrep "NS_ENSURE_TRUE(doc) failed" $f | wc -l); if [ $n != 0 ]; then   echo "$n: $f" ; fi; done
4: /FF-NEW/log1292-mochitest.txt   <---- Jan 26, 2021
4: /FF-NEW/log1293-mochitest-san.txt
8: /FF-NEW/log1296-mochitest-asan.txt
4: /FF-NEW/log1297-mochitest.txt
4: /FF-NEW/log12970-mochitest.txt
...

log1292-mochitest.txt is dated Jan 26, 2021 (LAST YEAR).
But there were only four of them, and since there were many other errors, I simply put them at the back of my mind.

If the errors are now reported in droves during debug version run, something is very wrong.
Or maybe the mochitest environment does not re-create and test everyday usage situation very well.
The latter may be the case since the local mochitest Iran today only produced TWO (2) such warnings. :-(

That said, if THIS error/warning is problematic, actually there have been other errors that have bothered me quite a lot along with this one. I give one such example below.

The reported warning/error is NOT numerous during mochitest.
(Sorry, I rarely run debug verison of TB for windows on my PC).

I have been bothered with the following warnings in the mochitest log for quite a while, but never had the time to figure it out. Note the sheer number of warnings in the summary below. (The number printed at the beginning of line. Also the fluctuation (asan version test).
Maybe timing issue?
(Oops, I thought I finished this bugzilla comment and upload it, but no, it remained dormant for a few days. I had written this far. I have added the following and uploading it.)

I think TB probably is using browser-based display subsystem and yet it does not quite handle the initial setup correctly (?)

 0:03.79 GECKO(57164) [Parent 57164, Main Thread] WARNING: NS_ENSURE_TRUE(rootFrame) failed: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/base/nsGlobalWindowOuter.cpp:4161

From my local log files: The first one appeared in Ocotber 2020 timeframe.

for f in /FF-NEW/log*.txt; do n=$(fgrep "NS_ENSURE_TRUE(rootFrame) failed" $f | wc -l); if [ $n != 0 ]; then   echo "$n: $f" ; fi; done

1570: /FF-NEW/log1241-mochitest.txt <-  Oct 18, 2020
1577: /FF-NEW/log1242-mochitest.txt
1567: /FF-NEW/log1244-mochitest.txt
1576: /FF-NEW/log1253-mochitest.txt
1548: /FF-NEW/log1256-mochitest.txt
20: /FF-NEW/log1257-xpcshell.txt
1617: /FF-NEW/log1260-mochitest.txt
13: /FF-NEW/log1271-asan-test.txt
13: /FF-NEW/log1272-asan-test.txt
26: /FF-NEW/log1275-xpcshell-asan.txt
26: /FF-NEW/log1281-xpcshell-asan.txt
26: /FF-NEW/log1282-xpcshell-asan.txt

    ... omission

1806: /FF-NEW/log1387-mochitest.txt
1938: /FF-NEW/log1388-mochitest.txt
1936: /FF-NEW/log1389-mochitest.txt

The warnings persist to this day.

Attached file logging.txt

Thanks for checking the log files. On a new profile the error only shows once, however, on a pre-existing profile we see it a lot. This profile has a feeds account.

(In reply to Rachel Martin from comment #2)

Created attachment 9267607 [details]
logging.txt

Thanks for checking the log files. On a new profile the error only shows once, however, on a pre-existing profile we see it a lot. This profile has a feeds account.

The uploaded log has a few interesting lines preceding the mentioned warnings.

JavaScript error: chrome://calendar/content/calendar-multiday-view.js, line 1503: TypeError: can't access property "occurrence", wrapper.firstChild is null
JavaScript error: chrome://calendar/content/calendar-multiday-view.js, line 1532: TypeError: can't access property "remove", current.parentNode is null
[Parent 9788, Main Thread] WARNING: NS_ENSURE_TRUE(doc) failed: file c:/mozilla-source/mozilla-central/comm/mailnews/base/src/nsMsgWindow.cpp:80
...

I don't use calendar often but there seem to be a calendar issue preceding the flood of messages. But I am not sure if there is a cause and effect relation.

Assignee: benc → nobody

This code was removed.

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: