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

Scene Render Crashes with Large 3D Tiles #4549

Closed
KermMartian opened this issue Oct 30, 2016 · 12 comments
Closed

Scene Render Crashes with Large 3D Tiles #4549

KermMartian opened this issue Oct 30, 2016 · 12 comments

Comments

@KermMartian
Copy link

I'm trying to debug an unusual Cesium crash with 3D Tiles. A hierarchy of Composite-packed models is being loaded (although the same issue occurred with un-composited b3dm models). The top-level tile and model loads fine; after zooming, Cesium starts to load the child models. After a predictable amount of time, which appears from the Network debugging tab in Chrome to correspond to all child Composite tiles being loaded, Cesium crashes with the following error, context, and call stack.

Error (in cesium/Source/Renderer/Texture.js):

        if (width <= 0) {
            throw new DeveloperError('Width must be greater than zero.');
        }

Call stack:

Texture
createTexture
updateFramebuffers
GlobeDepth.update
updateAndClearFramebuffers
executeCommandsInViewport
updateAndExecuteCommands
render

The context (that is, scene._context) passed all the way down to Texture() from updateAndClearFramebuffer has width (drawingBufferWidth) and height (drawingBufferHeight) 0. Therefore, as far as I can tell, the models themselves are not the problem. How can I proceed in debugging this issue, as I suspect Cesium itself, not my models, are at fault? Thanks in advance, and my apologies if it turns out to be a spurious issue.

@lilleyse
Copy link
Contributor

How large is the tileset? This sounds like an out of memory issue.

@KermMartian
Copy link
Author

The top-level tile is a ~50MB cmpt, and the children sum to about ~200MB, so that could definitely be the case; I'll reduce the detail in the tiles and try again. To keep this as a potentially useful issue, is there possibly a cleaner way to handle this, for example to provide a callback to allow the application to catch when loading a tile is going to cause this to occur, or is there no good way to do so?

@KermMartian KermMartian changed the title Scene Render Crashes with 3D Tiles Scene Render Crashes with Large 3D Tiles Oct 31, 2016
@lilleyse
Copy link
Contributor

The memory situation should have been improved now that skipping lods and unloading based on memory usage are in.

I'm going to close for now, but feel free to comment if there are still issues.

@jkumar80
Copy link

Hi,

I am facing same error. Is there any solution for this?, kindly let me know.

Best Regards,
K.Jayakumar

@lilleyse
Copy link
Contributor

@jkumar80 some things to try are

However if the tileset isn't well optimized it may still run into out of memory problems.

@jkumar80
Copy link

Thanks Iilleyse for your reply. Please let me know how to optimize the tile set?

@itsegg
Copy link

itsegg commented May 18, 2020

Hi,
I set maximumMemoryUsage = 512MB,But the browser memory uses 2G,And it will not fall.
My 3dtile has 100G size.

@mramato
Copy link
Contributor

mramato commented May 18, 2020

@itsegg Cesium's current strategy is to always load the amount of data required for the current scene and screen space error. maximumMemoryUsage is just the size of the frame-to-frame cache. We realize this is not ideal and plan on changing it, please follow #6226 for details.

In the meantime, your best solution is to raise maximumScreenSpace error for your tilesets.

@itsegg
Copy link

itsegg commented May 19, 2020

Thanks for your reply.

@itsegg
Copy link

itsegg commented May 27, 2020

@mramato
Hi mramato,
I found a place in Cesium that caused the memory to keep increasing,
When tile.unloadTile (), _request also occupies memory.
After this modification, the memory of my browser stabilized at about 1.5G.
My Cesium version is 1.69
image

@lilleyse
Copy link
Contributor

@itsegg that looks suspiciously similar to #8843

@heylying
Copy link

@mramato Hi! I try to load a large 3D tiles model more than 200GB and Cesium(version 1.71) crashes now. It is still out of memory. Now Is all I can do now is still raise maximumScreenSpace error?

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

7 participants