Closed Bug 1030384 Opened 6 years ago Closed 6 years ago

startup consolespew: "WARNING: Failed to update pref 'camera.control.test.enabled' (0x8000ffff)" and similar

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: dholbert, Assigned: mikeh)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

STR:
 1. Start up a recent m-c build from the terminal, with a fresh profile.
 2. Watch your terminal output.

ACTUAL RESULTS:
This appears, among the first few lines of output:
{
[25696] WARNING: Failed to update pref 'camera.control.test.enabled' (0x8000ffff)
: file $SRCDIR/dom/camera/CameraPreferences.cpp, line 136
[25696] WARNING: Failed to update pref 'camera.control.test.hardware' (0x8000ffff)
: file $SRCDIR/dom/camera/CameraPreferences.cpp, line 136
[25696] WARNING: Failed to update pref 'camera.control.test.method.error' (0x8000ffff)
: file $SRCDIR/dom/camera/CameraPreferences.cpp, line 136
[25696] WARNING: Failed to update pref 'camera.control.test.async.error' (0x8000ffff)
: file $SRCDIR/dom/camera/CameraPreferences.cpp, line 136
}

These lines were added in the past few days, in 990122, here:
  http://hg.mozilla.org/mozilla-central/rev/8b4e8b5ad0c5#l1.138

I trapped it with gdb, and the backtrace shows that this is being called by
 mozilla::Preferences::RegisterCallbackAndCall()
which is called by:
 mozilla::CameraPreferences::Initialize()

I think the pref-read is failing simply because the preference does not exist. (It's not in all.js) 

mikeh, can we just drop these warnings?
Flags: needinfo?(mhabicher)
(In reply to Daniel Holbert [:dholbert] from comment #0)
>
> I think the pref-read is failing simply because the preference does not
> exist. (It's not in all.js) 

Right, they're used for testing the API.

> mikeh, can we just drop these warnings?

These warnings only show up in DEBUG builds, so I'd like to leave them in.
Flags: needinfo?(mhabicher) → needinfo?(dholbert)
No, you don't get to spew whatever you want in the console of a debug build.  The warnings need to go.
Blocks: fx-noise
Are there any guidelines on the proper usage of NS_WARNING? MDN, at least, is silent on the matter.
Flags: needinfo?(khuey)
It's supposed to be used for "unexpected" cases.  If the NS_WARNING fires on every startup that's not unexpected.
Flags: needinfo?(khuey)
Assignee: nobody → mhabicher
Status: NEW → ASSIGNED
Attachment #8446575 - Flags: review?(dholbert)
FWIW, this warning appears 328 times in a Mochitest-2 log I grabbed.
(In reply to Andrew McCreight [:mccr8] from comment #6)
>
> FWIW, this warning appears 328 times in a Mochitest-2 log I grabbed.

Apologies. If someone wants to r+ attachment 8446575 [details] [diff] [review], I'll land it ASAP.
https://hg.mozilla.org/mozilla-central/rev/9c4ee32efd92
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
just noticed there's still a pending needinfo=me from comment 1; canceling it, since I don't think we're waiting on anything here. [khuey replied to comment 1 before I could]
Flags: needinfo?(dholbert)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.