Skip to content
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

Crash when picking and switching terrain provider #6916

Closed
hpinkos opened this issue Aug 13, 2018 · 1 comment
Closed

Crash when picking and switching terrain provider #6916

hpinkos opened this issue Aug 13, 2018 · 1 comment

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Aug 13, 2018

Can be a pain to reproduce because it only happens sometimes, but here are the steps:

  • wait for globe to load ellipsoid terrain
  • click Enable Terrain button and immediately move the mouse
  • scene.pick causes a crash. We're executing some kind of command that is already destroyed.
var viewer = new Cesium.Viewer('cesiumContainer');

var hpr = new Cesium.HeadingPitchRange(0, -0.5, 5000);
var scene = viewer.scene;

var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
handler.setInputAction(function(movement) {
    var pickedObject = scene.pick(movement.endPosition);
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);

viewer.camera.lookAt(Cesium.Cartesian3.fromDegrees(-90.5974899906479, 32.03876681766648, 85), hpr);

Sandcastle.addToolbarButton('Enable Terrain', function() {
    viewer.terrainProvider = Cesium.createWorldTerrain();
});
Sandcastle-client.js:120 Uncaught DeveloperError: This object was destroyed, i.e., destroy() was called.
Error
    at new DeveloperError (http://localhost:8080/Source/Core/DeveloperError.js:43:19)
    at VertexArray.throwOnDestroyed (http://localhost:8080/Source/Core/destroyObject.js:45:19)
    at continueDraw (http://localhost:8080/Source/Renderer/Context.js:997:12)
    at Context.draw (http://localhost:8080/Source/Renderer/Context.js:1034:9)
    at DrawCommand.execute (http://localhost:8080/Source/Renderer/DrawCommand.js:523:17)
    at executeCommand (http://localhost:8080/Source/Scene/Scene.js:2075:25)
    at executeCommands (http://localhost:8080/Source/Scene/Scene.js:2285:17)
    at executeCommandsInViewport (http://localhost:8080/Source/Scene/Scene.js:2852:9)
    at updateAndExecuteCommands (http://localhost:8080/Source/Scene/Scene.js:2700:13)
    at Scene.pick (http://localhost:8080/Source/Scene/Scene.js:3531:9)
@hpinkos
Copy link
Contributor Author

hpinkos commented Aug 13, 2018

@bagnell any ideas here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant