satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

WebGL warnings and errors in online mode only #107

Closed satoshinm closed 7 years ago

satoshinm commented 7 years ago

Although they were all fixed in offline mode (https://github.com/satoshinm/NetCraft/pull/53), there are two WebGL: INVALID_OPERATION errors when connecting online (test with #localhost appended to the URL, and running a server):

websocket inputs, host=localhost, port=4081
craft.js:1705 websocket url: ws://localhost:4081/craftws
craft.js:2196 main loop blocker "main_init" took 1030 ms
craft.html:1245 client_sendall: Resource temporarily unavailable
craft.html:1245 exit(1) called, but noExitRuntime, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)
craft.js:8077 WebGL: INVALID_OPERATION: vertexAttribPointer: no ARRAY_BUFFER is bound and offset is non-zero
craft.js:8615 WebGL: INVALID_OPERATION: drawArrays: no buffer is bound to enabled attribute
craft.html:1245 client_sendall: Resource temporarily unavailable
craft.html:1245 exit(1) called, but noExitRuntime, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)
craft.html:1245 client_opened: 6 0x9138
satoshinm commented 7 years ago

Curiously, the GL errors seem to go away, or occur less often, if I #define USE_CACHE 0 (for https://github.com/satoshinm/NetCraft/issues/2).

satoshinm commented 7 years ago

The "Resource temporarily unavailable" socket errors are from sending client position. Maybe sending it too soon. See also https://github.com/satoshinm/NetCraft/issues/47 Websocket errors (ECONNREFUSED) should be handled gracefully

satoshinm commented 7 years ago

A bunch of WebGL errors occur if attempting to connect to a non-existent server, and the sky is pitch black