question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when bounding sphere is at the origin

See original GitHub issue
var viewer = new Cesium.Viewer('cesiumContainer');
var radius = 1;
var outlineSphere = viewer.entities.add({
    position: new Cesium.Cartesian3(0.0, 0.0, 0.0),
    ellipsoid : {
        radii : new Cesium.Cartesian3(radius, radius, radius),
        fill : false,
        outline : true,
        outlineColor : Cesium.Color.YELLOW,
        slicePartitions : 10,
        stackPartitions : 10
    }
});

This crashes because while it tries to project the bounding sphere center to 2D for the batch table.

An error occurred while rendering. Rendering has stopped.
TypeError: Cannot read property 'longitude' of undefined
TypeError: Cannot read property 'longitude' of undefined
    at GeographicProjection.project (http://localhost:8080/Source/Core/GeographicProjection.js:69:30)
    at updateBatchTableBoundingSpheres (http://localhost:8080/Source/Scene/Primitive.js:1285:39)
    at Primitive.update (http://localhost:8080/Source/Scene/Primitive.js:1776:13)
    at PrimitiveCollection.update (http://localhost:8080/Source/Scene/PrimitiveCollection.js:365:27)
    at PrimitiveCollection.update (http://localhost:8080/Source/Scene/PrimitiveCollection.js:365:27)
    at PrimitiveCollection.update (http://localhost:8080/Source/Scene/PrimitiveCollection.js:365:27)
    at updateAndRenderPrimitives (http://localhost:8080/Source/Scene/Scene.js:2749:27)
    at executeCommandsInViewport (http://localhost:8080/Source/Scene/Scene.js:2610:13)
    at updateAndExecuteCommands (http://localhost:8080/Source/Scene/Scene.js:2473:13)
    at render (http://localhost:8080/Source/Scene/Scene.js:3009:9)

Also, setting scene3Donly: true does not fix the issue. Should we be skipping this step if scene3D only?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
hpinkoscommented, Jul 2, 2018

@MattF-NSIDC yes, we release Cesium the first business day of every month. We’re working on putting together the 1.47 release now. It does include this partial fix and it will be available later today =)

1reaction
hpinkoscommented, Jul 6, 2018

Great @MattF-NSIDC! Glad that worked for you =)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash when bounding sphere is at the origin #6365 - GitHub
Just adding my to this issue: We're developing an app with Cesium that requires drawing rectangles that may be globally symmetrical, ...
Read more >
Assertion failed, sphere.radius>=0.0f - Unity Answers
The sphere issue I think is coming from PhysX, and indicates that a bounding sphere has been computed as having a radius of...
Read more >
Nans found on Bounds for Primitive in HISM - Rendering
No i am just took a random vector from the stream to determine the position and scales for the transforms, but as the...
Read more >
The clippingPlanes problem - Google Groups
If you remove it entirely, it should place the clipping planes relative to the tileset origin. Otherwise, try Cesium.Transforms.eastNorthUpToFixedFrame(tileset.
Read more >
Bounding sphere - Wikipedia
Used in computer graphics and computational geometry, a bounding sphere is a special type of bounding volume. There are several fast and simple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found