Skip to content

Conversation

@kring
Copy link
Member

@kring kring commented Dec 1, 2025

I noticed after I merged #1280 that the cesium-unreal unit test related to shared assets was failing. The immediate cause was that the aggregated TileLoadInput created by the CesiumIonTilesetLoader was not getting the new pSharedAssetSystem property.

After fixing that, though, a new problem appeared: shared assets were causing load failures. The error case was like this:

  1. A glTF (a tile) with an external image referenced by URI is loaded.
  2. After Read a glTF file's external data before postprocessing. #1280, the external images are loaded before postprocess is run.
  3. Because the external image is a shared asset, in this particular case it is already completely done loading before we even start loading this glTF.
  4. When cesium-unreal loads images, it clears the CPU-side image data to save memory.
  5. The postprocess skips attempting to decode images when the condition image.pAsset && !image.pAsset->pixelData.empty() is true. However, because Unreal clears the CPU side memory, pixelData is empty at this point.
  6. postProcess attempts to decode a 0-byte image, which fails.

My solution was to change the conditional in postProcess to simply check that image.pAsset != nullptr. Any time we already have an ImageAsset, the image has been loaded, no matter what the pixelData looks like.

I'm going to merge this immediately for today's release.

@kring kring added this to the December 2025 Release milestone Dec 1, 2025
@kring kring merged commit 8a0d95e into main Dec 1, 2025
28 checks passed
@kring kring deleted the unshared-assets branch December 1, 2025 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants