Open Bug 1800575 Opened 2 years ago Updated 2 years ago

Opening some Codepen Canvas demos in a new tab doesnt draw anything until force-refresh

Categories

(Core :: Graphics: Canvas2D, defect)

defect

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

Details

Attachments

(4 files)

90% chance of repro:
1.Go to https://codepen.io/sschepis/pens/public
2. Open a demo from the list in a new tab (right click on URL->Open Link in new tab) and switch to it immediately.

ER: content draws
AR: No content draws. I have to do a force-refresh (ctrl+shift+r) for the content to appear

This repros with/without gpu-canvas

Attached video bug.mp4
Attached file about:support

I can't reproduce this locally on macOS

Even i cant repro 100% of the time. But happy to run any diagnostic build or something.

FWIW, here is a profile where no content was drawn on the screen, but the demo appeared to be executing (i.e. the profile captured tons of stuff happening) : https://share.firefox.dev/3ERzELs

An alternate repro for this is demos on this page: https://codepen.io/Mertl/pens/public

Randomly, demos opened in background tabs will appear as if their centre has moved to the top-left corner of the pane. Shift+Refresh usually fixes that

Alternate manifestation of this bug

I can reproduce the issue in Nightly1090a1 Windows10.
When open a codepen demo in background tab, the graphics would not show.

STR:

  1. Open https://codepen.io/Mertl/pens/public
  2. Middle mouse click on a codepen demo(any of the second row) so that open in background tab
  3. Wait for the site icon to appear on the tab, then switch the tab

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=3a10833865f1ba444cd6be44b0ef3f951cfd90e1&tochange=6b6600f6781c585371dd334b26ca1a6623c29e28

Especially for the second and third demo in the first row.
Sometimes it appears to render with the origin in the upper left corner instead of the center.

The severity field is not set for this bug.
:lsalzman, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(lsalzman)

(In reply to Alice0775 White from comment #7)

I can reproduce the issue in Nightly1090a1 Windows10.
When open a codepen demo in background tab, the graphics would not show.

STR:

  1. Open https://codepen.io/Mertl/pens/public
  2. Middle mouse click on a codepen demo(any of the second row) so that open in background tab
  3. Wait for the site icon to appear on the tab, then switch the tab

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=3a10833865f1ba444cd6be44b0ef3f951cfd90e1&tochange=6b6600f6781c585371dd334b26ca1a6623c29e28

Especially for the second and third demo in the first row.
Sometimes it appears to render with the origin in the upper left corner instead of the center.

Assuming that regression window is correct, my best guess would be either bug 1547852 (https://hg.mozilla.org/integration/autoland/rev/acac503a73616055e6c27786640ad8dd81a5cd96) or bug 1547632 (https://hg.mozilla.org/integration/autoland/rev/fa6be110a460610cfa89efcfeda08d9d57e4915b).

Can you see which of those it might be?

Flags: needinfo?(lsalzman) → needinfo?(alice0775)

(In reply to Lee Salzman [:lsalzman] from comment #9)

Assuming that regression window is correct, my best guess would be either bug 1547852 (https://hg.mozilla.org/integration/autoland/rev/acac503a73616055e6c27786640ad8dd81a5cd96) or bug 1547632 (https://hg.mozilla.org/integration/autoland/rev/fa6be110a460610cfa89efcfeda08d9d57e4915b).

I think bug 1547852 would only change behaviour on beta/release not on nightly.

Bug 1547632 should only about wr, but I get a similar regression range as Alice and wr is disabled in that time period on the machine I was using.

For the record, I got this range, which is wider than Alice's because she probably has cached autoland builds and I was only able to use nightlies.

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f6766ba4ac77c6757c4e4db7598a2e685f23fcf6&tochange=11b4d70a2b5d6373f5ec8fa01ca48a1c7bc1829e

(In reply to Timothy Nikkel (:tnikkel) from comment #10)

(In reply to Lee Salzman [:lsalzman] from comment #9)

Assuming that regression window is correct, my best guess would be either bug 1547852 (https://hg.mozilla.org/integration/autoland/rev/acac503a73616055e6c27786640ad8dd81a5cd96) or bug 1547632 (https://hg.mozilla.org/integration/autoland/rev/fa6be110a460610cfa89efcfeda08d9d57e4915b).

I think bug 1547852 would only change behaviour on beta/release not on nightly.

Bug 1547632 should only about wr, but I get a similar regression range as Alice and wr is disabled in that time period on the machine I was using.

For the record, I got this range, which is wider than Alice's because she probably has cached autoland builds and I was only able to use nightlies.

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f6766ba4ac77c6757c4e4db7598a2e685f23fcf6&tochange=11b4d70a2b5d6373f5ec8fa01ca48a1c7bc1829e

Hmm, what about this change from there? https://hg.mozilla.org/integration/mozilla-inbound/rev/e8d2d9aff502

Easy to test by setting gfx.direct3d11.use-double-buffering to false and restarting?

I was testing on mac, so probably not d3d related.

(In reply to Lee Salzman [:lsalzman] from comment #9)

Can you see which of those it might be?

No idea

(In reply to Lee Salzman [:lsalzman] from comment #11)

Easy to test by setting gfx.direct3d11.use-double-buffering to false and restarting?

On Nightly109.0a1 Windows10, default value of gfx.direct3d11.use-double-buffering is false.

Flags: needinfo?(alice0775)

The the regression window in comment #7 is wrong.
I carefully tested to find the regression window again.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=aec4b19308a9b4eb59e2b988840af1d8996825c8&tochange=3a10833865f1ba444cd6be44b0ef3f951cfd90e1

Could Bug 1440537 , Bug 1546019 have caused this?

Emilio, do either of the bugs Alice pointed out look like they might be at fault?

Flags: needinfo?(emilio)

Hard to say, wasn't able to repro. At a glance I'd tend to say the later because this is about OOP iframes... If you inspect the frame when it repros, does it paint? Or is the frame wrongly sized or something?

Flags: needinfo?(emilio)

When I repro inspecting does not fix the problem, the expected content shows in the inspector. The sizes of the iframe, html, body seem fine in the inspector. Scrolling, clicking in the iframe, and resizing the window doesn't fix the problem.

What about the sizes of the iframe contents? Switching tabs back and forth doesn't fix the problem either I presume? What is the value of document.hidden for the document in the iframe?

Attached image image.png

When the problem occurs, it appears that the coordinate system is not being obtained correctly.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #18)

What about the sizes of the iframe contents?

I meant that the html, body element etc inside the iframe sizes seem fine as reported by the inspector.

Switching tabs back and forth doesn't fix the problem either I presume? What is the value of document.hidden for the document in the iframe?

Switching tabs does not fix the problem. document.hidden is false.

Right clicking produces the correct menu for being on a canvas element (from the specific codepen that I opened). The inspector highlighting seems to work fine and picks the element I expect when I click.

(In reply to Alice0775 White from comment #19)

Created attachment 9306004 [details]
image.png

When the problem occurs, it appears that the coordinate system is not being obtained correctly.

Hmm, I haven't seen that. Maybe the coords inside the canvas get messed up somehow but everything else is okay?

Dragging the window to a different screen with different density doesn't fix it. Dragging the tab out of the window doesn't fix it (nor back into the window).

Any more investigation that might help here? I can also try changing the code/applying patches if you have some ideas to try.

Flags: needinfo?(emilio)

Making this function just return GetInProcessParentDocument(); might point at bug 1440537 being the cause (in which case it's really a website bug, kinda).

Flags: needinfo?(emilio) → needinfo?(tnikkel)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #24)

Making this function just return GetInProcessParentDocument(); might point at bug 1440537 being the cause (in which case it's really a website bug, kinda).

The bug still happens after making that change.

Also, I tried disabling fission and I still see the bug.

Flags: needinfo?(tnikkel)

The severity field is not set for this bug.
:lsalzman, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(lsalzman)
Severity: -- → S3
Flags: needinfo?(lsalzman)
Summary: Opening a Codepen demo in a new tab doesnt draw anything until force-refresh → Opening some Codepen Canvas demos in a new tab doesnt draw anything until force-refresh
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: