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

Dynamic entities expect to live forever? #8159

Open
OmarShehata opened this issue Sep 14, 2019 · 4 comments
Open

Dynamic entities expect to live forever? #8159

OmarShehata opened this issue Sep 14, 2019 · 4 comments

Comments

@OmarShehata
Copy link
Contributor

This came up in this forum thread.

This is an entity with an ellipsoid with a dynamic radius. Trying to change it to an ellipse at run-time crashes because the geometry updater expects the entity to always be defined.

Sandcastle link.

This works fine if the ellipsoid is not dynamic. This seems to be a problem with all dynamic entities. Originally, when I asked why CesiumJS was designed to have one abstract "entity" with properties for each geometry type, instead of just creating new PolygonEntity(), the reason was that an Entity can be one shape, multiple shapes at the same time, or different shapes across time.

So I think it makes sense to consider this a bug, that you can't get rid of dynamic entities by setting them to undefined.

@mramato
Copy link
Contributor

mramato commented Sep 14, 2019

So I think it makes sense to consider this a bug, that you can't get rid of dynamic entities by setting them to undefined.

I'm not sure why there is any question about this, it's a straight up bug. Probably a regression introduced way back in #6239

Should be an easy fix.

@OmarShehata
Copy link
Contributor Author

I was just surprised none of the geometry updater classes were ever checking for this.

@mramato
Copy link
Contributor

mramato commented Sep 14, 2019

The check happens at a higher level once the definition of the entity changes, so DynamicEllipsoidGeometryUpdater.update should never even be called. That's what the bug is here, the updated isn't properly going away when the ellipsoid gets set to undefined.

I triaged it and there's definitely a bug in the entity heuristics that thinks the geometry is still dynamic after it is nulled out. Should be an easy fix once we find the root cause (it's almost certainly in the centralized code that manages all updaters so fixing it for one will fix it for all)

@rropp5
Copy link
Contributor

rropp5 commented Nov 22, 2022

I ran into this problem today and unfortunately the only workaround I see is to delete and create a new entity when the geometry data changes.

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

No branches or pull requests

3 participants