WebGL content fails to paint before browser interaction is made. (demo: Tiny3d)
Categories
(Core :: Graphics: CanvasWebGL, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox75 | --- | disabled |
firefox76 | --- | disabled |
firefox77 | --- | verified |
People
(Reporter: atrif, Assigned: mikokm)
References
()
Details
(Keywords: regression)
Attachments
(2 files)
1.10 MB,
image/gif
|
Details | |
Bug 1627594 - Schedule a full paint when canvas element is invalidated before the first paint r=kats
47 bytes,
text/x-phabricator-request
|
Details | Review |
Affected versions
- 76.0a1 (20200405212522)
Affected platforms
- Windows 10 x64
- Ubuntu 18.04
Preconditions
- enable dom.postMessage.sharedArrayBuffer.bypassCOOP_COEP.insecure.enabled=true
Steps to reproduce
- Open Firefox and go to http://clb.confined.space/dump/unity/tiny3d-asmjs-tiny3d/Tiny3D.html.
Expected result
- Page loads successfully.
Actual result
- A blank page is displayed (content is shown only after a browser interaction e.g: clicking the address bar or opening web console or focusing away from the browser)
Regression Range
- I will search for one ASAP if there is one.
Notes
- Attached a screen recording with the issue.
- It seems that on Ubuntu 18 the content is loaded for the first time after 5-6 seconds but the same behavior occurs when reloading the page.
- On macOS 10.12 content is loaded as expected so I think macOS is not affected.
- Attached the web console log.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Attaching here the pushlog when the good build loads the page as expected without a browser interaction and the bad build doesn't load the page at all (sometimes just a green page is presented and A web page is slowing down your browser. What do you like to do?
banner message is displayed).
If more information is needed please let me know.
Comment 2•5 years ago
|
||
Thanks for the precise pushlog, Alexandru!
Edgar, were your changes from bug 1575425 intended to make WebGL content not work until post user-interaction?
Comment 3•5 years ago
|
||
(In reply to Andrew Overholt [:overholt] from comment #2)
Edgar, were your changes from bug 1575425 intended to make WebGL content not work until post user-interaction?
No, bug 1575425 just implemented [AllowShared] in webidl to ensure that develop could not pass a SharedArrayBuffer to the API that doesn't support. In theory, it should not change the WebGL content behaviour.
(In reply to Alexandru Trif, QA [:atrif] from comment #0)
Actual result
- A blank page is displayed (content is shown only after a browser interaction e.g: clicking the address bar or opening web console or focusing away from the browser)
Or resize the window.
Jeff, maybe you have some idea about what's happened. Thanks!
Updated•5 years ago
|
![]() |
||
Updated•5 years ago
|
Comment 5•5 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #3)
(In reply to Andrew Overholt [:overholt] from comment #2)
Edgar, were your changes from bug 1575425 intended to make WebGL content not work until post user-interaction?
No, bug 1575425 just implemented [AllowShared] in webidl to ensure that develop could not pass a SharedArrayBuffer to the API that doesn't support. In theory, it should not change the WebGL content behaviour.
But does the page somehow relied on the old behavior?
Comment 6•5 years ago
|
||
The bug 1575425 actually makes the test page stay black and browser seems stuck (reloading or trying to load another URI is responseless). And then after bug 1615741, the page failed with
TypeError: WebGL2RenderingContext.uniformMatrix4fv: Float32Array branch of (Float32Array or sequence) can't be a SharedArrayBuffer or an ArrayBufferView backed by a SharedArrayBuffer
And bug 1624944 fixes the error, and page could be rendered again, but somehow it something requires a post user-interaction.
I review all of those three path a again, I still have no idea how those patches make the test page requires a post user-interaction.
I suspect maybe there are some changes in-between https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=63dba0113913913e77122ff7c3a42760c732c35b&tochange=f2b77060cc80e064f5095a2f06690e7c5d32289a (which make the page doesn't work at all) and https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=59b0653948b4c32e0b1053f29e87ec0e841da17f&tochange=e2fe93a06bf5c3c7a04cca1cb1b145f765504d18 (which make the page could be rendered again) cause such behavior.
Comment 7•5 years ago
•
|
||
I apply the patch of bug 1624944 on the top of https://hg.mozilla.org/integration/autoland/rev/f2b77060cc80e064f5095a2f06690e7c5d32289a locally, I didn't see this issue, so the possible regression range is https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=63dba0113913913e77122ff7c3a42760c732c35b&tochange=e2fe93a06bf5c3c7a04cca1cb1b145f765504d18. I could try if I could narrow down the range a bit locally.
Comment 8•5 years ago
•
|
||
(In reply to Edgar Chen [:edgar] from comment #7)>
I could try if I could narrow down the range a bit locally.
I have narrowed down the range to https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=97385d484fbf&tochange=7210a39affab and it smells like https://hg.mozilla.org/integration/autoland/rev/57b9344a88a3250ee0924a4ecf7a27b986b050fd.
Comment 9•5 years ago
|
||
Okay, so It look like the bug 1617754 makes test content not work until post user-interaction. Could you take a look, Miko. Thanks
Assignee | ||
Comment 10•5 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #9)
Okay, so It look like the bug 1617754 makes test content not work until post user-interaction. Could you take a look, Miko. Thanks
I can only reproduce this intermittently, but I think you are correct.
Assignee | ||
Comment 11•5 years ago
|
||
Assignee | ||
Comment 12•5 years ago
|
||
The patch for bug 1617754 removed some (usually redundant) calls to nsIFrame::SchedulePaint()
with WebRender. I believe this uncovered an existing bug with WebRender canvas invalidation1, which attempts to do empty transaction before WebRender has processed the display list with the canvas display item.
Assignee | ||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Comment 14•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Reporter | ||
Comment 15•5 years ago
|
||
Verified the issue using Firefox 77.0a1 (20200503214759) on Windows 10x64, macOS 10.12 and Ubuntu 18.04.
Description
•