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

Exception: Cannot read property 'point' of undefined #116

Open
kennethjiang opened this issue May 15, 2017 · 6 comments
Open

Exception: Cannot read property 'point' of undefined #116

kennethjiang opened this issue May 15, 2017 · 6 comments
Labels

Comments

@kennethjiang
Copy link
Owner

Stack trace:
/static/webassets/packed_plugins.js in QuickHull.computeExtremes at line 12890:34
/static/webassets/packed_plugins.js in QuickHull.computeInitialHull at line 12948:33
/static/webassets/packed_plugins.js in QuickHull.compute at line 13306:14
/static/webassets/packed_plugins.js in QuickHull.setFromPoints at line 12641:14
/static/webassets/packed_plugins.js in new ConvexBufferGeometry at line 13684:37
/static/webassets/packed_plugins.js in new ConvexGeometry at line 13662:29
/static/webassets/packed_plugins.js in hullPointsFromGeometry at line 31507:26
/static/webassets/packed_plugins.js in Object.box3FromObject at line 31589:46
/static/webassets/packed_plugins.js in Object.box3FromObject at line 31638:48
/static/webassets/packed_plugins.js in STLViewPort.self.addModelOfGeometry at line 31844:37
/static/webassets/packed_plugins.js at line 31824:18
/static/webassets/packed_plugins.js at line 11765:13
/static/webassets/packed_plugins.js in XMLHttpRequest. at line 8981:298

@kennethjiang
Copy link
Owner Author

@eyal0 This exception happened to one of the users. Do you have any clue what could have been the cause of it?

@eyal0
Copy link
Collaborator

eyal0 commented May 15, 2017

Deep inside QuickHull, which isn't even code that I wrote. I got it from the three js examples.

Maybe the STL file was invalid? If it's repeatable, maybe the user can send you the STL file?

Compute initial hull tries to find the initial 4 sided shape to grow into a convex hull. Maybe there are less than 4 points in the shape, which is an illegal shape. Or maybe the shape is entirely flat, also illegal.

See if you can get the STL file.

@kennethjiang
Copy link
Owner Author

Got it! thx @eyal0 ! This error doesn't seem to happen often. Will keep an eye on it.

@kennethjiang
Copy link
Owner Author

Has not happened frequently. Closing it baed on the assumption it is one-off/browser-specific issue.

@kennethjiang
Copy link
Owner Author

This error occurs at the rate about 1 user/week. Impact all browsers.

@kennethjiang kennethjiang reopened this Jun 1, 2017
@eyal0
Copy link
Collaborator

eyal0 commented Nov 21, 2017

I think that this is due to invalid STL. I tried chopping a file on my fork and made a layer so thin that it was one dimensional and it failed on QuickHull.

QuickHull tries to make a valid, 3D, convex hull. If the shape has all points in one plane, it can't make a volume from that and fails.

QuickHull is only used to find the minimum set of points that we need for computing the bounding box. If it fails, we can fall back to just using all the points of the object. I made a commit for that. (Ignore the min.js changes.) It looks but but most of the changes are whitespace. It's just adding a try-catch.

If you still get these complaints, maybe try that solution and see if the number reduces?

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

2 participants