Spurious INVALID_VALUE error from texSubImage2D in Firefox

56 views
Skip to first unread message

Mark Callow

unread,
Nov 5, 2014, 5:36:20 AM11/5/14
to webgl-d...@googlegroups.com

Firefox 33.0.2 (& previous recent versions) returns a spurious INVALID_VALUE error from texSubImage2D. It is happening on every call in all of my app's. For example,

           gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 4, 4, gl.RGB, gl.UNSIGNED_BYTE, <non-null pixels>);

The only reason texSubImage2D can legitimately raise INVALID_VALUE is a null pixel pointer, level < 0 or offset + size > texture size. None of those things is true.

This only happens in Firefox. IE & Chrome are okay. Anyone else noticed this bug?

Regards

    -Mark

--
注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます.

NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.

Mark Callow

unread,
Nov 5, 2014, 6:07:04 AM11/5/14
to webgl-d...@googlegroups.com

On 05/11/2014 19:36, Mark Callow wrote:

Firefox 33.0.2 (& previous recent versions) returns a spurious INVALID_VALUE error from texSubImage2D. It is happening on every call in all of my app's. For example,

           gl.texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, 4, 4, gl.RGB, gl.UNSIGNED_BYTE, <non-null pixels>);

The only reason texSubImage2D can legitimately raise INVALID_VALUE is a null pixel pointer, level < 0 or offset + size > texture size. None of those things is true.

This only happens in Firefox. IE & Chrome are okay. Anyone else noticed this bug

It looks like I had an error in my printfs. The error is actually being raised by a glBindTexture(gl.TEXTURE_2D, 0); after the texSubImage calls. More tomorrow.

Alecazam

unread,
Nov 5, 2014, 6:00:27 PM11/5/14
to webgl-d...@googlegroups.com
I'm assuming you've called gl.texImage2D at least once to allocate the texture, before the call to texSubImage2D call.  texSubImage2D doesn't have enough input to allocate.


Mark Callow

unread,
Nov 5, 2014, 9:36:33 PM11/5/14
to webgl-d...@googlegroups.com

On 05/11/2014 20:06, Mark Callow wrote:

It looks like I had an error in my printfs. The error is actually being raised by a gl.bindTexture(gl.TEXTURE_2D, 0); after the texSubImage calls. More tomorrow.
I didn't have an error in the printfs. I was running a test program that loops through several applications. In some applications the error is raised by the texSubImage calls and in others by the bindTexture mentioned above.

Mark Callow

unread,
Nov 5, 2014, 9:38:48 PM11/5/14
to webgl-d...@googlegroups.com

On 06/11/2014 08:00, Alecazam wrote:
I'm assuming you've called gl.texImage2D at least once to allocate the texture, before the call to texSubImage2D call.  texSubImage2D doesn't have enough input to allocate.

Yes I have. And as I said, everything works perfectly on Chrome and IE.

Kenneth Russell

unread,
Nov 6, 2014, 2:49:14 AM11/6/14
to webgl-d...@googlegroups.com
Mark,

If you can reduce this to a small test case, could you please submit a pull request to the WebGL conformance suite? A bug like this should cause a red flag to be raised in the conformance tests.

Thanks,

-Ken


--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Callow

unread,
Nov 6, 2014, 5:13:37 AM11/6/14
to webgl-d...@googlegroups.com

On 06/11/2014 16:49, Kenneth Russell wrote:
Mark,

If you can reduce this to a small test case, could you please submit a pull request to the WebGL conformance suite? A bug like this should cause a red flag to be raised in the conformance tests.

Good point. Firefox 33.0.2 passes all the texture tests in both 1.0.2 and 1.0.3 conformance. It fails a small number of the other 1.0.2 tests and crashes when running the 1.0.3 conformance tests. I had to turn off all but the texture tests in order to see if they passed.

I'll see if I can figure out what in my app triggers the spurious error.

Reply all
Reply to author
Forward
0 new messages