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

Disabling casting shadows on one from multiple lights crashes the renderer #17802

Closed
4 of 13 tasks
moskopio opened this issue Oct 23, 2019 · 3 comments
Closed
4 of 13 tasks
Labels

Comments

@moskopio
Copy link

Description of the problem

Given a scene that contains multiple light sources, disabling casting shadows on only one of the lights will result with renderer crashing.

StackTrace:

three.js:16521 Uncaught TypeError: Cannot read property 'toArray' of undefined
    at flatten (three.js:16521)
    at PureArrayUniform.setValueM4Array [as setValue] (three.js:16999)
    at Function.WebGLUniforms.upload (three.js:17248)
    at setProgram (three.js:25307)
    at WebGLRenderer.renderBufferDirect (three.js:24041)
    at renderObject (three.js:24802)
    at renderObjects (three.js:24772)
    at WebGLRenderer.render (three.js:24549)
    at render ((index):111)

This problem started occurring from version r108. In r107 the problem does not occur.

Examples:

  • jsfiddle (r109, clicking on 'shadows' will crash the renderer)
  • jsfiddle (r107, clicking on 'shadows' will work properly)
Three.js version
  • r108
  • r108
  • r107
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
@Mugen87 Mugen87 added the Bug label Oct 23, 2019
@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 23, 2019

Actually, I can not reproduce with latest dev version:

https://jsfiddle.net/ewhgdyk4/1/

@moskopio Can you please verify?

@moskopio
Copy link
Author

https://jsfiddle.net/pbkx9mwg/ is running using r109 and crash does happen on this version.

However, it does work fine on https://jsfiddle.net/ewhgdyk4/1/ which is using latest dev 👍

Thank you @Mugen87 !

@mrdoob mrdoob closed this as completed Oct 23, 2019
@Mugen87
Copy link
Collaborator

Mugen87 commented Oct 24, 2019

I'm glad this issue is already resolved 😅

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

No branches or pull requests

3 participants