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 fragment shader error for displaying billoards #6911

Closed
heinerlamprecht opened this issue Aug 13, 2018 · 10 comments
Closed

Cesium fragment shader error for displaying billoards #6911

heinerlamprecht opened this issue Aug 13, 2018 · 10 comments

Comments

@heinerlamprecht
Copy link

I'm using billoards for my entities. On MacOS, they are properly displayed, but on Linux, webgl crashes. Sometimes it is enough to just kill the browser, sometime I have to kill X completely.

Sample code:

const entityOptions = {
    id: id,
    position: position,
    billboard: {
        image: '/assets/symbols/symbol.svg'
    }
};
this.viewer.entities.add(new Cesium.Entity(entityOptions));

I do get the following stack trace:

f         @Cesium.js:formatted:45195
y         @Cesium.js:formatted:45312
d._bind   @Cesium.js:formatted:45369
G         @Cesium.js:formatted:78362
k.draw    @Cesium.js:formatted:78607
n.execute @Cesium.js:formatted:43787
Ge        @Cesium.js:formatted:106273
Xe        @Cesium.js:formatted:106363
tt        @Cesium.js:formatted:106661
$e        @Cesium.js:formatted:106575
ht        @Cesium.js:formatted:106889
pt        @Cesium.js:formatted:106900
xe.render @Cesium.js:formatted:107294
A.render  @Cesium.js:formatted:115880
t         @Cesium.js:formatted:115580

Cesium version: 1.48.0

The error was introduced in Cesium 1.45. Version 1.44 works properly, 1.45 crashes.

@hpinkos
Copy link
Contributor

hpinkos commented Aug 13, 2018

@heinerlamprecht can you please post the stack trace from the unminified version of Cesium?
Also, can you paste the results from http://webglreport.com/?
Finally, try setting viewer.scene.logarithmicDepthBuffer = false and let me know if that fixes the crash. Thanks!

@heinerlamprecht
Copy link
Author

heinerlamprecht commented Aug 14, 2018

@hpinkos, I tried to reproduce the crash with the unminified version. However, even after several attempts, I wasn't able to get a stack trace. I always had to forcibly kill the X server, so I had no access to any stack trace afterwards.

Setting viewer.scene.logarithmicDepthBuffer = false fixes the issue. Unfortunately, that wouldn't be a solution. I'm using Cesium in an Angular/Typescript environment and the compiler always complains that this property is not available on Scene. So it's only possible to run in development mode (unless I patch the type definitions myself).

Besides, I did a bit more testing. The issue only occurs on my Chromium (65.0.3325.181) on Linux. On Windows and Mac, I used v67 and v68 without any problems. In addition, Firefox (52.7.0) on Linux also works properly.

Edit, for the records: Instead of manually patching type definitions, it is possible to set the property the following way: (<any>viewer.scene).logarithmicDepthBuffer = false;

Here are the results of WebGL report:

webglreport com__v 1

webglreport com__v 2

@hpinkos
Copy link
Contributor

hpinkos commented Aug 14, 2018

Thanks for the info @heinerlamprecht! Regarding setting scene.logarithmicDepthBuffer, our team doesn't generate an official TypeScript definition file so it's possible that whatever you're using is outdated needs to be updated to include this property.

@bagnell it looks like this is related to log depth too. Any ideas what might be causing the issue?

@bagnell
Copy link
Contributor

bagnell commented Aug 15, 2018

Log depth adds a varying and uses gl_FragDepth. From the WebGL Report, it should work fine. Can you update Chromium? The latest version is 68.

@bagnell
Copy link
Contributor

bagnell commented Aug 15, 2018

Also, are your drivers up to date? Since the browser hangs and the only way to exit is to restart X means there's most likely a browser/driver issue.

@heinerlamprecht
Copy link
Author

I can check with our IT guys (still waiting for the browser update). But Firefox on the same maschine works.

@heinerlamprecht
Copy link
Author

Meanwhile the Chromium browser was updated to version 67.0.3396.79. Although this does not fix the issue, I managed to get a more useful stacktrace. The error appeared after I killed the GPU-process of chromium.

Again, setting logarithmicDepthBuffer to false works as workaround.

chromium_cesium_error

@hpinkos
Copy link
Contributor

hpinkos commented Aug 22, 2018

Thanks for the extra details @heinerlamprecht
@bagnell is working on fixes for a few other logdepth related issues, so we'll add this to the list too

@lilleyse lilleyse mentioned this issue Feb 7, 2020
7 tasks
@kring
Copy link
Member

kring commented Feb 24, 2020

@heinerlamprecht if you're still having this problem, are you able to check if #8600 fixes it?

@mramato
Copy link
Contributor

mramato commented Jun 3, 2020

Closing this because we think the issue is most likely fixed. If there are still problems please re-open with details for reproducing it. Thanks.

@mramato mramato closed this as completed Jun 3, 2020
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

5 participants