Closed Bug 426968 Opened 16 years ago Closed 15 years ago

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

Categories

(Core Graveyard :: Cmd-line Features, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: gkw, Unassigned)

References

Details

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.
(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
Closed: 15 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).
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.