Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in test texImage2DHTML.html? #2944

Open
asajeffrey opened this issue Oct 23, 2019 · 2 comments
Open

Race condition in test texImage2DHTML.html? #2944

asajeffrey opened this issue Oct 23, 2019 · 2 comments

Comments

@asajeffrey
Copy link

I'm seeing FAIL results in Servo in test https://github.com/KhronosGroup/WebGL/blob/master/conformance-suites/2.0.0/conformance/more/functions/texImage2DHTML.html which I think may be caused by a race condition in the test.

The FAIL is caused by the testTexImage2DNonSOP test running before the <img id="i2"> has loaded, causing the ctx.drawImage(img,0,0) to throw an InvalidState exception. This happens when the test runs before the img is initialized at https://github.com/KhronosGroup/WebGL/blob/master/conformance-suites/2.0.0/conformance/more/functions/texImage2DHTML.html#L117

This seems to be a race condition between the document.load event which initializes the img, and the test running.

@jdm
Copy link

jdm commented Oct 23, 2019

Also the specification for HTMLImageElement.complete was recently changed to remove the ability for its reported status to change inside of an endless loop like is used by that test: whatwg/html#4934

@kdashg
Copy link
Contributor

kdashg commented Oct 23, 2019

I filed #2945 for while (!img.complete).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants