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

Some tiles not get loaded when switching terrainProvider #6021

Closed
Vineg opened this issue Dec 1, 2017 · 10 comments · Fixed by #9163
Closed

Some tiles not get loaded when switching terrainProvider #6021

Vineg opened this issue Dec 1, 2017 · 10 comments · Fixed by #9163

Comments

@Vineg
Copy link
Contributor

Vineg commented Dec 1, 2017

If you change terrainProvider during reprojection of the tile, right after

            this.state = ImageryState.TRANSITIONING;
            this.imageryLayer._reprojectTexture(frameState, this, needGeographicProjection);

gets called, Imagery stucks in TRANSITIONING state and prevents tile from loading. It is happens because cancelReprojections gets called.

is method tileProvider.cancelReprojections affects something at all? Maybe we could remove it? If you comment it out, everything seems working fine.

In our application terrainProvider is changed early and it randomly causes one or two halves of the globe not loaded:
half

@mramato
Copy link
Contributor

mramato commented Dec 1, 2017

Thanks @Vineg, this definitely sounds like a bug. @bagnell any thoughts?

In our application terrainProvider is changed early

What do you mean by this? Are you setting the terrain provider right after creating the Viewer/Widget? If so, you can try passing the terrainProvider option into the widget constructor, which should workaround the issue for you.

@Vineg
Copy link
Contributor Author

Vineg commented Dec 1, 2017

What do you mean by this? Are you setting the terrain provider right after creating the Viewer/Widget? If so, you can try passing the terrainProvider option into the widget constructor, which should workaround the issue for you.

@mramato, We load terrainProvider url with xhr and after it is loaded, we set it, so it is not immediatly after creating Widget, rather somewhat after it. I already workaround this issue by commenting out cancelReprojections in QuadtreePrimitive.prototype.invalidateAllTiles call.

@mramato
Copy link
Contributor

mramato commented Dec 1, 2017

OK, thanks. Is this easy to reproduce in a Sandcastle example? If you could share a simple test case that we can run ourselves that should make this much easier to fix. Thanks.

@Vineg
Copy link
Contributor Author

Vineg commented Dec 1, 2017

@mramato here you go https://pastebin.com/na4cK7kR
It works not every time, run example few times.

@mramato
Copy link
Contributor

mramato commented Dec 1, 2017

Thanks @Vineg!

Here's the full example from the pastebin link:

var viewer = new Cesium.Viewer('cesiumContainer',{
});

// Load PA terrain
var cesiumTerrainProviderMeshes = new Cesium.CesiumTerrainProvider({
    url : 'https://assets.agi.com/stk-terrain/v1/tilesets/PAMAP/tiles',
    requestWaterMask : true,
    requestVertexNormals : true
});

var terrainProvider = new Cesium.CesiumTerrainProvider({
    url : 'https://assets.agi.com/stk-terrain/v1/tilesets/world/tiles'
});

setTimeout(function() {
    viewer.terrainProvider = terrainProvider;
    setTimeout(function() {
        viewer.terrainProvider = cesiumTerrainProviderMeshes;
        setTimeout(function() {
            viewer.terrainProvider = terrainProvider;
        },70);
    },550);
}, 2000);

@ggetz
Copy link
Contributor

ggetz commented Jan 5, 2018

@Vineg
Copy link
Contributor Author

Vineg commented May 18, 2018

Here is quickfix geoscan@ce5c718 Maybe someone can review it?

@hpinkos
Copy link
Contributor

hpinkos commented May 21, 2018

@bagnell or @kring, can you take a look at this?

@kring
Copy link
Member

kring commented Sep 21, 2020

I can still reproduce this with this Sandcastle.

@cesium-concierge
Copy link

Congratulations on closing the issue! I found these Cesium forum links in the comments above:

https://groups.google.com/forum/#!topic/cesium-dev/4wKjJWPoLAk

If this issue affects any of these threads, please post a comment like the following:

The issue at #6021 has just been closed and may resolve your issue. Look for the change in the next stable release of Cesium or get it now in the master branch on GitHub https://github.com/AnalyticalGraphicsInc/cesium.

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.

6 participants