xpra icon
Bug tracker and wiki

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#1218 closed defect (fixed)

Video Region Tearing With Video Controls

Reported by: J. Max Mena Owned by: J. Max Mena
Priority: critical Milestone: 1.0
Component: client Version: trunk
Keywords: Cc:

Description

We've been talking about this one a bit recently, and we've gathered all necessary data to finally open a ticket.

The repro is fairly straightforward:

  • Start up a session with Google Chrome
  • Connect to the session with XPRA_OPENGL_PAINT_BOX=1 enabled optionally, does help to visualize what's going on
  • Navigate to a YouTube? video of your choice.
  • Start playing the video.
  • Once the heuristics have calmed down a bit, start mousing over the video and other items on the page.

Outcome:

The video starts getting tearing due a partial repaint over the h264 region.


I'll attach a screenshot, a short video, and the requested Xpra Info.


Also, I'm marking this as client, but I'm not sure if that's where the issue is lying. All of this was done with latest trunk r12735 on Fedora 23 (both machines) 64-bit.

Attachments (5)

1218xprainfo.txt (141.9 KB) - added by J. Max Mena 2 years ago.
Requested Xpra info
1218 Video tearing Chrome.mp4 (4.2 MB) - added by J. Max Mena 2 years ago.
A quick video documenting what we're seeing
1218 Tearing SS.png (358.0 KB) - added by J. Max Mena 2 years ago.
A screenshot depicting the partial painting over the video region
1218-paint issues in Firefox.mp4 (2.8 MB) - added by J. Max Mena 2 years ago.
track-nonvideo.patch (8.6 KB) - added by Antoine Martin 2 years ago.
when we exclude non-video regions from the window paint, make sure they eventually get refreshed too

Change History (17)

Changed 2 years ago by J. Max Mena

Attachment: 1218xprainfo.txt added

Requested Xpra info

Changed 2 years ago by J. Max Mena

A quick video documenting what we're seeing

Changed 2 years ago by J. Max Mena

Attachment: 1218 Tearing SS.png added

A screenshot depicting the partial painting over the video region

comment:1 Changed 2 years ago by J. Max Mena

Summary: Video Region Tearing With YouTube ControlsVideo Region Tearing With Video Controls

(update title, we see this in a few spots, but YouTube? is the easiest to repro with Chrome)

comment:2 Changed 2 years ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

Found the bugs: if we are processing the video frames sufficiently fast, the window damage events for the other bits (widgets, progress bar, etc) may arrive whilst there are no video damage events queued up, we then decide that the update is not video as it is not worth sending the whole area as video since it is only a small portion of it.

There were actually two bugs here, both fixed by r12744. This will be backported.

Note: this is going to be worse when we have av-sync on. The widgets will now get repainted with the video, which is delayed for av-sync.. And if they only partially overlap the video, only half will be delayed.

PS: r12740 is another bug somewhat related that needs to be backported. And maybe also r12758.

Last edited 2 years ago by Antoine Martin (previous) (diff)

comment:3 Changed 2 years ago by J. Max Mena

Owner: changed from J. Max Mena to Antoine Martin

Upped my client and server to r12754:

I am now seeing some really peculiar painting issues while using Firefox. When typing or highlighting text, nothing appears to update until I scroll within the webpage. It's like it's not partially repainting properly. I assume it's because of the fixes for this ticket. I'll attach a quick recording to demonstrate.

But, I no longer see the region tearing with video controls.


Of course, if it's unrelated to this, it can go into a new ticket.

Changed 2 years ago by J. Max Mena

comment:4 Changed 2 years ago by J. Max Mena

Of note:

I also see this issue in Chrome. Playing a video seems to avoid the issue entirely.

comment:5 Changed 2 years ago by Antoine Martin

Owner: changed from Antoine Martin to J. Max Mena

I have tested this on my dev box, then built new beta packages then tested in all the Fedora vms that I have and I cannot reproduce this problem at all.
Are you sure that this is caused by this changeset? Have you tried any other versions to compare?

I can only guess that you are doing something different than I am. Having xpra info or at the very least, the command lines you've used would help. Maybe you're enabling opengl on a buggy chipset? If that's the case, it could help us fix it as the effects seem quite dramatic. (new ticket, please include opengl paint boxes, opengl debug, etc)

comment:6 Changed 2 years ago by J. Max Mena

Resolution: fixed
Status: newclosed

Maybe you're enabling opengl on a buggy chipset?


Oddly enough I'm getting it with OpenGL off as well. Either way, this machine has an Nvidia 745, so OpenGL shouldn't be a problem. Well...maybe. It is Nvidia after all....



Server start commands:

xpra start :13 --bind-tcp=0.0.0.0:2200 --start-new-commands=yes --start-child=xterm --start-child="xterm -bg black -cr white -fg white" --start-child="xterm -bg black -cr white -fg white"

Client attach:

xpra attach tcp:ip:port

So nothing special, really. Just a TCP server with a couple Xterms.


Either way the issues I'm seeing for this ticket are resolved, so since you can't repro what I'm seeing now, I'll go ahead and close this one (again, video controls no longer tear video) and file a new one after some further investigation.

comment:7 Changed 2 years ago by Branden Spikes

I've been unable to reproduce Max's issue.. I think what he saw might be unrelated to this fix.

comment:8 Changed 2 years ago by Antoine Martin

The paint issue is now tracked in #1225 and may have been caused by r12754: we may not refresh parts of the window in the video region exclusion zone if the "video" stops.

Changed 2 years ago by Antoine Martin

Attachment: track-nonvideo.patch added

when we exclude non-video regions from the window paint, make sure they eventually get refreshed too

comment:9 Changed 2 years ago by Antoine Martin

Resolution: fixed
Status: closedreopened

There may be a region leak now, caused by r12744.
The patch above should fix it, but I don't really like it as it is too intrusive and may also make it much more difficult to implement #981.

comment:10 Changed 2 years ago by Antoine Martin

Priority: majorcritical

r12776 (+ optional r12777 and r12780 fixup) is the more correct fix (details in commit message) - also more complicated.

Please confirm that the original bug is still fixed and that the regression in #1225 is also gone.

Last edited 2 years ago by Antoine Martin (previous) (diff)

comment:11 Changed 2 years ago by J. Max Mena

Resolution: fixed
Status: reopenedclosed
  • Upped server and client to r12780:
  • I can't reproduce the issues I found in the description, so it looks like this is still fixed
  • And, I cannot induce the issues I found with #1225 after some very thorough testing

re-closing this ticket as fixed.

comment:12 Changed 2 years ago by Antoine Martin

Milestone: 0.181.0

Milestone renamed

Note: See TracTickets for help on using tickets.