Xpra: Ticket #1218: Video Region Tearing With Video Controls

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:

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.



Fri, 03 Jun 2016 18:43:19 GMT - J. Max Mena: attachment set

Requested Xpra info


Fri, 03 Jun 2016 18:45:49 GMT - J. Max Mena: attachment set

A quick video documenting what we're seeing


Fri, 03 Jun 2016 18:46:19 GMT - J. Max Mena: attachment set

A screenshot depicting the partial painting over the video region


Fri, 03 Jun 2016 18:46:45 GMT - J. Max Mena: summary changed

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


Sun, 05 Jun 2016 06:46:44 GMT - Antoine Martin: owner changed

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.


Mon, 06 Jun 2016 16:38:46 GMT - J. Max Mena: owner changed

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.


Mon, 06 Jun 2016 16:42:05 GMT - J. Max Mena:

Of note:

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


Tue, 07 Jun 2016 05:28:55 GMT - Antoine Martin: owner changed

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)


Tue, 07 Jun 2016 17:00:22 GMT - J. Max Mena: status changed; resolution set

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.


Tue, 07 Jun 2016 18:13:10 GMT - Branden Spikes:

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


Thu, 09 Jun 2016 05:49:20 GMT - 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.


Thu, 09 Jun 2016 11:55:56 GMT - Antoine Martin: attachment set

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


Thu, 09 Jun 2016 11:57:40 GMT - Antoine Martin: status changed; resolution deleted

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.


Fri, 10 Jun 2016 11:46:39 GMT - Antoine Martin: priority changed

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.


Fri, 10 Jun 2016 19:33:52 GMT - J. Max Mena: status changed; resolution set

re-closing this ticket as fixed.


Tue, 12 Jul 2016 16:52:22 GMT - Antoine Martin: milestone changed

Milestone renamed


Sat, 23 Jan 2021 05:18:12 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1218