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

Broken glTF models deployed in Sandcastle #12022

Closed
javagl opened this issue Jun 5, 2024 · 0 comments · Fixed by #12023
Closed

Broken glTF models deployed in Sandcastle #12022

javagl opened this issue Jun 5, 2024 · 0 comments · Fixed by #12023

Comments

@javagl
Copy link
Contributor

javagl commented Jun 5, 2024

What happened?

When selecting https://sandcastle.cesium.com/index.html?src=3D%20Models.html (or any other Sandcastle with glTF models), it fails with

RuntimeError: Failed to load model: ../SampleData/models/CesiumAir/Cesium_Air.glb
Failed to load glTF
Failed to load glTF: ../SampleData/models/CesiumAir/Cesium_Air.glb
Offset is outside the bounds of the DataView
...
RangeError: Offset is outside the bounds of the DataView

Update:

Upon quick inspection, this does not seem to be caused by code changes. Instead, it looks like the 3D Models (GLB files) that are depolyed as part of the sandcastle are simply broken.

For example, the Cesium_Air.glb in the current version is https://github.com/CesiumGS/cesium/raw/a6f0337f9fe56557c66cb7f6db0f0be422ed593e/Apps/SampleData/models/CesiumAir/Cesium_Air.glb . This is valid (and has 573 KB).

The version that is currently deployed at https://sandcastle.cesium.com/SampleData/models/CesiumAir/Cesium_Air.glb is attached here:

Cesium_Air (3).zip

This has 1010 KB, and is invalid. The validator says things like

            {
                "code": "GLB_CHUNK_LENGTH_UNALIGNED",
                "message": "Length of 0x15bdbfef chunk is not aligned to 4-byte boundaries.",
                "severity": 0,
                "offset": 12
            },
            {
                "code": "GLB_UNEXPECTED_FIRST_CHUNK",
                "message": "First chunk must be of JSON type. Found 0x15bdbfef instead.",
                "severity": 0,
                "offset": 12
            },

(+ more), indicating that this is not really a valid GLB file at all.

Reproduction steps

Open https://sandcastle.cesium.com/index.html?src=3D%20Models.html

Sandcastle example

https://sandcastle.cesium.com/index.html?src=3D%20Models.html

Environment

Browser: Chrome and FireFox
CesiumJS Version: 1.118
Operating System: All

@javagl javagl changed the title Cannot read glTF models Jun 5, 2024
@ggetz ggetz mentioned this issue Jun 5, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant