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
Uncaught TypeError: Cannot read property 'length' of undefined #1907
Comments
|
the loop iterates twice. the first iteration they do, the second they dont, causing the above exception. |
@alteredq any ideas? he's referring to this line: |
I'm not sure I understand what exactly is the problem reported here - does it work ok when you run it, just there are some troubles if you debug it? |
yes it still works in the end, but it still gives an exception. you prefer to know than not right? |
Could you please clarify - does it throw exception just when you debug it or also when you run it normally? Also would it be possible to put somewhere complete example so that we could reproduce the issue? This whole thing seems weird, we are speaking about some of the most used code in whole lib, virtually every example, every application uses this and so far there were no problems, so I would like to understand what's going on. Obviously you do something somewhere differently than anybody else so far. |
ok, false alarm. i just tried to reproduce the bug with a very simple page and it doesn't happen. But i can reproduce it when i compile the same simple page in javascript from haxe. So i guess haxe must be breaking something with all the stuff it performs at initialization. please ignore |
Next time, mention the Haxe bit on the first post ;) |
didn't think haxe init code interacted with three.js in any way. ;) |
Hello, Yes, it's still revision 48 but I have to modify heavely my code with the changes you made to the axis of the planeGeometry in revision 49. if i look the code, the problem come from an empty THREE.Scene.__objectsAdded, but i don't know how to solve it. |
Why heavily? Shouldn't be an easy change? |
not so heavily, now it is done. i have just some difficulties with the axis. |
I'm still having this issue with geometry generated using PlaneGeometry, both in R61 and R62. The error is only logged a single time. Execution continues and there seem to be no ill effects. |
am getting same issue while creating circle......any help? |
For me, this happened when I used the same geometry instance for 2 different webgl contexts. |
Hello,
i have a simple scene that simply creates 3 lights and adds a cube to the scene.
when i debug the code i get an exception in chrome:
Uncaught TypeError: Cannot read property 'length' of undefined
in the function:what seems to happen is the function scene.addObject goe son to loop on geometrygroups:
the cube seems to have 2 geometry groups. the first iteration goes on by fine and has the properties "faces3" and "faces4". but the second call does not have them in the chrome debugger, and hence the error above.
hope this helps.
note: this is r49
scene code:
The text was updated successfully, but these errors were encountered: