-
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
Fix Terrain Lockups in requestTileGeometry due to Promise Handling Inconsistencies #11630
Fix Terrain Lockups in requestTileGeometry due to Promise Handling Inconsistencies #11630
Conversation
Thanks for the pull request @marcejohnson!
Reviewers, don't forget to make sure that:
|
Thanks for the Pull Request @marcejohnson!
Yes, this will help with testing. Please share this with support@cesium.com and/or gabby@cesium.com. Thanks! |
Done! I've sent the Sandcastle example to your email as requested, @ggetz. It demonstrates the intermittent lockup issue that the PR aims to address. |
cesium-concierge asked:
This PR addresses a break/fix without new features, emerging from specific terrains in integration tests. Existing unit tests suffice for current functionalities, so no new tests were added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marcejohnson! Testing is working well on the dataset you supplied.
Here is an alternative data source I used for testing. This was a terrain dataset which helped us identify an issue with the previous attempted fix. The fix here does not cause any issues with loading that dataset 👍.
Co-authored-by: Gabby Getz <gabby@cesium.com>
@ggetz I made all the changes based upon your code review for implicit promise handling, committed these, resynced with the base branch, and re-tested against our private problem terrain. All thumbs up on our side! Please let me know if there's anything else needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick run-through of Gabby's testing Sandcastle, as well as the other Terrain-related Sandcastles. Everything works well on my machine.
Thanks @marcejohnson!
Context
We observed that complex terrains sometimes cause CesiumJS to lock up or freeze. This issue was traced back to inconsistencies in promise handling within the
requestTileGeometry
function, particularly when dealing withundefined
promises.Proposed Solution
In this PR, we've enhanced the promise handling mechanism within
requestTileGeometry
. The updated logic ensures proper handling ofundefined
returns, preventing a recursive code path leading to terrain lockups.Demonstration
We have set up a private Sandcastle example to demonstrate the problem. This can be shared upon request.
Impact
This change is crucial for applications dealing with complex terrains. It enhances the stability of CesiumJS and eliminates a cause of freezes.
Related
Note: Thank you for looking at this. This PR is open for discussion and feedback from the Cesium community and maintainers.
Checklist
coverage
,release-tests
,deploy
,node-16
, andlint
.CLA
andCHANGES.md
requirements are met.