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

DeveloperError when using zoomIn function in 2D mode #1432

Closed
ghost opened this issue Feb 4, 2014 · 1 comment · Fixed by #1437
Closed

DeveloperError when using zoomIn function in 2D mode #1432

ghost opened this issue Feb 4, 2014 · 1 comment · Fixed by #1437

Comments

@ghost
Copy link

ghost commented Feb 4, 2014

When performing zoom-in in 2D mode, using the zoomIn() function, after a few calls to the function, a DeveloperError occurs.

for example, when using a button to call the following code in the Sandcastle:

function zoomIn(){
    viewer.scene.getCamera().controller.zoomIn();
}

after zooming a few times the program stopped working and gave me the next error:

An error occurred while rendering. Rendering has stopped.
DeveloperError: right must be greater than left.
Error
at new DeveloperError (http://cesiumjs.org/Cesium/Source/Core/DeveloperError.js:37:17)
at update (http://cesiumjs.org/Cesium/Source/Scene/OrthographicFrustum.js:107:23)
at OrthographicFrustum.getPixelSize (http://cesiumjs.org/Cesium/Source/Scene/OrthographicFrustum.js:295:9)
at UniformState.update (http://cesiumjs.org/Cesium/Source/Renderer/UniformState.js:263:40)
at Scene.render (http://cesiumjs.org/Cesium/Source/Scene/Scene.js:889:12)
at CesiumWidget.render (http://cesiumjs.org/Cesium/Source/Widgets/CesiumWidget/CesiumWidget.js:542:25)
at Viewer.render (http://cesiumjs.org/Cesium/Source/Widgets/Viewer/Viewer.js:701:28)
at render (http://cesiumjs.org/Cesium/Source/Widgets/Viewer/Viewer.js:69:28)

@mramato
Copy link
Contributor

mramato commented Feb 4, 2014

I can confirm this issue and was able to reproduce it with the below Sandcastle snippet. Just run the code and hit the Crash Me button to trigger the exception. CC @bagnell

require(['Cesium'], function(Cesium) {
    "use strict";

    var viewer = new Cesium.Viewer('cesiumContainer');
    viewer.extend(Cesium.viewerDynamicObjectMixin);
    viewer.sceneTransitioner.to2D();

    Sandcastle.addToolbarButton('Crash Me', function() {
        for(var i = 0; i < 500; i++){
            viewer.scene.getCamera().controller.zoomIn();
        }
    });

    Sandcastle.finishedLoading();
});

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

Successfully merging a pull request may close this issue.

1 participant