-
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
8321/polyline crash #8546
8321/polyline crash #8546
Conversation
Thanks for the pull request @Samulus!
Reviewers, don't forget to make sure that:
|
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.
Nice fix! Mostly small style comments and one larger organizational idea from me.
Also, is it possible to find a reproducible test case that could be unit tested? |
Epic, I'll try swapping over our production to this release, hopefully there's nothing incompatible going on in master besides this fix :) If it's fixed I should see no more occurrences from today on, I'll know by wednesday next week for sure. |
Hm I can't get master to work, something changed with |
@tinco not sure about your setup, but see https://github.com/AnalyticalGraphicsInc/cesium-webpack-example/blob/master/webpack.config.js for a known working configuration with ES6 versions of Cesium. (That whole repository is a standalone example with both debug and release configs, I linked to the debug one I think) |
64eee34
to
17236a3
Compare
Just tested master on that repo @mramato, it fails there as well, so I guess something really is broken on master for webpack! |
17236a3
to
8c9f01e
Compare
@tinco I was unable to reproduce. To avoid derailing this issue, can you write up an issue at https://github.com/AnalyticalGraphicsInc/cesium-webpack-example/issues with details. Thanks! |
@lilleyse I think that the |
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.
Bunch of small suggestions. The new approach looks really clean.
Source/Scene/Polyline.js
Outdated
* Gets the destruction status of this polyline | ||
* @memberof Polyline.prototype | ||
* @type {Boolean} | ||
* @default undefined |
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.
* @default undefined | |
* @default false |
polylines.remove(secondPolyline); | ||
polylines.update(scene._frameState); |
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.
polylines.update(scene._frameState); | |
polylines.update(scene.frameState); |
|
||
expect(polylines._polylinesToUpdate.length).toEqual(2); | ||
|
||
polylines.remove(secondPolyline); | ||
polylines.update(scene._frameState); |
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.
polylines.update(scene._frameState); | |
polylines.update(scene.frameState); |
Oh, and please update |
@lilleyse All comments addressed 👍 |
…for loops [skip ci]
[skip ci]
7f4a3a1
to
080a3fa
Compare
Looks great, thanks @Samulus! |
Fixes #8321
This crash is caused by
polyLinesToUpdate
becoming out of sync withpolyLines
. If the position of a polyLine is marked as dirty (i.e.position = ....
is invoked) and the polyline is marked for removal, the polyLine will remain in the polyLinesToUpdate array, but not the main polyLines array. The arrays become out of sync and a failure occurs when we try to update a deleted polyLineTested on Linux / Nvidia
Test case here: http://localhost:8080/Apps/Sandcastle/index.html#c=lZJPb5wwEMW/yohLWGllkuyty64akUukSKnUP5eSgwOzWyvGRmPDilb73TtgWEKiHsrJ9rx583s2rSRoFZ6QYAcGT5ChU00lfgxn8VUxbDNrvFQG6Wq1zU1uWu4qrNZYeGXNsvOL1Z1mbXapx31TGCJcgQZFTapSXrXohCzLeLYK9kkCGaH0CPVo5oDw2GhJusuNQ/9gPFIrdVwMumnmGm6ug8WhMYFtKYhX8Cc3wF8fYXLnADPCQDSK+q+2TvXn7tOUMJPkeSXNRhzIVvd4JER3RyS7+Oc1M6zhdg2b51UwOQeifsnBvtdlCDa6gj14NDNTM9SnfEz2Nu0l1ZwjIIYcYnbd/TfsdqSd73AkvmNAAgleVXzBzts6QCpzBGlKfpnKthjkDPuNZbbx/2ItNEq6BFqmnRgG3fwgYUA8pVyQDqjn3ETrKHW+07gPxc+qqi15aEjHQiQeq1rzJJe8NMUrelE413emydSUlqoFVe7y6N0vn0fMLJ3jyqHR+qv6jXm0TxPWL9q0lSVfyVOLpGXXS37d7B/DoRAiTXj7sctbq18kvXH8Cw