Closed Bug 867253 Opened 11 years ago Closed 9 years ago

WebGL: calling detachShader after linkProgram crashes script

Categories

(Core :: Graphics: CanvasWebGL, defect)

20 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: floooh, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130409194949

Steps to reproduce:

To reproduce:

1) in FF (version doesn't matter, happens also in Nightly) go here: http://www.flohofwoe.net/demos/dragons_ffdetachshader_debug.html
2) note how the code aborts soon after it started
3) open the JS console, errors are listed there: Error: WebGL: Uniform4v: this function expected a uniform of element size 4, got a uniform of element size 0
4) note how the same code runs in Google Chrome
5) now in FF, go to this URL: http://www.flohofwoe.net/demos/dragons_debug.html and notice how the code runs

The difference between the 2 versions is that the aborting version calls detachShader after linkProgram and before using the shader. This is legal GL and together with a glDeleteShader even recommended in order to free resources, so I think this is a bug in Firefox.
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
See Also: → 899466
The test URL started working for me in the Fx34 time frame. Fix range: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b53c2753ce9a&tochange=7fc96293ada8

I'm guessing that this was fixed by bug 1038899. Andre, can you confirm that things work as expected for you now as well?
Flags: needinfo?(floooh)
Yes, confirmed fixed. Thank you :)
Flags: needinfo?(floooh)
Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Depends on: 1038899
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.