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

Undefined 'quadDetails' #8003

Closed
njrivera opened this issue Jul 15, 2019 · 5 comments
Closed

Undefined 'quadDetails' #8003

njrivera opened this issue Jul 15, 2019 · 5 comments

Comments

@njrivera
Copy link
Contributor

njrivera commented Jul 15, 2019

I'm seeing a quadDetails is undefined error from our app when zooming in too far or rotating the map in such a way that brings the camera super close to the map. The sandcastle below should give the same error. However, the strange thing is that I can't get the error on sandcastle when the browser window is small or on my laptop. On my bigger monitor, however, it is consistent.

I see that the error is coming from this line -> https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/QuadtreePrimitive.js#L901, and it seems that a simple if (!quadDetails) return; fixes the issue. Although, it might be a hacky solution, and I'm not sure where exactly the problem is coming from.

I tried reproducing the issue with version 1.51 and it seems to still freeze, but without the error.

Sandcastle example:
https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=jZA9a8MwEIb/ivASh5Rz03aLYgKeCoUOpZ20KMrFPiLrjCQ7JKX/vbJNoR9Lb3m5j+cZbtBeDIRn9GIrHJ5FhYH6Ft6mWb4wU1uxi5oc+sVyo5xyQ6JMAmYSjG7R62lj4MrcPrrcQMeBIrGrtI9ce901ZKBBqps4WgxY5tNrl6/hfrYe2eejmZL5dpNCiocxV6uleFdOpPqfXhTiblR+KJfdZDLEi8VyFuyo7dhH0XubAxQR287qiKHY9+aEEUwIIymLL0geaBB02Krs1ytUJozVIaTNsbf2ha6oslIW6f4HZlkfyNXPA3qrL+NJsy6f5iEAyCK1f6nIbPfafzN+Ag

Browser:
Chrome, FF
Operating System:
Windows 10

@njrivera njrivera changed the title Undefined quadDetails Undefined 'quadDetails' Jul 15, 2019
@jbo023
Copy link
Contributor

jbo023 commented Jul 16, 2019

Hi,

we also have the same issue, the problem is in the following line: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/QuadtreePrimitive.js#L658

Would the solution from @njrivera be a good idea ?

@kring
Copy link
Member

kring commented Jul 17, 2019

Yes that solution makes sense to me. It might not be a bad idea to add:

traversalDetails.allAreRenderable = true;
traversalDetails.anyWereRenderedLastFrame = false;
traversalDetails.notYetRenderableCount = 0;

before returning. Mind opening a pull request with that change?

@yaozhihang
Copy link

Hi @kring
The three setter functions reset the default values of the variables allAreRenderable, anyWereRenderedLastFrame, and notYetRenderableCount.
Are there any side-issues if the three setters-functions are not called before returning?

@njrivera
Copy link
Contributor Author

njrivera commented Jul 17, 2019

From the line that @jbo023 mentioned, it seems that replacing the 30 with 31 seems to also fix the issue. I'm wondering if that would be a better solution. I was logging that size as I was zooming in and out and it seems to get very close to 30 when I zoom in a lot, it gets to 30 when super close to the map, and it doesn't seem to ever go over 30

@hpinkos
Copy link
Contributor

hpinkos commented Sep 19, 2019

Fixed in #8011

@hpinkos hpinkos closed this as completed Sep 19, 2019
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

5 participants