#124 ✓resolved
lindsay.kay (at xeolabs)

0.7.6 live examples blank canvas in Chrome 5.0.375.99

Reported by lindsay.kay (at xeolabs) | July 20th, 2010 @ 12:47 AM | in V0.7.7

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).

Comments and changes to this ticket

  • Carl Witty

    Carl Witty July 20th, 2010 @ 05:18 AM

    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.

  • lindsay.kay (at xeolabs)

    lindsay.kay (at xeolabs) July 20th, 2010 @ 05:39 AM

    Nice one Carl, patch looks good.

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

    Thanks!

  • lindsay.kay (at xeolabs)
  • lindsay.kay (at xeolabs)

    lindsay.kay (at xeolabs) August 3rd, 2010 @ 11:57 PM

    • State changed from “open” to “resolved”

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.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

SceneJS provides easy access to WebGL through a simple and declarative JavaScript API. The SceneJS API is functional, which enables its scene definitions to be really compact and expressive, while hooking into other JavaScript code just that little bit more smoothly.

Shared Ticket Bins

People watching this ticket

Attachments

Referenced by

Pages