Closed
Bug 1004271
Opened 10 years ago
Closed 10 years ago
MOZ_ASSERT and MOZ_CRASH messages do not show up in stdout/stderr on b2g-emulator
Categories
(Core :: MFBT, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: botond, Assigned: botond)
Details
Attachments
(1 file)
1.36 KB,
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
Recently I spent a long time debugging a problem that was caught by MOZ_ASSERT, by not realizing that a MOZ_ASSERT was happening, because MOZ_ASSERT does not send any output to stdout/stderr on b2g-emulator. MOZ_ASSERT and MOZ_CRASH currently send output only to logcat on Android/B2G platforms. After talking to Ehsan, I propose that they also send output to 'stderr', for the benefit of things like b2g-emulator.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8415641 -
Flags: review?(ehsan)
Comment 2•10 years ago
|
||
afaik, android (and thus, i guess, gonk), have a flag somewhere to send logcat to stdout/stderr.
Comment 3•10 years ago
|
||
or maybe i'm mixing things up with the feature to do it the other way around.
Comment 4•10 years ago
|
||
I think the flag is to send stdout/stderr to logcat. That being said, you can (and probably should) be using logcat for inspecting output on the emulator, because printf_stderr, which we use for almost all output, is routed to logcat.
Comment 5•10 years ago
|
||
Indeed, MOZ_ASSERT and MOZ_CRASH would only address the tip of the iceberg.
Comment 6•10 years ago
|
||
Comment on attachment 8415641 [details] [diff] [review] bug1004271.patch Review of attachment 8415641 [details] [diff] [review]: ----------------------------------------------------------------- This might be the tip of the iceberg, but the perfect should not be the enemy of the good.
Attachment #8415641 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 7•10 years ago
|
||
After thinking about this some more, I think patch would actually be harmful because it enhances the illusion that stdout/stderr on b2g-emulator gives you a complete pictures without making it so. If anything, we should print a big warning to b2g-emulator's stdout saying "LOOK AT LOGCAT INSTEAD". Unless there are strenuous objections, I am inclined to close this as WONTFIX.
Comment 8•10 years ago
|
||
I disagree that the patch enhances any illusions. The point here is to streamline the process for all developers and not punish them because they end up looking at the wrong place. That being said, I don't have any horses in this race, and even though I think not landing this patch is a mistake, I won't stop you from WONTFIXing this.
Comment 9•10 years ago
|
||
I'm in favour of WONTFIXing this, based on the argument in comment 7. Yes, some people probably still make mistakes but I think thus far the momentum has been to convert from stdout/stderr -> logcat, and if we keep doing that then eventually there will be almost nothing left in stdout/stderr. At that point anybody looking at that will realize they are not looking in the right place. There have been a number of patches in recent history that move stuff like display list dumping and so on to be on logcat ifdef ANDROID.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Assignee | ||
Comment 10•10 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #7) > If anything, we should print a > big warning to b2g-emulator's stdout saying "LOOK AT LOGCAT INSTEAD". Filed bug 1005209 for this.
Comment 11•10 years ago
|
||
FWIW I'm working on bug 1004899 which will use *_stderr functions to get information into the profiler as well. More generally this provides an easy instrumentation point for platform tooling to get at our debug output.
Comment 12•10 years ago
|
||
Err, if it wasn't clear I'm in favor of continuing the porting process mentioned in Comment 9.
You need to log in
before you can comment on or make changes to this bug.
Description
•