Crash when calling Refresh() on UCesiumPolygonRasterOverlay

I am using UE 5.4 with Cesium for Unreal 2.21.0.

In a packaged Windows build, the application crashes when I call Refresh() on a dynamically created UCesiumPolygonRasterOverlay. Creating the overlay itself does not crash. The crash only happens after calling Refresh().

I think the issue depends on the camera position. At certain camera positions, calling Refresh() causes a fatal error. When moving the camera, the crash occurs only intermittently. The issue does not reproduce in PIE, only in the packaged executable.

The crash log shows:

[2026.06.02-01.43.10:525][737]LogWindows: Error: === Critical error: ===
[2026.06.02-01.43.10:525][737]LogWindows: Error:
[2026.06.02-01.43.10:525][737]LogWindows: Error: Fatal error!
[2026.06.02-01.43.10:526][737]LogWindows: Error:
[2026.06.02-01.43.10:526][737]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff
[2026.06.02-01.43.10:526][737]LogWindows: Error:
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff7748fe64b LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!CesiumRasterOverlays::RasterOverlayTile::~RasterOverlayTile() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff77493766b LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!CesiumRasterOverlays::TileProviderAndTile::~TileProviderAndTile() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff7749355b7 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!CesiumRasterOverlays::RasterOverlayDetails::merge() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff774935561 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!CesiumRasterOverlays::RasterOverlayDetails::merge() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76fd8c016 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!async::detail::task_base::run_continuations() [D:\build\U5M\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\CesiumForUnreal\Source\ThirdParty\include\async++\task_base.h:113]
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff774935d88 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!async::detail::task_func<async::detail::inline_scheduler_impl,async::detail::continuation_exec_func<async::detail::inline_scheduler_impl,async::taskCesiumRasterOverlays::TileProviderAndTile,async::detail::fake_void,async::detail::unwrapped_func<CesiumRasterOverlays::TileProviderAndTile,async::taskCesiumRasterOverlays::TileProviderAndTile >,std::integral_constant<bool,0>,0>,async::detail::fake_void>::destroy() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff77460fa4b LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!CesiumAsync::CesiumImpl::QueuedScheduler::dispatchInternal() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff77460faba LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!CesiumAsync::CesiumImpl::QueuedScheduler::dispatchQueuedContinuations() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff77459f29d LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!Cesium3DTilesSelection::Tileset::updateViewGroup() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76fd7ff55 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!ACesium3DTileset::Tick() [D:\build\U5M\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\Cesium3DTileset.cpp:2067]
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76dd42d94 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!AActor::TickActor() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76dd0db8c LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FActorTickFunction::ExecuteTick() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76f45792f LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FTickFunctionTask::DoTask() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76f476746 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!TGraphTask::ExecuteTask() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff7682e7b4a LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FNamedTaskThread::ProcessTasksNamedThread() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff7682e811e LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FNamedTaskThread::ProcessTasksUntilQuit() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff7682f3f63 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76f4d1385 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FTickTaskSequencer::ReleaseTickGroup() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76f4dfd42 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FTickTaskManager::RunTickGroup() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76e91b6d3 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!UWorld::Tick() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76e66ceb9 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!UGameEngine::Tick() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76fccdada LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!FEngineLoop::Tick() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76fce5e2c LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!GuardedMain() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76fce5efa LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!GuardedMainWrapper() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76fce8ac5 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!LaunchWindowsStartup() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff76fcf8da4 LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!WinMain() []
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff774f1b60a LAMD_ITS_SE_3DMAP-Win64-DebugGame.exe!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2026.06.02-01.43.10:526][737]LogWindows: Error: [Callstack] 0x00007ff90764e957 KERNEL32.DLL!UnknownFunction []
[2026.06.02-01.43.10:526][737]LogWindows: Error:
[2026.06.02-01.43.10:556][737]LogExit: Executing StaticShutdownAfterError
[2026.06.02-01.43.10:558][737]LogWindows: FPlatformMisc::RequestExit(1, LaunchWindowsStartup.ExceptionHandler)
[2026.06.02-01.43.10:558][737]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3, LaunchWindowsStartup.ExceptionHandler)
[2026.06.02-01.43.10:558][737]LogCore: Engine exit requested (reason: Win RequestExit)

If I delay the Refresh() call by a few seconds using SetTimer after creating the UCesiumPolygonRasterOverlay, the crash does not occur.

My current suspicion is that calling Refresh() immediately after creating the overlay may be colliding with Cesium tile loading/unloading or raster overlay tile cleanup during ACesium3DTileset::Tick(), especially at camera positions where tile selection changes.

Delaying the Refresh() call by a few seconds with SetTimer is only a temporary workaround in my case. I would like to know if there is a more fundamental or recommended way to prevent this issue.

Thanks

Hey @Noaaaah,

Thanks for the detailed crash stack, that’s really useful.

One thing worth trying first: you’re on v2.21.0, and v2.21.1 was released shortly after as a patch (2025-12-01). It’s the last version to support UE 5.4, so upgrading to v2.21.1 would be the quickest thing to rule out whether this has already been addressed.

If the crash persists on v2.21.1, note that v2.22.0+ dropped UE 5.4 support entirely, so the longer-term path would be upgrading to UE 5.5+.

On the Refresh() question: it is a supported call on UCesiumPolygonRasterOverlay. However, for dynamically created overlays, the header docs recommend setting Auto Activate to false on the Add Component node, configuring your properties, then calling Activate rather than creating the overlay and calling Refresh(). This avoids the race condition you’re describing by not triggering a remove/re-add cycle while tiles are loading. Worth trying if you haven’t already.

In the mean time, I’ll see if I can reproduce this issue on newer versions and see if we can handle the case a little better