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

An error occurred while rendering. Rendering has stopped #6940

Closed
bidolah opened this issue Aug 20, 2018 · 12 comments
Closed

An error occurred while rendering. Rendering has stopped #6940

bidolah opened this issue Aug 20, 2018 · 12 comments

Comments

@bidolah
Copy link

bidolah commented Aug 20, 2018

Hi Team!

I get next error when I try to display my gltf model in https://www.virtualgis.io/gltfviewer/

An error occurred while rendering. Rendering has stopped.
TypeError: Cannot read property 'type' of undefined
TypeError: Cannot read property 'type' of undefined
at d (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:526:10900)
at https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:526:10342
at Object.t.object (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:525:6809)
at Object.t.topLevel (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:525:6901)
at Object.t.material (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:525:7493)
at c (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:526:10258)
at Ee.update (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:528:22221)
at a.update (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:549:22895)
at tt (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:553:3390)
at Ke (https://www.virtualgis.io/gltfviewer/node_modules/cesium/Build/Cesium/Cesium.js:553:1194)

So I try to find solution and found the problem of falling. If you have .gltf model with unused materials this leads to an error. So I download gltf model from https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Box/glTF-Embedded/Box.gltf and render it without problems. But when I try to add additional unused material it leads to stop rendering error.

You can look my changes here:
image

Also I attach .gltf document with unused materials.
Box.zip

Could you please fix it?

@lilleyse
Copy link
Contributor

I think you're running into this issue - #6891.

It should be fixed before the 1.49 release.

@ggetz could you confirm that the model works with #6805?

@ggetz
Copy link
Contributor

ggetz commented Aug 20, 2018

This model load in the branch from #6805

image

@bidolah
Copy link
Author

bidolah commented Aug 20, 2018

Thanks for quick response. I would be glad to see the fix in the next release.

Have a nice day! @lilleyse @ggetz

@lilleyse
Copy link
Contributor

Fixed in #6906.

@wuming2019
Copy link

wuming2019 commented Apr 6, 2022

RuntimeError: Fragment shader failed to compile. Compile log:

Error
at new RuntimeError (webpack-internal:///./node_modules/cesium/Source/Core/RuntimeError.js:40:11)
at createAndLinkProgram (webpack-internal:///./node_modules/cesium/Source/Renderer/ShaderProgram.js:253:13)
at reinitialize (webpack-internal:///./node_modules/cesium/Source/Renderer/ShaderProgram.js:509:17)
at initialize (webpack-internal:///./node_modules/cesium/Source/Renderer/ShaderProgram.js:502:3)
at ShaderProgram. _bind (webpack-internal:///./node_modules/cesium/Source/Renderer/ShaderProgram.js:578:3)
at beginDraw (webpack-internal:///./node_modules/cesium/Source/Renderer/Context.js:1144:17)
at Context. draw (webpack-internal:///./node_modules/cesium/Source/Renderer/Context.js:1250:3)
at DrawCommand. execute (webpack-internal:///./node_modules/cesium/Source/Renderer/DrawCommand.js:570:11)
at ComputeEngine. execute (webpack-internal:///./node_modules/cesium/Source/Renderer/ComputeEngine.js:126:15)
at ComputeCommand. execute (webpack-internal:///./node_modules/cesium/Source/Renderer/ComputeCommand.js:120:17)

FCVAV9__X LF`6AY N4}K58
Why does a page crash when it is left for a long time??

@ggetz
Copy link
Contributor

ggetz commented Apr 6, 2022

@wuming2019 I think the issue you are running into is #5991. Your page is losing the webgl context, which we don't have control over. However, we could report a better error.

@wuming2019
Copy link

@wuming2019 I think the issue you are running into is #5991. Your page is losing the webgl context, which we don't have control over. However, we could report a better error.
No, this is a VUE project。I'm just doing a tabs switch,create multiple cesuim view,switch back and forth between several tabs,memory cannot be freed,and eventually collapse。

@ggetz
Copy link
Contributor

ggetz commented Apr 8, 2022

No, this is a VUE project。I'm just doing a tabs switch,create multiple cesuim view,switch back and forth between several tabs,memory cannot be freed,and eventually collapse。

VUE shouldn't affect much. This is caused by how the browser is handling memory. When too many instances are created, the browser can be agressive about destroying WebGL contexts, which then causes cesium views to crash.

@WahajTariq
Copy link

Hello,

I wanted to use Cesium to verify the coordinates of a BIM Model (ifc imported). When I launch the HelloWorld program it gives me the following error:

An error occurred while rendering. Rendering has stopped.
SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.

Error: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.
at new Texture (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:292351)
at Material$4.update (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:320751)
at EllipsoidPrimitive.update (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:2554722)
at Moon.update (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:2824039)
at Scene.updateEnvironment (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3102902)
at render (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3106427)
at tryAndCatchError (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3106686)
at Scene.render (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3108572)
at CesiumWidget.render (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:90:113237)
at n (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:90:98966

The image of the error:
image

Could you please help me to solve this?

@ggetz
Copy link
Contributor

ggetz commented Apr 11, 2022

@WahajTariq This sounds like a CORS error and probably has to do with how you are serving your BIM model.
I'd suggest taking this to the Cesium Forum where there are members of the community and developers from the team who can help. I'd also suggest including the relevant code from your program.

@supershunan
Copy link

image
Could you please help me to solve this? Very thank you.

@amarnath45ds
Copy link

Hello,

I wanted to use Cesium to verify the coordinates of a BIM Model (ifc imported). When I launch the HelloWorld program it gives me the following error:

An error occurred while rendering. Rendering has stopped. SecurityError: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded.

Error: Failed to execute 'texImage2D' on 'WebGLRenderingContext': The image element contains cross-origin data, and may not be loaded. at new Texture (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:292351) at Material$4.update (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:320751) at EllipsoidPrimitive.update (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:2554722) at Moon.update (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:2824039) at Scene.updateEnvironment (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3102902) at render (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3106427) at tryAndCatchError (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3106686) at Scene.render (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:48:3108572) at CesiumWidget.render (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:90:113237) at n (file:///C:/Users/vwaha/Downloads/Cesium-1.92/Build/Cesium/Cesium.js:90:98966

The image of the error: image

Could you please help me to solve this?

Hi @WahajTariq Did You resolve this issue. I am facing the same issue. Please help me to resolve this issue

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

No branches or pull requests

7 participants