Waterfox: 56.2.12: HTML5 canvas is somewhat broken

Created on 18 Jul 2019  Â·  5Comments  Â·  Source: MrAlex94/Waterfox

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://comic-walker.com/contents/detail/KDCW_CW01000002020000_68/ (a free web comic)
  2. Click 'Begin Reading'
  3. Click on the left edge of the screen and flip a page 3 times
  4. No image is drawn on the screen, and browser console says: Error: WebGL warning: drawElements: bound vertex attribute buffers do not have sufficient size for given indices from the bound element array

Expected behavior
The image should be drawn properly.

Desktop

  • OS: macOS 10.12.6/Windows 10 1803
  • Version: Waterfox 56.2.12

Additional context
It works properly on 56.2.11. I'm not confident but the commit b705c80 looks suspect.

Most helpful comment

Now I've confirmed that b705c80 is the cause. The problem is in WebGLBuffer::BufferData function in WebGLBuffer.cpp, restoring previously existed mContext->InvalidateBufferFetching(); line fixes the problem.

--- dom/canvas/WebGLBuffer.cpp.orig     2019-07-10 06:00:02.000000000 +0900
+++ dom/canvas/WebGLBuffer.cpp  2019-07-20 16:50:04.000000000 +0900
@@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, s

   const bool sizeChanges = (size != ByteLength());
   if (sizeChanges) {
+    mContext->InvalidateBufferFetching();
     gl::GLContext::LocalErrorScope errorScope(*gl);
     gl->fBufferData(target, size, uploadData, usage);
     const auto error = errorScope.GetError();

All 5 comments

No image is drawn on the screen, …

Not reproducible with Waterfox Classic 56.2.12 on FreeBSD-CURRENT.

The bug happens on Windows 10 LTSC (17763.615) using Waterfox 56.2.12.

Now I've confirmed that b705c80 is the cause. The problem is in WebGLBuffer::BufferData function in WebGLBuffer.cpp, restoring previously existed mContext->InvalidateBufferFetching(); line fixes the problem.

--- dom/canvas/WebGLBuffer.cpp.orig     2019-07-10 06:00:02.000000000 +0900
+++ dom/canvas/WebGLBuffer.cpp  2019-07-20 16:50:04.000000000 +0900
@@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, s

   const bool sizeChanges = (size != ByteLength());
   if (sizeChanges) {
+    mContext->InvalidateBufferFetching();
     gl::GLContext::LocalErrorScope errorScope(*gl);
     gl->fBufferData(target, size, uploadData, usage);
     const auto error = errorScope.GetError();

Thanks!

Bug reproducible with 56.2.12 on Lubuntu.

After two flips to the left:

image

– and after the third:

image

Meta/tracking: #538

Now I've confirmed that b705c80 is the cause. The problem is in WebGLBuffer::BufferData function in WebGLBuffer.cpp, restoring previously existed mContext->InvalidateBufferFetching(); line fixes the problem.

--- dom/canvas/WebGLBuffer.cpp.orig     2019-07-10 06:00:02.000000000 +0900
+++ dom/canvas/WebGLBuffer.cpp  2019-07-20 16:50:04.000000000 +0900
@@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, s

   const bool sizeChanges = (size != ByteLength());
   if (sizeChanges) {
+    mContext->InvalidateBufferFetching();
     gl::GLContext::LocalErrorScope errorScope(*gl);
     gl->fBufferData(target, size, uploadData, usage);
     const auto error = errorScope.GetError();

Thanks for the fix! https://github.com/MrAlex94/Waterfox/commit/285f3f889d8a6f9c217f7178363991b3c9c45db2

Was this page helpful?
0 / 5 - 0 ratings