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
Browser hangs when drill-picking particle system #7254
Comments
Yikes. The whole browser tab becomes un-responsive, just from mouse-over of the particle system. |
We've seen this problem before (for other primitives). If I had to guess, the problem is that drillPick isn't hiding the particle system after it's picked and so it just goes into an infinite loop of repicking the same thing over and over again. |
Reported on the forum - https://community.cesium.com/t/drillpickfromray-will-crash-the-browser/19603/2. |
Also reported by @3DGISKing in #10837. |
@DoubleYellowEgg Contributions are welcome! We'd be happy to review a PR fixing this issue. |
This was brought up in the forum at https://community.cesium.com/t/no-repair-this-bug/24363 It obviously hangs in an infinite loop at cesium/Source/Scene/Picking.js Line 502 in 9df6a6b
Even without a deep understanding of what is happening in this code, what the intended behavior is, and how to achieve the intended behavior, a simple suggestion to at least prevent the browser from completely hanging up would be to pass a 'limit' to the call, as in
The "pickedObjects" will contain the same object 100 times then, but ... addressing that could be a next step. (One could think that it shouldn't be sooo hard to fix this. And I know, the picking in CesiumJS has ... ... some complexities, and it's therefore impossible to know how hard it is to really fix this without affecting other cases of |
@javagl Having not looked at the modern source code, my memory from ~2019 is that the way Drill Picking works is to continue removing picked objects and picking (rendering for pick) again in that loop until nothing is left. It certainly seems reasonable that an upper limit (perhaps with some large default value, configurable) might be an easy sanity check to put here. Also, if the loop picks an object on one iteration, removes it, and then somehow manages to pick the same object again on the very next iteration, that's a clear sign of an infinite loop (as well as a bad assumption about whether the object was really removed). That should be detected and reported as an internal error of some kind. |
The |
Sandcastle example:
Sandcastle example
Browser:
Chrome v70.0.3538.77
Operating System:
windows 10
The text was updated successfully, but these errors were encountered: