Bug when generating Cesium Tiles in runtime

so I have an unreal project that uses the Cesium plugin to view different points around the globe.
I have two levels, one menu and one stage. I generate all of the necessary actors for cesium through blueprint, changing the origin depending on what button they pressed in the menu level.

In a packaged build, I open the stage level, return to the menu and then open another stage level I get a fatal error crash. This is the crash log I get from the build:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff

This project also accepts other geo spatial data and those projects are completely unaffected.

I made a debug build including symbols and ran through visual studio and this is the info I get from there:

My guess is that there is some type of null pointer in ResolveCreditSystem or OnConstruction functions.

This only started happening around the end of last week, been working fine before then. Any help would be greatly appreciated thankyou

Hi @NotKian666, welcome to the community!

It’s really hard to say what might be happening there. First of all, which Cesium for Unreal version is this? I mostly ask so that we can correlate the line numbers in your stack trace with particular lines of code.

Assuming you’re on the latest (v2.7.1), the immediate crash seems to be caused by an invalid UWorld pointer. The UWorld is obtained by calling GetWorld() on the Cesium3DTileset instance. So either that tileset instance is invalid to begin with (in which case, why is Unreal calling OnConstruction on it, as your call stack indicates?), or it’s a valid instance that is somehow in a UWorld that is no longer valid (which also is not supposed to be possible).

So, I think to help you figure this out, we’ll need a lot more context. Are you able to reproduce it in a simpler project? Ideally, if you could start with the Cesium for Unreal Samples project and guide us in making the changes necessary to make this happen, that would give us the highest chance of being able to debug it successfully.

Hi Kevin, thanks for the response.

I am using the latest version of cesium with unreal 5.4

So I’ve made a fresh project, imported the problem blueprint and successfully reproduced the error

So this project is based off the third person template, In the player controller I use debug key 1 to switch from thirdpersonmap to an empty level

I couldn’t find much online about a workflow for generating cesium tiles in runtime so here is what I’ve put together through trial and error. This is inside the level blueprint and connected to beginplay.

The only difference between this blueprint and the one in my actual project is the ion ID, I call the google photo realistic tiles instead but I just got 427’d by the API this morning.

Once packaged and I load into the level with cesium generating in runtime I hit a fatal error.

I’ve uploaded the editor and build to this google drive link:
link

I am using the latest version of cesium with unreal 5.4

It would help to mention that actual number just to be sure. The version is displayed in the lower-right corner of the Cesium panel.

Once packaged and I load into the level with cesium generating in runtime I hit a fatal error.

If you’re only ever creating Cesium3DTileset at runtime (that is, you don’t add any in the Editor beforehand), you may be running into this issue:

Unfortunately your image is too small / low resolution for me to see what your blueprint actually does, but I’ll take a look at your project if the above issue and workaround doesn’t help.