Bug 62952 - WebGL context reports error code 1280
Summary: WebGL context reports error code 1280
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Zhenyao Mo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-19 08:30 PDT by Andor Salga
Modified: 2021-03-18 05:13 PDT (History)
6 users (show)

See Also:


Attachments
test case (394 bytes, text/html)
2011-07-18 10:56 PDT, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andor Salga 2011-06-19 08:30:23 PDT
To reproduce:

1) Create an empty test.js file to successfully XHR some file.

2) Create and run the following WebGL script:

<html>
  <head>
    <script>
      function start(){
        var canvas = document.getElementById('canvas');
        var ctx = canvas.getContext("experimental-webgl");
        var xhr = new XMLHttpRequest();

        xhr.onload = function(){
          alert(ctx.getError());
        };
        xhr.open("GET", "test.js", true);
        xhr.send(null); 
      }
    </script>
  </head>

  <body onload="start();">
    <canvas id="canvas"></canvas>
  </body>
</html>

WebKit will alert a WebGL error code 1280.
Both Firefox and Chrome report error code 0.
Comment 1 Alexey Proskuryakov 2011-06-19 22:45:47 PDT
Does this really have anything to do with XMLHttpRequest? Would you get the same result with setTimeout()?
Comment 2 Kenneth Russell 2011-06-21 12:03:05 PDT
I can't imagine that there's any interaction between XMLHttpRequest() specifically and WebGL. As Alexey points out, this is likely just a problem allocating the WebGL back buffer.

Please attach the output from System Profiler so we can see what graphics card is in your machine.
Comment 3 Andor Salga 2011-07-16 13:49:48 PDT
Sorry for the (very long) wait:

NVIDIA GeForce 8600M GT:

  Chipset Model:	GeForce 8600M GT    
  Type:	GPU
  Bus:	PCIe
  PCIe Lane Width:	x16
  VRAM (Total):	128 MB
  Vendor:	NVIDIA (0x10de)
  Device ID:	0x0407
  Revision ID:	0x00a1
  ROM Revision:	3175
  Displays:
Color LCD:
  Resolution:	1440 x 900
  Pixel Depth:	32-Bit Color (ARGB8888)
  Main Display:	Yes
  Mirror:	Off
  Online:	Yes
  Built-In:	Yes
VX2262wm:
  Resolution:	1280 x 960 @ 60 Hz
  Pixel Depth:	32-Bit Color (ARGB8888)
  Mirror:	Off
  Online:	Yes
  Rotation:	Supported

This occurs more than just on my machine. I just tested with the latest Webkit: Version 5.0.5 (6533.21.1, r91108) and I still get the alert.
Comment 4 Yury [:yury] 2011-07-16 16:54:47 PDT
can reproduce with:

        setTimeout( function(){
          alert(ctx.getError());
        }, 1000);

on the following configuration:

    AMD Radeon HD 6490M:

      Chipset Model: AMD Radeon HD 6490M
      Type: GPU
      Bus: PCIe
      PCIe Lane Width: x8
      VRAM (Total): 256 MB
      Vendor: ATI (0x1002)
      Device ID: 0x6760
      Revision ID: 0x0000
      ROM Revision: 113-C0170H-504
      gMux Version: 1.9.23
      EFI Driver Version: 01.00.504
Comment 5 Zhenyao Mo 2011-07-18 10:05:20 PDT
Can you add alert(ctx.getError()) right after "var ctx = canvas.getContext("experimental-webgl");" and see if you get an error or not.
Comment 6 Alexey Proskuryakov 2011-07-18 10:38:32 PDT
I can reproduce this with a local build of r91135. Right after canvas.getContext(), the error in 0, but after a 1-second timeout, it's 1280.

I have a MacBook Pro with NVIDIA GeForce 9400M.
Comment 7 Zhenyao Mo 2011-07-18 10:44:06 PDT
(In reply to comment #6)
> I can reproduce this with a local build of r91135. Right after canvas.getContext(), the error in 0, but after a 1-second timeout, it's 1280.
> 
> I have a MacBook Pro with NVIDIA GeForce 9400M.

and in between there are no other js code?
Comment 8 Alexey Proskuryakov 2011-07-18 10:56:58 PDT
Created attachment 101174 [details]
test case

I just added an alert(). Attaching my complete test case, just in case.

Note that WebGL works for me in this build otherwise (e.g. http://www.webkit.org/blog-files/webgl/SpiritBox.html does work).
Comment 9 Zhenyao Mo 2011-07-18 11:00:26 PDT
OK, I can reproduce this on my MacBook Pro.  I'll have a look.