three-d icon indicating copy to clipboard operation
three-d copied to clipboard

Warning when running on the browser / crash in debug mode

Open arximboldi opened this issue 1 year ago • 5 comments

I get this warning:

WebGL warning: drawElementsInstanced: type: Invalid enum value 0 (Did you typo `gl.SOMETHINGG` and pass `undefined`?) 

Things otherwise work well. However this warning turns into an assertion in debug builds, which causes the program to crash very inconveniently.

arximboldi avatar Apr 24 '24 15:04 arximboldi

What exactly are you doing to get this warning? Does it happen in one of the examples or can you provide a code snippet that produce this?

Also, what browser do you use?

asny avatar May 05 '24 10:05 asny

Sorry for the late reply. This is happening to me with all browsers. I am rendering a three_d::Mesh with a three_d::ColorMaterial, using F32 samples and U32 indices.

I am trying to run the examples to see if I can reproduce it there, but I am getting the following error when running npm run serve as suggested in the README.

ERROR in ./index.js 8:0-32
Module not found: Error: Can't resolve './pkg/web.js' in '/home/raskolnikov/dev/dusty/three-d/web'
resolve './pkg/web.js' in '/home/raskolnikov/dev/dusty/three-d/web'
  using description file: /home/raskolnikov/dev/dusty/three-d/web/package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /home/raskolnikov/dev/dusty/three-d/web/package.json (relative path: ./pkg/web.js)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        /home/raskolnikov/dev/dusty/three-d/web/pkg/web.js doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        /home/raskolnikov/dev/dusty/three-d/web/pkg/web.js.js doesn't exist
      .json
        Field 'browser' doesn't contain a valid alias configuration
        /home/raskolnikov/dev/dusty/three-d/web/pkg/web.js.json doesn't exist
      .wasm
        Field 'browser' doesn't contain a valid alias configuration
        /home/raskolnikov/dev/dusty/three-d/web/pkg/web.js.wasm doesn't exist
      as directory
        /home/raskolnikov/dev/dusty/three-d/web/pkg/web.js doesn't exist

arximboldi avatar Jun 11 '24 10:06 arximboldi

Note that in spite of the warning, things are working properly for me in release. I would suggest to keep the error as a warning in Debug mode, as panicking is too harsh completely stopping the application and not allowing me to debug other things.

arximboldi avatar Jun 11 '24 10:06 arximboldi

Hmm. It's very hard for me to debug this issue. You need to provide a minimal example. Do you use a special 3D model or something?

I am trying to run the examples to see if I can reproduce it there, but I am getting the following error when running npm run serve as suggested in the README.

Seems like the automatically generated files could not be found, did you run all the suggested commands in the Readme?

asny avatar Aug 23 '24 07:08 asny

Pinging @kdoh-dustyrobotics see if he can do it in the future, as he owns now the code-base where this used to (does?) happen.

arximboldi avatar Sep 02 '24 12:09 arximboldi