CefRenderHandler::OnPaint stops receiving updates on resize

Issue #2370 closed
Callum Linden
created an issue

Version 3.3239.1723.g071d1c1 Windows 64.

Navigate to a YouTube video URL (e.g. https://www.youtube.com/watch?v=h4rZE_J1beA) in the cefclient application with --off-screen-rendering-enabled and resize the client window vigorously.

Expect: The video to keep playing as normal

What happens: Sometimes the video freezes, content remains in place but pixels are not updated as the video plays. You still hear audio so video is still playing.

Very easy to reproduce - usually after 4 or 5 resizes.

I originally found this in my test application and noticed the same problem. My first thought that the browser size was being passed through my code incorrectly but tasking a hash of the video pixels made it clear the new pixels stop arriving at OnPaint(..) after resizing the window.

Initially reported here: http://magpcss.org/ceforum/viewtopic.php?f=6&t=15733

Comments (4)

  1. Rich Lawrence

    This is broken from commit 3f71138d onwards - after updating to Chromium commit a106f0ab. This is during the jump from branch 3.3029 to 3.3071. The issue is present in every release from the 3.3071 branch (and onwards, as far as I can tell).

    I'm running on Windows 10 x64, build 17134.112. VS2017 support had not been committed/merged at this point, so I have been using VS2015 to build, 14.0.25431.01 Update 3, compiling with cl.exe version 19.00.24234.1.

    There are a number of changes related to resizing in the Chromium code between a106f0ab and the previous commit 939b32ee (CEF commit 54647945). The change in 3f71138d includes code with the new CompositorResizeLock, so I believe that these Chromium changes were seen when 3f71138d was being written!

    I am very keen to see this issue resolved, and very happy to continue bisecting further. However, there is a lot of noise in 3f71138d w/r/t the issue in hand that I am struggling to reason about, including at least:

    • fallout from a large Blink renaming exercise

    • changes for background_color/transparency

    Without separate diffs for these changes in CEF, bisecting the Chromium code will be a very slow process for me.

    It is trivially easy to hit this problem - the cefclient tends to get stuck for me before I release the mouse on the first resizing drag. Without the --off-screen-rendering-enabled flag everything works just fine. (Edit: I have not been using the --multi-threaded-message-loop flag.)

    Hopefully there is enough information here for someone knowledgeable to use to find and fix the bug. Please let me know if I can do anything more to help!

  2. Rich Lawrence

    This appears to be fixed in 3.3440 builds (and 3.3626 - I haven't tested all versions in between).

    Tested on 3.3440.1802.g9512b3f - was not able to get the Youtube video that was playing to become stuck.

    Tested on 3.3396.1786.gd3e36d0 - renderer became stuck on first resize.

    Running as "cef-client.exe --off-screen-rendering-enabled", W10 x64, build 17763.292.

    (Versions downloaded from here.)

  3. Log in to comment