-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Error in splitLongitudeTriangles for FrustumGeometry #6187
Comments
given that changing .toRadians(6) to .toRadians(5) is all it takes to trigger this error, I consider it pretty serious. |
I don't think this is being caused by
This probably has to do with the |
This may be a dupe (or same root cause) as #4801. |
Nope, the problem with this one is the numbers are too big. Then, since all those values are equal, there's a divide by zero on line 76, resulting in NaNs |
@davidbuzz like @ggetz suspected, the problem is with the |
Yes, I'm aware that without the 'DebugCameraPrimitive' the problem doesn't seem to manifest, which is why I included it in the code needed to demonstrate the issue. :-) |
I'm also encountering this issue for the same reason that you described @hpinkos. I can replicate it by calling 'barycentricCoordinates' with the following args:
due to This occurs for me intermittently when trying to draw corridors, which I'm using to display satellite swaths. @hpinkos do you have any suggested workarounds? I had some ideas but since I don't understand the rendering pipeline I'm not sure which (if any) are feasible:
As far as I can tell I'm not using Having some control on the result would be nice - I'd rather skip rendering and have a gap instead of getting an error that blocks the entire UI. |
@phazor if you're not using |
Unfortunately the geometries are time-dependent + generated, and it can be hours before the error manifests. Next time I catch it I'll try to extract the geometry and use it to provide some better reproduction steps. In the meantime, I have a rather ugly workaround that at least allows the cesium viewer to jump past an 'expected' This is the crux of it:
|
Gotcha. Yeah, let me know when you have an update. Thanks @phazor! |
If you're only working in 3D, then there may be a workaround. Geometries are only split for 2D and CV scenes, so can pass If you are using 2D/CV, then @hpinkos is right and there is no good workaround. |
error text from sandcastle:
An error occurred while rendering. Rendering has stopped.
undefined
DeveloperError: normalized result is not a number
Error
at new DeveloperError (https://cesiumjs.org/Cesium/Source/Core/DeveloperError.js:43:19)
at Function.Cartesian3.normalize (https://cesiumjs.org/Cesium/Source/Core/Cartesian3.js:421:19)
at computeTriangleAttributes (https://cesiumjs.org/Cesium/Source/Core/GeometryPipeline.js:1948:24)
at splitLongitudeTriangles (https://cesiumjs.org/Cesium/Source/Core/GeometryPipeline.js:2129:17)
at Object.GeometryPipeline.splitLongitude (https://cesiumjs.org/Cesium/Source/Core/GeometryPipeline.js:2553:17)
at geometryPipeline (https://cesiumjs.org/Cesium/Source/Scene/PrimitivePipeline.js:134:38)
at Object.PrimitivePipeline.combineGeometry (https://cesiumjs.org/Cesium/Source/Scene/PrimitivePipeline.js:278:26)
at loadSynchronous (https://cesiumjs.org/Cesium/Source/Scene/Primitive.js:1216:40)
at Primitive.update (https://cesiumjs.org/Cesium/Source/Scene/Primitive.js:1772:17)
at DebugCameraPrimitive.update (https://cesiumjs.org/Cesium/Source/Scene/DebugCameraPrimitive.js:221:33)
javascript code from sandcastle to demonstrate the issue:
var viewer = new Cesium.Viewer('cesiumContainer');
scene.primitives.add(new Cesium.DebugCameraPrimitive({
camera : camera,
color : Cesium.Color.AQUA
}));
The text was updated successfully, but these errors were encountered: