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

Runtime crash related to CesiumIonServer in a packaged game when tilesets are _only_ created at runtime #1507

Open
kring opened this issue Aug 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kring
Copy link
Member

kring commented Aug 23, 2024

Reported here:
https://community.cesium.com/t/fatal-error-while-spawning-cesium3dtileset/34641

When a Cesium3DTileset is added via the Editor, it will have a reference to a CesiumIonServer instance (usually the default SaaS one) and so Unreal will know to automatically include this instance in a packaged game.

However, if your level does not have a Cesium3DTileset, but then you add one at runtime, Unreal won't know that the CesiumIonServer instance is required, and so it won't include it in the packaged game. As a result, the reference will be nullptr and the game will crash with an access violation.

This can be worked around by explicitly telling Unreal to include the CesiumIonServer. But it manifests as a mysterious crash to users, which is not great. We should address this by doing one or more of the following:

  1. Tell the user at runtime that this is a problem and fail gracefully instead of crashing with an access violation.
  2. Handle the possibility that there is no CesiumIonServer at runtime, and create one on the fly (like we already do in the Editor).
  3. Always force the CesiumIonServer to be included in packaged games even if it doesn't appear to be used.

We should also consider if there are other assets that will be missing in this scenario.

@kring kring added the bug Something isn't working label Aug 23, 2024
@spikhoff
Copy link

I'm just adding stack trace from that forum post:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000080
0x00007ff64b3086d7 AutoVrtlEnv.exe!FString::FString() []
0x00007ff65449a0a5 AutoVrtlEnv.exe!ACesium3DTileset::LoadTileset() [C:\TEMP\Bsim3d_2709503_12248\AutoVrtlEnv\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Cesium3DTileset.cpp:1196]
0x00007ff65449a884 AutoVrtlEnv.exe!ACesium3DTileset::OnConstruction() [C:\TEMP\Bsim3d_2709503_12248\AutoVrtlEnv\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Cesium3DTileset.cpp:660]
0x00007ff65080633c AutoVrtlEnv.exe!AActor::ExecuteConstruction() []
0x00007ff650791429 AutoVrtlEnv.exe!AActor::FinishSpawning() []
0x00007ff6507a8219 AutoVrtlEnv.exe!AActor::PostSpawnInitialize() []
0x00007ff651388bc7 AutoVrtlEnv.exe!UWorld::SpawnActor() []
0x00007ff65138904e AutoVrtlEnv.exe!UWorld::SpawnActor() []
0x00007ff654c3487b AutoVrtlEnv.exe!UWorld::SpawnActor<ACesium3DTileset>() [C:\Program Files\Epic Games\UE_5.3\Engine\Source\Runtime\Engine\Classes\Engine\World.h:3463]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants