Open
Bug 243870
Opened 21 years ago
Updated 2 years ago
Suppress stderr output in release builds for components that cannot be loaded.
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
NEW
mozilla1.7final
People
(Reporter: darin.moz, Unassigned)
References
Details
(Keywords: fixed1.7, Whiteboard: fixed-aviary1.0)
Attachments
(2 files)
(deleted),
patch
|
cls
:
review+
shaver
:
superreview+
chofmann
:
approval1.7+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Biesinger
:
review+
dveditz
:
approval1.7.14-
dveditz
:
approval1.8.0.4-
|
Details | Diff | Splinter Review |
Suppress stderr output in release builds for components that cannot be loaded.
Given that there are now some optional components that depend on system
libraries that may or may not be present on the end-users machine that we should
disable the fprintf to stderr that exists in the native component loader. NSPR
logging should be sufficient to help debug problems in release builds.
http://lxr.mozilla.org/mozilla/source/xpcom/components/nsNativeComponentLoader.cpp#531
I think this error reporting just makes our release products look less professional.
Reporter | ||
Comment 1•21 years ago
|
||
See for example th first post to mozillazine.org regarding 1.7rc2:
http://mozillazine.org/talkback.html?article=4752#17
It's clear that folks easily misunderstand the significance of this error message.
erm, we intentionally kept it as standard out logging. why are end users looking
at a console to begin with?
Perhaps because our Linux tarballs don't install themselves into the menu, for
starters.
(With Darin on this.)
Reporter | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Flags: blocking1.7?
Target Milestone: --- → mozilla1.7final
Comment 4•21 years ago
|
||
I'm with Darin, too. Spewing on stdout/stderr makes no sense in a release build
and makes us look like we don't care about end users. If it's important enough
to bother the user, pop up a dialog.
Re "why are users looking at a console?": if we expect them not to be looking,
then what good is showing a message there?
Expert users can turn on logging if need be (though I wish we made it easier for
them, perhaps something like a --debug flag that turned on nspr logging, but
that's another issue.)
Reporter | ||
Comment 5•21 years ago
|
||
akk: yeah, i agree... a debug option like that would be great!
Updated•20 years ago
|
Flags: blocking1.7? → blocking1.7+
Comment 6•20 years ago
|
||
who can help here? time is getting short for 1.7.
Comment 7•20 years ago
|
||
We should just remove this printf for the branch.
It's logged if PR_LOGGING is on and this appears to be an "always compiled" log
item.
Comment 8•20 years ago
|
||
think seawood has helped clean up things like this in the past. if we are going
to do this for 1.7 we need it quickly and darin is out-of-town, then swamped
with a few other 1.7 blockers. need some help mas rapido..
Comment 9•20 years ago
|
||
Maybe I'm missing something ... is there something needed beyond the trivial
action of putting #ifdef DEBUG around the offending printf, now that we all
agree it should go?
There's already a PR_LOG right after it, so nothing should need to be added
there.
Here's a patch to do that.
Updated•20 years ago
|
Attachment #149422 -
Flags: superreview?(shaver)
Attachment #149422 -
Flags: review?(cls)
Comment on attachment 149422 [details] [diff] [review]
Put #ifdef DEBUG around the spew
sr=shaver.
Attachment #149422 -
Flags: superreview?(shaver) → superreview+
Updated•20 years ago
|
Assignee: darin → akkzilla
Status: ASSIGNED → NEW
Updated•20 years ago
|
Status: NEW → ASSIGNED
Comment 11•20 years ago
|
||
Comment on attachment 149422 [details] [diff] [review]
Put #ifdef DEBUG around the spew
r=cls
FWIW, a handful of those "don't print to console in opt builds" bugs are still
open, including the one for xpcom (bug 78667).
Attachment #149422 -
Flags: review?(cls) → review+
Comment 12•20 years ago
|
||
Comment on attachment 149422 [details] [diff] [review]
Put #ifdef DEBUG around the spew
a=chofmann for 1.7 -- thanks for the quick turn around
Attachment #149422 -
Flags: approval1.7+
Comment 13•20 years ago
|
||
Comment on attachment 149422 [details] [diff] [review]
Put #ifdef DEBUG around the spew
a=asa (on behalf of drivers) for checkin to 1.7
Updated•20 years ago
|
Whiteboard: approved patch ready to land
Updated•20 years ago
|
Whiteboard: approved patch ready to land → patch ready to land
Comment 14•20 years ago
|
||
Fix checked in to trunk and branch.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Reporter | ||
Comment 15•20 years ago
|
||
FORCE_PR_LOG is not defined anywhere in xpcom/components, so i suspect that the
PR_LOG statements are not enabled in release builds. that means that in release
builds there is maybe no way to determine that this error is occuring (well, on
linux you could check the /proc/<pid>/maps file)... perhaps we want to define
FORCE_PR_LOG in a MOZ_LOGGING section?
Updated•20 years ago
|
Whiteboard: fixed-aviary1.0
Comment 16•20 years ago
|
||
reopening to get comment 15 addressed
Status: RESOLVED → REOPENED
Flags: blocking1.8b?
Resolution: FIXED → ---
Updated•20 years ago
|
Flags: blocking1.8b? → blocking1.8b-
Comment 17•19 years ago
|
||
A FORCE_PR_LOG define was added in bug 316416. It needs to be wrapped with MOZ_LOGGING.
Attachment #218243 -
Flags: review?(cbiesinger)
Comment 18•19 years ago
|
||
cls, what does this last patch actually do? I'm confused.
Comment 19•19 years ago
|
||
If you only define FORCE_PR_LOG, then logging is enabled in all builds. The MOZ_LOGGING ifdef allows you to turn off NSPR logging support in builds by using --disable-logging (also used by the embedding profiles).
Updated•19 years ago
|
Attachment #218243 -
Flags: review?(cbiesinger) → review+
Comment 20•19 years ago
|
||
Comment on attachment 218243 [details] [diff] [review]
Use MOZ_LOGGING (checked in on trunk)
The FORCE_PR_LOG was only added on the trunk. Do we want the full ifdef on the 1.7 & 1.8 branches as well?
Attachment #218243 -
Attachment description: Use MOZ_LOGGING → Use MOZ_LOGGING (checked in on trunk)
Attachment #218243 -
Flags: approval1.8.0.3?
Attachment #218243 -
Flags: approval1.7.14?
Comment 21•19 years ago
|
||
that'd be really nice imo (what about MOZILLA_1_8_BRANCH?)
Comment 22•19 years ago
|
||
Comment on attachment 218243 [details] [diff] [review]
Use MOZ_LOGGING (checked in on trunk)
This patch wouldn't apply to the branch, which doesn't have the FORCE_PR_LOG in the first place. Need some sort of rationale for how this fits the build criteria for the stability/security branches before we could approve it.
Attachment #218243 -
Flags: approval1.8.0.3?
Attachment #218243 -
Flags: approval1.8.0.3-
Attachment #218243 -
Flags: approval1.7.14?
Attachment #218243 -
Flags: approval1.7.14-
Updated•18 years ago
|
Assignee: akkzilla → nobody
Status: REOPENED → NEW
QA Contact: xpcom
Comment 23•16 years ago
|
||
Can this be closed?
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•