"WARNING: NS_ENSURE_TRUE(strenum) failed: file .../toolkit/components/commandlines/src/nsCommandLine.cpp, line 630" during startup

VERIFIED FIXED

Status

VERIFIED FIXED
11 years ago
10 years ago

People

(Reporter: gkw, Unassigned)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

11 years ago
A clean Mac trunk Sunbird debug build outputs the following on startup:

WARNING: NS_ENSURE_TRUE(strenum) failed: file /Users/skywalker/Desktop/Mozilla/cvs/mozilla/toolkit/components/commandlines/src/nsCommandLine.cpp, line 603
With SeaMonkey on Linux too:
<http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1217484420.1217485284.24505.gz&fulltext=1>
{{
Linux nye Depend bloat on 2008/07/30 23:07:00

WARNING: NS_ENSURE_TRUE(strenum) failed: file /home/andrew/tbox/SeaMonkey-Debug/Linux_2.6.22.14-72.fc6_Depend/src/mozilla/toolkit/components/commandlines/src/nsCommandLine.cpp, line 630
}}

And on (SM) Windows too:
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008073018 SeaMonkey/2.0a1pre] (home made) (W2Ksp4)
Component: General → Cmd-line Features
OS: Mac OS X → All
Product: Calendar → Core
QA Contact: general → cmd-line
Summary: "WARNING: NS_ENSURE_TRUE(strenum) failed" during startup → "WARNING: NS_ENSURE_TRUE(strenum) failed: file .../toolkit/components/commandlines/src/nsCommandLine.cpp, line 630" during startup
Flags: wanted1.9.1?
Keywords: assertion
Depends on: 451501
We get this warning only when the category "command-line-validator" is empty. In this case, nsCategoryManager::EnumerateCategory returns the result of NS_NewEmptyEnumerator which is implemented by EmptyEnumeratorImpl. The C++ class EmptyEnumeratorImpl inherits from nsIUTF8StringEnumerator but doesn't implement QueryInterface for this interface, thus causing the warning. This is covered by bug 451501.
(Reporter)

Comment 3

10 years ago
(In reply to comment #2)
> We get this warning only when the category "command-line-validator" is empty.
> In this case, nsCategoryManager::EnumerateCategory returns the result of
> NS_NewEmptyEnumerator which is implemented by EmptyEnumeratorImpl. The C++
> class EmptyEnumeratorImpl inherits from nsIUTF8StringEnumerator but doesn't
> implement QueryInterface for this interface, thus causing the warning. This is
> covered by bug 451501.

Bug 451501 is fixed, so marking this fixed.
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Fwiw,

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1234009380.1234010085.6529.gz&fulltext=1
Linux nye Depend bloat on 2009/02/07 04:23:00

(Oldest log available:)
It seems this warning went away long before bug 451501 fix...


[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090409 Minefield/3.6a1pre] (home, debug+options) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/cb053a66c9ed)
+
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090409 SeaMonkey/2.0b1pre] (experimental/_m-c_, home, debug default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/cb053a66c9ed
 +http://hg.mozilla.org/comm-central/rev/b08051438f9f)

I can't reproduce with this changeset just before bug 451501 push.

Anyway, V.Fixed :-)
Status: RESOLVED → VERIFIED
Flags: wanted1.9.1?
Keywords: assertion
As I said in comment 2, this warning is reproducable only for applications that don't have any command-line-validator component registered. A quick search shows that Firefox, SeaMonkey and Thunderbird have some:
http://mxr.mozilla.org/comm-central/search?string=command-line-validator

I guess before the fix you could only reproduce in Sunbird (this bug blocks the Sunbird startup noise tracker) and Instantbird (the reason for which I fixed this).

Updated

10 years ago
Component: Cmd-line Features → Cmd-line Features
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.