(META) Exception: NS_ERROR_* not caught (from mozmill run of TB)

NEW
Assigned to

Status

Thunderbird
General
5 years ago
4 years ago

People

(Reporter: ISHIKAWA, Chiaki, Assigned: ISHIKAWA, Chiaki)

Tracking

(Depends on: 4 bugs, {meta})

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

5 years ago
le testing thunderbird (debug build of comm-central source, but the
error should be visible in normal build also) by running 
"make mozmill" locally, I noticed about 20 occurrences NS_ERROR_* thrown and
not caught.  

I think they are symptoms of bugs [or bad design (failure to consider
corner cases, etc.)]  The constructs / code paths that lead to these
warnings ought to be fixed.

The following is the output of 

grep NS_ERROR mozmill-log-TB-debug-build.txt | sort | uniq -c | sort -n -r

(I inserted a blank line for readability between each line)

The line marked with "*" at the beginning seems to be related to a
test script used by mozmill test harness.

      6 [Exception... "'TypeError: this.folderDisplay.treeSelection is null' when calling method: [nsIFolderListener::OnItemEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"	data: no]

      3 [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgMailNewsUrl.server]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: resource:///modules/activity/alertHook.js :: alertHook.onAlert :: line 48"  data: no]

*     3 [Exception... "'[JavaScript Error: "this._persistOpenMap[this.mode] is undefined" {file: "chrome://messenger/content/folderPane.js" line: 1808}]' when calling method: [nsIFolderListener::OnItemRemoved]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"	 location: "JS frame :: resource://mozmill/modules/frame.js -> file:///TB-NEW/TB-3HG/new-src/mail/test/mozmill/instrumentation/test-instrument-setup.js :: remove_account :: line 100"	data: yes]

*     1 [Exception... "'[JavaScript Error: "this._persistOpenMap[this.mode] is undefined" {file: "chrome://messenger/content/folderPane.js" line: 1808}]' when calling method: [nsIFolderListener::OnItemRemoved]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"	 location: "JS frame :: resource://mozmill/modules/frame.js -> file:///TB-NEW/TB-3HG/new-src/mail/test/mozmill/instrumentation/test-instrument-setup.js :: remove_account :: line 103"	data: yes]

      1 [Exception... "'[JavaScript Error: "document.getElementById(...) is null" {file: "chrome://messenger/content/chat/imStatusSelector.js" line: 36}]' when calling method: [nsIObserver::observe]"	 nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource:///modules/chatHandler.jsm :: ChatCore.init/<.onPromptStart :: line 74"  data: yes]

*     1 [Exception... "'[JavaScript Error: "_smtpServerAdded is not defined" {file: "resource:///modules/mailInstrumentation.js" line: 68}]' when calling method: [nsIObserver::observe]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"	location: "JS frame :: resource://mozmill/modules/frame.js -> file:///TB-NEW/TB-3HG/new-src/mail/test/mozmill/instrumentation/test-instrument-setup.js :: remove_account :: line 102"  data: yes]

      1 [Exception... "'JavaScript component does not have a method named: "alert"' when calling method: [nsIPromptService::alert]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "JS frame :: chrome://messenger/content/FilterEditor.js :: saveFilter :: line 364"	 data: no]

*     1 Failed to generate server response: [Exception... "Could not convert JavaScript argument arg 0 [nsIObserverService.notifyObservers]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: resource://mozmill/modules/frame.js -> file:///TB-NEW/TB-3HG/new-src/mail/test/mozmill/shared-modules/test-cloudfile-ubuntuone-helpers.js :: MU1S__noteAndReturnString/func :: line 287"  data: no]2013-01-04 07:59:34	UbuntuOne	INFO	Token transferred to Ubuntu One: ok 1/1

*     1 Failed to generate server response: [Exception... "Could not convert JavaScript argument arg 0 [nsIObserverService.notifyObservers]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: resource://mozmill/modules/frame.js -> file:///TB-NEW/TB-3HG/new-src/mail/test/mozmill/shared-modules/test-cloudfile-ubuntuone-helpers.js :: MU1S__noteAndReturnString/func :: line 287"  data: no]2013-01-04 07:59:32	UbuntuOne	INFO	Retrieved a new token from SSO

    The above two are actually the same problem (time stamp is different
    in the recorded interaction), and is already reported as
    https://bugzilla.mozilla.org/show_bug.cgi?id=824261
    Bug 824261 - Exception... "Could not convert JavaScript argument arg 0 [nsIObserverService.notifyObservers]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"

I am going to file a bugzilla entry for each of these (with session
log excerpt) so that the bug can be observed in context to lead a
better understanding of what is going on hopefully.

TIA

PS: Some of these could be returning the incorrect value a la 
Bug 675472	
Incorrect return of NS_ERROR_* codes in functions returning PRBool (in comm-central). [This turns up in search before filing this bug.]
But given the sophisticated meaningful code value, I highly doubt it.
(Assignee)

Updated

5 years ago
Depends on: 826968
(Assignee)

Updated

5 years ago
Depends on: 824261

Comment 1

5 years ago
Please CC me on the "chrome://messenger/content/FilterEditor.js :: saveFilter" bug once you file it, thanks.
(Assignee)

Updated

5 years ago
Depends on: 828587

Updated

5 years ago
Component: Untriaged → General
(Assignee)

Updated

5 years ago
Depends on: 824259
(Assignee)

Comment 2

5 years ago
In the follwoing is the latest status on the uncaught NS_ERROR_* found
during the run of "make mozmill" test of DEBUG BUILD of TB
(comm-central).

There are obviously a few test-related or account-creation related issues that
are performed during the test.

The comm-directory source was refreshed about a week ago.
[I am adding a few local patches:
/COMM-CENTRAL/comm-central
hg identify
6032b3f67d67+ NS_INVALID_POINTER-chase.patch/qtip/tip
pwd
/COMM-CENTRAL/comm-central/mozilla
hg identify
4a24b933ea44 check-nssb64e-uninitialized.patch/qbase/qtip/tip
]


Here is the list:

 ========================================
 NS_ERROR_
 ========================================

      3 [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgMailNewsUrl.server]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: resource:///modules/activity/alertHook.js :: alertHook.onAlert :: line 48"  data: no]

      3 [Exception... "'TypeError: this.folderDisplay.treeSelection is null' when calling method: [nsIFolderListener::OnItemEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"	data: no]

      1 [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgDBView.getMsgHdrsForSelection]"  nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)"	 location: "JS frame :: chrome://messenger/content/folderDisplay.js :: FolderDisplayWidget.prototype.selectedMessages :: line 1993"  data: no]

      1 [Exception... "'[JavaScript Error: "document.getElementById(...) is null" {file: "chrome://messenger/content/chat/imStatusSelector.js" line: 36}]' when calling method: [nsIObserver::observe]"	 nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource:///modules/chatHandler.jsm :: ChatCore.init/<.onPromptStart :: line 74"  data: yes]
      1 [Exception... "'JavaScript component does not have a method named: "alert"' when calling method: [nsIPromptService::alert]"  nsresult: "0x80570030 (NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED)"  location: "JS frame :: chrome://messenger/content/FilterEditor.js :: saveFilter :: line 370"	 data: no]

      1 Failed to generate server response: [Exception... "Could not convert JavaScript argument arg 0 [nsIObserverService.notifyObservers]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: resource://mozmill/modules/frame.js -> file:///COMM-CENTRAL/comm-central/mail/test/mozmill/shared-modules/test-cloudfile-ubuntuone-helpers.js :: MU1S__noteAndReturnString/func :: line 287"	 data: no]2013-03-29 11:08:39	UbuntuOne	INFO	Token transferred to Ubuntu One: ok 1/1

      1 Failed to generate server response: [Exception... "Could not convert JavaScript argument arg 0 [nsIObserverService.notifyObservers]"  nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)"  location: "JS frame :: resource://mozmill/modules/frame.js -> file:///COMM-CENTRAL/comm-central/mail/test/mozmill/shared-modules/test-cloudfile-ubuntuone-helpers.js :: MU1S__noteAndReturnString/func :: line 287"	 data: no]2013-03-29 11:08:39	UbuntuOne	INFO	Retrieved a new token from SSO

      1 2013-03-29 11:06:35	mail.wizard	INFO	fetchConfigFromDisk failed: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIChannel.open]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: chrome://messenger/content/accountcreation/util.js :: readURLasUTF8 :: line 80"  data: no]

      1 2013-03-29 11:06:25	mail.wizard	INFO	fetchConfigFromDisk failed: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIChannel.open]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: chrome://messenger/content/accountcreation/util.js :: readURLasUTF8 :: line 80"  data: no]

      1 2013-03-29 11:06:07	mail.wizard	INFO	fetchConfigFromDisk failed: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIChannel.open]"  nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame :: chrome://messenger/content/accountcreation/util.js :: readURLasUTF8 :: line 80"  data: no]

---

I have updated the following bugzilla entry since I now realize
this is aart of this whole set of unhandled NS_ERROR_* codes:

Bug 824259 - [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIMsgDBView.getMsgHdrsForSelection]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: chrome://messenger/content/folderDisplay.js :: FolderDi 

(In reply to :aceman from comment #1)
> Please CC me on the "chrome://messenger/content/FilterEditor.js ::
> saveFilter" bug once you file it, thanks.

Sorry, I don't think I have the time to cover that yet :-(

TIA

Comment 3

5 years ago
(In reply to ISHIKAWA, Chiaki from comment #2)
> (In reply to :aceman from comment #1)
> > Please CC me on the "chrome://messenger/content/FilterEditor.js ::
> > saveFilter" bug once you file it, thanks.
> 
> Sorry, I don't think I have the time to cover that yet :-(
> 
> TIA

Covered by bug 828587.
(Assignee)

Comment 4

5 years ago
Thunderbird today is a community supported software.  However, I am afraid
that it faces a bit-rot fate unless more programmers work on fixing
the existing errors on it.

A case in point: I feel not enough people are looking at errors and
warnings produced during thunderbird's test suite execution.

So I am reporting a few serious errors that are found in the test
suite log and have been fixed and are being investigated.
This is an update.
Thanks to earlier efforts, some bugs in the previous comments are gone.
But I think I see new ones.


The report is based on a log collected on September 12th

In the following are the list of NS_ERROR_* errors thrown to the
top-level without getting caught during the execution of 
|make mozmill| test suite run of DEBUG BUILD of thunderbird (comm-central).
(Some of them are already fixed in the  source today [Sept 14th]. Good.)

Please don't think that all such NS_ERROR_* errors are captured here
in this report.

There seem to be thread-race problems in the thunderbird executionn.
So depending on the timing differences, we may see or not see such
warnings and errors.  (Also, some random crashes that seem to be
caused by such thread-race issues will keep some tests from running
during a particular |make mozmill| session. In that case, the warnings
and errors which would have been printed from such tests are not
colleteced during the session.)

VERSION of the source trees used for this report. 
version of the local source trees
/REF-COMM-CENTRAL/comm-central
hg identify
d16983e54d0b card-is-null-fix.patch/qtip/tip
--
/REF-COMM-CENTRAL/comm-central/mozilla
hg identify
26d65801e13b prtime-bzero.patch/qtip/tip

The list of Exceptions:

Listed in the decreasing order of frequencies by

    grep "NS_ERROR_" $1 | sort | uniq -c | sort -n -r

where $1 is the file of session log of |make mozmill|.

 ========================================
 NS_ERROR_
 ========================================

     29 [Exception... "'[JavaScript Error: "nBox.getNotificationWithValue is not a function" {file: "chrome://messenger/content/messengercompose/MsgComposeCommands.js" line: 1822}]' when calling method: [nsITimerCallback::notify]"	nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: yes]

	The above is now discussed in Bug 912151

     13 [Exception... "'[JavaScript Error: "gMsgCompose is null" {file: "chrome://messenger/content/messengercompose/cloudAttachmentLinkManager.js" line: 32}]' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"	data: yes]

	The above has been fixed in Bug 915516 already.

      5 [Exception... "'[JavaScript Error: "this._settings.contentDocument.body is undefined" {file: "chrome://messenger/content/cloudfile/addAccountDialog.js" line: 118}]' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: yes]

      The above is addressed in Bug 916358 	
 
      4 [Exception... "'[JavaScript Error: "this.view.displayedFolder is null" {file: "chrome://messenger/content/folderDisplay.js" line: 1072}]' when calling method: [nsIMsgSearchNotify::onSearchDone]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"	 location: "JS frame :: resource:///modules/searchSpec.js :: SearchSpec_dissociateView :: line 141"  data: yes]

        Bug 912172 : A patch is being prepared.
	Sorry I posted a wrong patch initially there. The patch was meant
	for fixing the bug 916358. So beware. The following comment
	is incorrect entry.
	https://bugzilla.mozilla.org/show_bug.cgi?id=912172#c1

      3 [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIInlineSpellChecker.ignoreWords]"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: chrome://messenger/content/messengercompose/MsgComposeCommands.js :: observe :: line 2842"  data: no]

        The above is discussed in Bug 916193 : 	A patch is being prepared.

      3 [Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIMsgMailNewsUrl.server]"  nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)"  location: "JS frame :: resource:///modules/activity/alertHook.js :: alertHook.onAlert :: line 48"  data: no]

      ??? I have not figured out this yet. It seems |alert| callback
	is not defined or something ??? 
	UNEXPECTED ERROR, indeed.

      2 [Exception... "'[JavaScript Error: "gMsgCompose is null" {file: "chrome://messenger/content/messengercompose/cloudAttachmentLinkManager.js" line: 32}]' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://messenger/content/messengercompose/MsgComposeCommands.js :: <TOP_LEVEL> :: line 234"  data: yes]

	The above has been fixed in Bug 915516 already.

      1 [Exception... "'[JavaScript Error: "this.folderDisplay.view.dbView is null" {file: "chrome://messenger/content/messageWindow.js" line: 252}]' when calling method: [nsIMsgDBViewCommandUpdater::summarizeSelection]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource:///modules/dbViewWrapper.js :: DBViewWrapper__createView :: line 1047"  data: yes]

      ??? Not sure what the above is. To be investigated in the future.

      1 [Exception... "'[JavaScript Error: "gMsgCompose is null" {file: "chrome://messenger/content/messengercompose/MsgComposeCommands.js" line: 3146}]' when calling method: [nsIObserver::observe]"	nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: canQuitApplication :: line 42"	data: yes]

	The above has been fixed in Bug 915516 already.

      1 [Exception... "'[JavaScript Error: "document.getElementById(...) is null" {file: "chrome://messenger/content/chat/imStatusSelector.js" line: 36}]' when calling method: [nsIObserver::observe]"	 nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource:///modules/chatHandler.jsm :: ChatCore.init/<.onPromptStart :: line 74"  data: yes]

	The above one needs investigation.

I intend to periodically post a follow-up here, especially for the
hither-to untouched NS_ERROR_* errors.

TIA
(Assignee)

Updated

5 years ago
Depends on: 912151, 915516, 916358, 912172, 916193
(Assignee)

Updated

5 years ago
Assignee: nobody → ishikawa
Summary: Exception: NS_ERROR_* not caught (from mozmill run of TB) → (META) Exception: NS_ERROR_* not caught (from mozmill run of TB)

Updated

4 years ago
Keywords: meta
You need to log in before you can comment on or make changes to this bug.