"DeveloperError: Expected value to be greater than or equal to0.0125, the actual value was 0"

Hello,

I am working on this Cesium Sandcastle

Occassionally, I will receive this error: "DeveloperError: Expected value to be greater than or equal to 0.0125, the actual value was 0"

I believe it pertains to the polyline being created, but I am not sure. The error comes up pretty randomly so I am struggling to debug it. I was hoping someone could look at this sandcastle and see where the problem would come up so I can add an error check.

It’s also worth noting that I am not positive these 3 points being displayed will reproduce the error. I have been using a ton of different points with different initial conditions. Some throw the error faster than others.

Thank you for any help you can offer.

1 Like

here is a copy of the error message happening in my application. It is running the same code as in the sandcastle

1 Like

I found the condition that was throwing the error and added a check for it:

 pair.line = this.viewer.entities.add({
            polyline: {
              // This callback updates positions each frame.
              positions: new CallbackProperty(function (time, result) {
                //THIS CONDITION CHECKS IF LATITUDES ARE INVERSES
                // IF THEY ARE, DONT UPDATE POSITION THIS TIME
                if (
                  pair.point1.posDegrees[1] * -1 ===
                  pair.point2.posDegrees[1]
                ) {
                  return;
                }
                return Cartesian3.fromDegreesArrayHeights(
                  [
                    pair.point1.posDegrees[0],
                    pair.point1.posDegrees[1],
                    pair.point1.height,
                    pair.point2.posDegrees[0],
                    pair.point2.posDegrees[1],
                    pair.point2.height,
                  ],
                  Ellipsoid.WGS84,
                  result
                );
              }, false),
              width: this.lineWidth,
              material: new Color(255, 255, 255, 255),
            },
          });

The all caps comment explains how I fixed it

1 Like

Just wanted to note where I found my solution, and another related discussion.

Kudos for the descriptive title! This post truly deserves the attention that the first linked post got.

1 Like