-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
TypeError: Cannot set property 'geometry' of undefined #5947
Comments
@CHBaker Can you give us an example KML file that causes the error? Otherwise it's going to be really difficult for us to reproduce |
@hpinkos the problem is it's a kml stream, when it was static it worked fine |
@CHBaker Gotcha. It's likely an async problem. The previous function loadKml() {
this.kml$.load('http://..../rest/kml/accept/all', this.options)
.then(function() {
setInterval(() => {
loadKml();
}, 1500);
}
} It would be really helpful for us to debug if you could share 2 sequential KML files that cause the crash. Thanks! |
@hpinkos hmmm. I tried that, and no error would occur but the kml would not load. I'm sorry I do not have permission to share the kml. All I can say is that it plots lines on the globe :/ I could get it working with an inconvenient interval:
after testing, it seems 5 seconds is the shortest time before the error occurs |
Is there a better way to lad kml updates than setting an interval, maybe? |
KML has built in network link functionality. Have you tried loading a document that contains one instead of trying to reimplement it yourself? Something like this
|
hmm, @tfili no I've actually never seen network link functionality, I suppose I could give it a shot. Do I have to lay those within the cesium tags? On the other hand is there some sort of hook I can wait for before running the initial source or the intervals? because even when I set a timeout of 10 seconds, it sometimes fails |
Closing this since we don't have a way to reproduce the error. @CHBaker if this is still a problem for you feel free to reopen the issue. |
@NichijouCC do you have Sandcastle code example that reproduces the crash? I think this might be a geometry error, not an error in PrimitivePipeline |
I get this too #5947 (comment) |
Note that this crash has nothing to do with KML or CZML, so much of the above commentary is a distraction. Here is a Sandcastle that reproduces the crash using the entity layer directly: Now, before you get worked up about how I'm injecting code into The root of the crash here is that we are creating geometry on the worker, but while the asynchronous creation is in flight, we delete one of the entities. Deleting the entity causes the batch to remove the geometry instance here: Because However, the lengths are mismatched - we have more So, to reproduce this in the Sandcastle, I need to make sure that the delete happens while it's in the |
I'm not sure which is the right fix. It seems dangerous for the batch to be directly manipulating the Alternatively we could change |
I'm rendering Cesium with Angular-Cesium. But this problem also occured when just running Cesium.js, which is Why I'm also posting here.
I'm rendering a kml stream and updating it every 1.5 seconds. Sometimes, it loads perfectly, no errors, and sometimes I get the error below. this is with no code changes. Also, If I set the interval to 10 seconds, It seems to solve the problem as far as I can tell... But of course, I'm trying to get an interval of 1.5 seconds.
My code is really simple, here is my Angular code. Notice the
AfterViewInit
hook.The text was updated successfully, but these errors were encountered: