-
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
Cesium crashes when removing multiple dataSources #9154
Comments
It's very interesting that both of these issues include satellites. What primitives (graphics) are you using to visualize them? Maybe there's an infrequently-used graphic type that has cleanup bugs. |
I believe the issue might reside with using polylines in the CZML. Both issues are displaying that in the stack trace and the application was working correctly before they were introduced into the CZML. |
@icarter09 are you able to reproduce this in Sandcastle? |
Currently I am not since I don't have access to the exact same CZML files by way of Sandcastle. Also I forgot mention that removing N dataSources works correctly for non-sat CZML files that I am using. Comparing the sat to the non-sat files, I am noticing the polylines being contained within the sat CZML files, while they are not contained in the non-sat CZML files. |
Another point to note is that is also occurring with |
You can upload your CZML to Cesium ion (https://cesium.com/ion) and then you can use it in Sandcastle. You'll see a "Open complete code example" button under the asset preview window (as shown here https://cesium.com/docs/tutorials/import-photogrammetry/#visualizing). |
@OmarShehata sorry but that isn't going to work for me due to work constraints. I'll have to come up with a test one and then use the steps you provided. |
Any update on this issue? I've updated to Cesium 1.74 and still experiencing this issue. As previously stated, I'm unable to provide the CZML files. I've also pinpointed the issue to being related to polylines associated within a given CZML. Update: I have also pinpointed the issue only occurs when two of the CZML files (dataSources) both have polylines associated with them. Test cases: |
@OmarShehata an example of the issue at hand has been provided on #7632 |
I found @icarter09's observation to be true. remove() and removeAll() only fail when two CZMLs have been added to where both have poylines. @icarter09 have you found a workaround? I need to finish updates to my application and this is a blocker. |
@Trylor A work around that I have found is wrap the logic in a timeout to hide all the given entities for the given dataSource you are looking to remove. Then set that entities._entityCollection._entities array to an empty array. The timeout should allow you to iterate over all the dataSources. That should also allow you to track future dataSources based upon if they have values in the array you emptied out. The issue here is that the dataSources keep adding on, but since |
@icarter09 Thanks! I was just about to try a variation of that and then I saw your comment. Hopefully, this bug gets fixed soon. |
I guess, I faced the same weird issue and get the same error:
And I can confirm that it happens when at least two CZMLs having polylines are in data sources. The error is thrown for me even if the only one of them is removed. Unfortunatelly, I can't reproduce it in a mini repo yet. Need to investigate more to narrow down the problem. |
@OmarShehata, thanks to @Trylor we already have the issue reproduced in Sandcastle. |
After few hours of investigation things didn't become clear for me but let me write down what I get in hope it will help someone to solve the problem:
Given mentioned above it may be some kind of concurrency or Cesium transpilation related issue. @Trylor @icarter09 Which version of Cesium do you use, guys? |
Any update on this issue? |
Resolved in #11640 |
Remove PolylineCollections from the Scene before they are destroyed. This causes CesiumGS#7758 and CesiumGS#9154.
Using CZML data sources to display satellites, I am able to remove one datasource from viewer.dataSources. But when I attempt to remove N datasources, Cesium fails. I have linked to this ticket which explains the exact issue I'm running into.
#7632
I'll try to create a Sandcastle example of this.
Browser: latest Chrome
Operating System: Windows 10
The text was updated successfully, but these errors were encountered: