kripken / BananaBread

BananaBread is a C++ 3D game engine that runs on the web using JavaScript+WebGL+HTML
1.38k stars 347 forks source link

Uncaught Failure: Invalid glGetString value: 34932 in chromium #9

Closed DirtYiCE closed 12 years ago

DirtYiCE commented 12 years ago

I've tried to run the demo at developer.mozilla.org using chromium (22.0.1229.2 (150678)) on Gentoo Linux amd64, but I got the following error (run the game with ,debug to get a meaningful backtrace...)

Uncaught Failure: Invalid glGetString value: 34932 bb.debug.js:347642
_glGetString bb.debug.js:347642
_glGetString bb.debug.js:348970
__ZL16compileasmshaderjRjPKcS1_S1_bb bb.debug.js:221770
__ZN6Shader7compileEv bb.debug.js:221376
__Z9newshaderiPKcS0_S0_P6Shaderi bb.debug.js:222255
__Z6shaderPiPcS0_S0_ bb.debug.js:223430
__ZL7runcodePKjR6tagval bb.debug.js:29319
__Z7executePKc bb.debug.js:29781
__ZL12loadshaders2v bb.debug.js:219965
_emscripten_set_main_loop.wrapper bb.debug.js:350316

I've grepped for that value and found that it's an nVidia and ARB extension (I'm using the binary nvidia driver 295.71):

glext.h:#define GL_PROGRAM_ERROR_STRING_ARB       0x8874
glext.h:#define GL_PROGRAM_ERROR_STRING_NV        0x8874

It works fine using firefox 15.0 on the same machine however.

kripken commented 12 years ago

This sounds like a bug in chromium. But I've tested chrome (not chromium) 22.0.1229.8 and it worked for me.

The error reported isn't the real problem, though, I suspect - it is erroring when trying to print the problem. My suspicion is that a shader failed to compile, which led to trying to do this.

The shader should compile ok though given it works on firefox on the same machine. So perhaps it is some combo of chrome + your gl driver - which GPU and drivers are you using?

DirtYiCE commented 12 years ago

Hmm, it indeed fails to compile some shader:

Failed to compile shader:  game-setup.js:12
Info: {"type":35632,"ftransform":false} game-setup.js:12
Enable GL_DEBUG to see shader source game-setup.js:12
[STDOUT] Cannot compile fragment shader game-setup.js:9
[STDOUT] WARNING: No texture rectangle support. (no full screen shaders) game-setup.js:9

I also get a lot of getProcAddress failed errors...

I'm using the binary nvidia driver (295.71, since the 300 series is unusable with any fullscreen stuff...) with GeForce GT 320M card (no optimus).

DirtYiCE commented 12 years ago

I've looked at the stdout of chromium and found out it can't open /dev/nvidiactl. Here is a bugreport (that blank screen problem didn't occur to me, but the --disable-gpu-sandbox seems to solve the problem. However I only see the image in the up left corner instead of scaling it to the whole screen (like in ff, using low res) and the game starts to freeze for a few moments randomly as soon as a bot connects...). I think it can be closed as chromium bug...

kripken commented 12 years ago

The fullscreen and freezes (of a few seconds) are known chromium bugs on this demo, reported upstream.