Closed Bug 1708179 Opened 3 years ago Closed 3 years ago

Assertion failure: false (This should not happen, setting the value should always work), at /builds/worker/workspace/obj-build/dist/include/mozilla/dom/AudioParam.h:69

Categories

(Core :: Web Audio, defect)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox88 --- wontfix
firefox89 --- wontfix
firefox90 --- fixed

People

(Reporter: jkratzer, Assigned: karlt)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: assertion, regression, testcase)

Attachments

(9 files)

6.61 KB, application/zip
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
Attached file testcase.zip

Testcase found while fuzzing mozilla-central rev 1c01cb995fc9 (built with --enable-debug --enable-fuzzing).

The testcase is not entirely reliable and may require several attempts before it reproduces.

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 1c01cb995fc9 --debug --fuzzing -n mc-debug
$ python -m grizzly.replay --xvfb ./mc-debug/firefox ./testcase.zip --no-harness --repeat 10

Unfortunately, I have not yet been able to get a symbolized stack trace for this bug.

A pernosco session for this bug can be found at the following URL:
https://pernos.co/debug/8LMFOlcqyn5f-242ObShCw/index.html

ValidateEvent() fails due to an existing SetValueCurve.
The AudioParam.value setter is not expecting that.

https://webaudio.github.io/web-audio-api/#dom-audioparam-value says

Setting this attribute has the effect of assigning the requested value to the [[current value]] slot, and calling the setValueAtTime() method with the current AudioContext's currentTime and [[current value]]. Any exceptions that would be thrown by setValueAtTime() will also be thrown by setting this attribute.

https://webaudio.github.io/web-audio-api/#AudioParam has

Similarly a NotSupportedError exception MUST be thrown if any automation method is called at a time which is contained in [T,T+D), T being the time of the curve and D its duration.

Similarly https://webaudio.github.io/web-audio-api/#dom-pannernode-setposition

Consequently, if any of the positionX, positionY, and positionZ AudioParams have an automation curve set using setValueCurveAtTime() at the time this method is called, a NotSupportedError MUST be thrown.

Severity: -- → S3
Has Regression Range: --- → yes
Assignee: nobody → karlt
Status: NEW → ASSIGNED

when the setter should not throw because there are no events in the timeline
and the time is known valid.

This will allow us to make SetValue() throw when it conflicts with a
setValueCurveAtTime() curve.

Depends on D113937

Depends on D113939

This is similar to what WebIDL bindings would do for us when the AudioParam setters are called.

setPosition() "is equivalent to setting positionX.value, positionY.value, and positionZ.value
attribute directly with the x, y and z parameters, respectively."
https://webaudio.github.io/web-audio-api/#dom-pannernode-setposition

Depends on D113942

Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/20970c1d7f91
clarify that AudioEventTimeline::ValidateEvent() has no side effects r=padenot
https://hg.mozilla.org/integration/autoland/rev/70e615eb295d
add AudioParam::SetInitialValue() for use in AudioNode creation r=padenot
https://hg.mozilla.org/integration/autoland/rev/fd926488406a
throw when attempting to set AudioParam value during setValueCurveAtTime() interval r=padenot,emilio
https://hg.mozilla.org/integration/autoland/rev/fba8c6d431c5
remove unused variables r=padenot
https://hg.mozilla.org/integration/autoland/rev/aff5404e2d74
Test AudioParam value setter throws during setValueCurveAtTime() interval r=padenot
https://hg.mozilla.org/integration/autoland/rev/a08e66f10499
switch from PannerNode.setPosition() parameters close to DBL_MAX to FLT_MAX r=padenot
https://hg.mozilla.org/integration/autoland/rev/287e7da8b0d5
throw when PannerNode param value a not in the range of float r=padenot
https://hg.mozilla.org/integration/autoland/rev/79b910105bf0
Test PannerNode.setPosition() throws with parameter out of range of float r=padenot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/28804 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
See Also: → 1717508
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: