Exception in cesium tileset streaming during construction phase

Hi Everyone,

I’ve recently upgraded my project from Unreal Engine 5.4 to 5.7, and I’m encountering an issue when running my project from Visual Studio. The exception occurs during the OnConstruction stage, specifically related to CesiumFGltfComponent::CreateOnGameThread builtin function of tileset. This issue happens only on the first run when launching from Visual Studio, and it does not persist once Unreal Engine is open. The exception does not occur if I run the project directly from the Unreal Editor. Has anyone encountered a similar issue after upgrading from UE5.4 to UE5.7. or is there anything I might have missed? I am spawning cesium 3d tilesets in the scene during construction phase(before begin play) via cpp. Any suggestions on how to resolve this would be greatly appreciated.

Thank you!

Hi @dis_afise,

Sorry that you’re running into trouble with the plugin! Could you please share more information with us, including:

  • What version of Cesium for Unreal are you using?
  • What the exception that you’re running into? A stack trace would be super helpful as well.

It’s possible that this is related to a previously reported bug below, but it would be good to confirm with more details.

Thans for responding.I am using cesium 2.23.0. Below are the attached screenshots for the exception:

Hey @dis_afise,

It looks like this is a known issue within Unreal Engine introduced in UE 5.6.1 where adding Instanced Static Mesh instances in construction scripts can cause that ensure block to be hit. (Unreal Issue, Unreal forum post 1, Unreal forum post 2).

As to why that only happens in Editor, ensure macros are designed to notify the crash reporter of non-fatal error but continue running, and they only report once per editor session. When you have the debugger (Visual Studio) attached it behaves a little differently and triggers a breakpoint unlike when you’re using the Unreal Editor Directly. You can checkout the docs on ensure here.

If this isn’t causing any unexpected behaviour, you are probably safe to ignore it, alternatively you could move your spawning of cesium 3d tilesets from construction to beginplay if your use case allows it.

Hope that helps!

@darcyvdd glad that one of us has eagle eyes! I almost overlooked the UInstancedStaticMeshComponent mention in the callstack. Based on that, I’m inclined to think it’s related to that issue you linked.

But just in case @dis_afise, we’d appreciate any minimal reproduction steps to walk through what you’re doing, including a snippet of your C++ code. If you’re willing to share the tileset that is causing this problem, that would be helpful too.

I have updated my cesium version. It seems to be gone for now.