Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

0.7.6 live examples blank canvas in Chrome 5.0.375.99

#124

From Carl Witty at Carl.Witty@gmail.com

I was looking at your SceneJS "Live Examples" section, and none of the ones I tried worked under Google Chrome (version 5.0.375.99, for Linux, nvidia proprietary drivers). In particular, I tried the 4 examples in the first "Basic" section, and none of them worked.

All 4 did work in a copy of Firefox 4 beta 1 running on the same computer, and the Chrome browser does work for other WebGL demos on other sites (such as "Learning WebGL", among others).

The javascript console shows:

SceneJS V0.7.6 initialised
SceneJS.Scene config 'canvasId' unresolved - looking for default
canvas with ID 'scenejs-default-canvas'
Scene defined: s0
s0: Creating shader: '
scenejs-default-canvas;;;dirsddirsddirsd;;tff'
s0: Creating shader:
'_scenejs-default-canvas;;;dirsddirsddirsd;/uv/baseColor/multiply/anim;ttf'

(Perhaps you meant chrome's standard output? chrome does not print anything to stdout when loading the failing page.)

I just realized I didn't actually say what the failure mode was. The
problem is that the WebGL window shows up as pure black.

I'm using a mostly up-to-date installation of Debian testing,
including Debian's packaging of the nvidia drivers (package version
195.36.24-2).

From glxinfo:
OpenGL renderer string: GeForce 8600 GTS/PCI/SSE2
OpenGL version string: 3.2.0 NVIDIA 195.36.24

From cat /proc/cpuinfo:
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
(that's basically the server version of a Core 2 Quad, I think).

I definitely did start chrome with "--enable-webgl"; for instance, I
can click back and forth between a tab showing
http://www.scenejs.org/ide.html?url=./examples/custom-geometry/cust...
(which does not work) and a tab showing http://learningwebgl.com/lessons/example01/ (which does work).

Reported by lindsay.kay (at xeolabs) · July 20th, 2010 @ 12:47 AM

State: resolved
Milestone: V0.7.7

Activity

  1. Carl Witty
    Carl Witty

    I believe this problem was due to a bug in Chrome (I'm guessing http://code.google.com/p/chromium/issues/detail?id=40175). When I upgraded to the "unstable" branch of Chrome (version 6.0.466.0 dev), the problem went away.

    But I also tracked down the problem and found a workaround. I don't know if you're interested, but if so, here it is:

    gl.getActiveUniform was producing uniform names that had a trailing NUL. For instance, see this excerpt from the log:
    gl.getActiveUniform(program0, 0);
    var uniformLocation0 = gl.getUniformLocation(program0, 'uAmbient\u0000');
    gl.getActiveUniform(program0, 1);
    var uniformLocation1 = gl.getUniformLocation(program0, 'uLightColor0\u0000');
    The uniforms were then entered into the uniforms[] array under these names. Then, when you tried to look them up (in setUniform()) under the correct name, they weren't found.

    I produced a patch (attached) which fixed the problem for me in the old version of Chrome.

    (My first attempt didn't rename u.name to u_name; that didn't work. Evidently whatever kind of object u is silently ignores writes to .name .)

    If you do apply this patch (or a similar one), and want me to test it, let me know and I'll downgrade Chrome back to the buggy version to do the test.

    July 20th, 2010 @ 05:18 AM

  2. lindsay.kay (at xeolabs)
    lindsay.kay (at xeolabs)

    Nice one Carl, patch looks good.

    I'll apply that one tomorrow morning and get back to you.

    Thanks!

    July 20th, 2010 @ 05:39 AM

  3. lindsay.kay (at xeolabs)
  4. lindsay.kay (at xeolabs)
    lindsay.kay (at xeolabs)
    • State changed from open to resolved

    August 3rd, 2010 @ 11:57 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.