Closed Bug 586588 Opened 12 years ago Closed 12 years ago

Some WebGL demos no longer work in Minefield b4pre

Categories

(Core :: Canvas: WebGL, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: scoobidiver, Unassigned)

References

()

Details

(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100811 Minefield/4.0b4pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100811 Minefield/4.0b4pre

Here below is a list of WebGL demos that work well in FF 4.0b3 and no longer work in Minefield b4pre (no display, uncomplete display) :

http://people.mozilla.com/~vladimir/webgl/spore/sporeview.html
http://www.c3dl.org/index.php/webgl-demos/asteroids-3d/
http://www.nihilogic.dk/labs/webgl_musical_solar_system/

Reproducible: Always
Keywords: regression
Confirmed on http://hg.mozilla.org/mozilla-central/rev/ba956b17d834
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100811 Minefield/4.0b4pre ID:20100811063038

Regression window - Crash:
Works:
http://hg.mozilla.org/mozilla-central/rev/f53e379c3448
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100806 Minefield/4.0b4pre ID:20100806212845
Crash;
http://hg.mozilla.org/mozilla-central/rev/5aeec895393f (crash)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100806 Minefield/4.0b4pre ID:20100806224818
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f53e379c3448&tochange=5aeec895393f
I guess Bug 583838 causes this crash.

Regression window - Fixed crash, but no display, uncomplete display :
Crash;
http://hg.mozilla.org/mozilla-central/rev/be806599987a (crash)
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100809 Minefield/4.0b4pre ID:20100809221627

Not crash but no display, uncomplete display
http://hg.mozilla.org/mozilla-central/rev/8767a9c9a4bd
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100809 Minefield/4.0b4pre ID:20100810002255
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=be806599987a&tochange=8767a9c9a4bd

Bug 585502 seems to fix crash, but not render well.
Blocks: 583838, 585502
Target Milestone: --- → mozilla2.0
Version: unspecified → Trunk
Thanks Scoobidiver and Alice for your detailed reports. I have examined these pages in Minefield and it turns out that the reason why they are not working anymore is that they are still using old WebGL API that has been removed for a while from the WebGL spec, and is no longer supported in Minefield. For a while, we have supported both old and new API variants, but bug 584815 has removed support for the old API.

See these posts about the API changes:
    http://learningwebgl.com/blog/?p=2481
    https://www.khronos.org/webgl/public-mailing-list/archives/1007/msg00034.html

For example, let's look at the first link:
    http://people.mozilla.com/~vladimir/webgl/spore/sporeview.html
When I load it in Minefield, indeed the scene doesn't show up, so I go to the error console (Ctrl+Shift+J) or I look at the terminal output, and I see:

    Error: uncaught exception: [Exception... "Not enough arguments"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: http://people.mozilla.com/~vladimir/webgl/spore/sporeview.js :: draw :: line 264"  data: no]

So I open this file,
    http://people.mozilla.com/~vladimir/webgl/spore/sporeview.js
and go to line 264, and I see:
    gl.texImage2D(gl.TEXTURE_2D, 0, flipImage(sf.textures.diffuse));
Which is trying to use the old (now removed) signature of texImage2D.

I haven't checked all other links so feel free to reopen if you think that some of the other links is failing because of an actual bug in Minefield.

As for the crash, as you noted, it is fixed by bug 585502 (yes, this was indeed our bug, a separate issue).
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Target Milestone: mozilla2.0 → ---
Version: Trunk → unspecified
Note: authors of these demos will probably be very thankful for any help porting these demos to the new WebGL API.
No longer blocks: 583838, 585502
Keywords: regression
OK, to be honest, in my answer above I had tried only the first link. The issues are actually very separate so it would have helped to file separate bugs.

Now I've tried the second link,
    http://www.c3dl.org/index.php/webgl-demos/asteroids-3d/
and I see this error:
    enable: invalid enum value 0x8642
It is looking like this code is trying to call the WebGL function enable() with an illegal custom value 0x8642. A Google search for is illegal in WebGL. This would explain why the particles in this demo don't show up. Then there is this message, "Error: Texture exception - tried to call texImage2DHTML()", printed in the page itself, which I just don't understand.
Blocks: 583838, 585502
Keywords: regression
I can't try the third link now,
    http://www.nihilogic.dk/labs/webgl_musical_solar_system/
because other local changes I have in my current build are exposing a crash in the JS engine, see bug 585714. Feel free to examine and reopen if necessary.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
argh, reopened by mistake, sorry.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → INVALID
and in Comment 4, copy-and-paste problem, I mean to write: A Google search for it shows that it is the constant GL_VERTEX_PROGRAM_POINT_SIZE which is illegal in WebGL.
ok, now I have been able to run demo 3,
    http://www.nihilogic.dk/labs/webgl_musical_solar_system/

and it says:

JavaScript error: , line 0: uncaught exception: [Exception... "Not enough arguments"  nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: http://www.nihilogic.dk/labs/webgl/gltest.js :: createTexture :: line 462"  data: no]

opening http://www.nihilogic.dk/labs/webgl/gltest.js, at line 462, we see:

	gl.texImage2D(gl.TEXTURE_2D, 0, textureImages[name]);

so this is again the issue with the old texImage2D signature.

Moreover, this demo also gives a separate (non fatal) error:

enable: invalid enum value 0xde1
Duplicate of this bug: 587911
You need to log in before you can comment on or make changes to this bug.