Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when running on the browser / crash in debug mode #455

Open
arximboldi opened this issue Apr 24, 2024 · 5 comments
Open

Warning when running on the browser / crash in debug mode #455

arximboldi opened this issue Apr 24, 2024 · 5 comments

Comments

@arximboldi
Copy link

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 arximboldi changed the title Warning when running on the browser Warning when running on the browser / crash in debug mode Apr 24, 2024
@asny
Copy link
Owner

asny commented May 5, 2024

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?

@arximboldi
Copy link
Author

arximboldi commented Jun 11, 2024

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
Copy link
Author

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.

@asny
Copy link
Owner

asny commented Aug 23, 2024

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?

@arximboldi
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants