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

Cesium Inspector broken #2448

Closed
mramato opened this issue Jan 30, 2015 · 10 comments
Closed

Cesium Inspector broken #2448

mramato opened this issue Jan 30, 2015 · 10 comments

Comments

@mramato
Copy link
Contributor

mramato commented Jan 30, 2015

Run the website demo or the local demo.

There are at least two bugs.

  1. Click Show Frustums for an insta-crash.
  2. With the default view, pick a terrain tile and then hit any of the quadrant buttons, you'll get exceptions in the console output.
@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 1, 2015

  1. I can't reproduce with master or 1.5.
  2. CC Cesium inspector: terrain crashes #1665

@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 1, 2015

  1. I can reproduce it now. Using the simple CZML link from main index.html, click a satellite then check Show Frustums and the shader fails to compile.

I most likely will not be able to look at this for 1.6.

@mramato
Copy link
Contributor Author

mramato commented Feb 1, 2015

This looks like it only happens in Chrome (at least on Windows) I get the error in OpenGL mode as well, so I don't think it's ANGLE. Next time I boot into Linux, I'll try it there as well.

Because it's Chrome only, I'm okay with post 1.6

@mramato
Copy link
Contributor Author

mramato commented May 22, 2015

See #2747 for some additional details on 1

@hpinkos
Copy link
Contributor

hpinkos commented Jul 28, 2015

This crashes in Chrome and Firefox now.
Reported on the forum: https://groups.google.com/forum/?hl=en#!topic/cesium-dev/EH5YNRdhqOQ

@austinEng
Copy link
Contributor

  1. Seems to be happening because the child tiles have yet to be loaded so the data for them does not exist yet. I'm not sure if we want to allow forcibly loading tiles as it seems like that determination is done automatically based on screen space error and visibility. Furthermore, even if we did load that selected tile, clicking any quadrant button twice would again fail because upsampling more than 1 level is not supported.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 11, 2017

@austinEng it would be OK if you are just able to fix (1) above.

For (2), does the inspector know what it needs to have those buttons disabled when clicking them would cause a crash? If not, is it reasonably easy to expose that? If not, it could be insufficient priority to take the effort to fix it.

@austinEng
Copy link
Contributor

austinEng commented Jan 11, 2017

(1) I was unable to reproduce this crash where you click a satellite and then Show Frustrums . It seems to work for me in both Chrome and Firefox.

(2) I believe this should be possible to initially disable the buttons if the data is not immediately available. However, without modification of the GlobeSurfaceTileProvider, the inspector wouldn't be able to know when to re-enable the buttons when the data becomes available. This is potentially problematic because the crash only occurs when you click a quadrant button before zooming in (which loads the tile). If we were to disable them if the data is not immediately available, then you still wouldn't be able to select a quadrant after zooming in.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 11, 2017

For (2), I suggest we skip it. For (1), just click "Show Frustum" as soon as you open the Sandcastle demo, I get:

RuntimeError: Fragment shader failed to compile. Compile log: WARNING: 0:? : '
' : extension directive should occur before any non-preprocessor tokens
ERROR: 0:3: 'gl_FragColor' : cannot use both gl_FragData and gl_FragColor

If you don't get it, it is because you don't have the MRT extension; check http://webglreport.com/. Could be worth a few minutes googling about that Mac, GPU, and WebGL support.

I'm pretty sure the problem is this code that adds setting gl_FragColor to the shaders: https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/Scene.js#L1446-L1461

It worked, but then we added OIT using MRT so the shaders getting modified stopped writing to gl_FragColor and instead write to gl_FragData. For example, see:

We may have to modify the shaders differently based on if they write to gl_FragColor or gl_FragData or just not modify some of the shaders used for OIT. Investigate and ask @bagnell if needed.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jan 16, 2017

(1) was fixed in #4864. (2) is insufficient priority for the amount of work.

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

4 participants