Skip to content

Fix Regression: null UWorld deref in CesiumGaussianSplatSubsystem::Tick#1844

Merged
j9liu merged 2 commits into
CesiumGS:mainfrom
UmarMukhtar0039:main
May 26, 2026
Merged

Fix Regression: null UWorld deref in CesiumGaussianSplatSubsystem::Tick#1844
j9liu merged 2 commits into
CesiumGS:mainfrom
UmarMukhtar0039:main

Conversation

@UmarMukhtar0039

@UmarMukhtar0039 UmarMukhtar0039 commented May 26, 2026

Copy link
Copy Markdown
Contributor

Moved IsValid(pWorld) above the IsNetMode(NM_DedicatedServer) deref so a null result from GetPrimaryWorld() no longer crashes InternalGetNetMode. Restores the v2.24.1 ordering inverted by commit 05fce68.

Fixes #1841

Description

Restore the IsValid(pWorld) check above the pWorld->IsNetMode(NM_DedicatedServer) deref in UCesiumGaussianSplatSubsystem::Tick. This is the ordering that shipped in 2.24.1 (UE 5.7 Marketplace) and was inadvertently regressed in commit 05fce68 ("close to working [skip ci]") during the recent Niagara/Gaussian-splat refactor.

This fixes #1841 and also Play in Standalone in Unreal projects with Cesium enabled.

Issue number or link

#1841 and also Play in Standalone crash in Unreal projects with Cesium enabled.

Author checklist

  • I have submitted a Contributor License Agreement (only needed once).
  • I have done a full self-review of my code.
  • I have updated CHANGES.md with a short summary of my change (for user-facing changes).
  • [ ] I have added or updated unit tests to ensure consistent code coverage as necessary.
  • [ ] I have updated the documentation as necessary.

Remaining Tasks

NA

Testing plan

  • Make a fresh project in Unreal and enable CesiumForUnreal
  • Login to Cesium Ion
  • Bring in the 3D tiles and start the project in Standalone.

Reviewer checklist

Thank you for taking the time to review this PR. By approving a PR you are taking as much responsibility for these changes as the author.

As you review, please go through the checklist below:

  • Review and run all parts of the test plan on this branch and verify it matches expectations.
    • If the issue is a bug please make sure you can reproduce the bug in the main branch and then checkout this branch to make sure it actually solved the issue.
  • Review the code and make sure you do not have any remaining questions or concerns. You should understand the code change and the chosen approach. If you are not confident or have doubts about the code, please do not hesitate to ask questions.
  • Review the unit tests and make sure there are no missing tests or edge cases.
  • Review documentation changes and updates to CHANGES.md to make sure they accurately cover the work in this PR.
  • Verify that the Contributor License Agreement has been submitted, if needed.

Move IsValid(pWorld) above the IsNetMode(NM_DedicatedServer) deref so a
null result from GetPrimaryWorld() no longer crashes InternalGetNetMode.
Restores the v2.24.1 ordering inverted by commit 05fce68.

Fixes CesiumGS#1841
@j9liu

j9liu commented May 26, 2026

Copy link
Copy Markdown
Contributor

Thank you for opening this @UmarMukhtar0039! The fix looks good, sorry that I ended up breaking things 😅

If you could update CHANGES.md with an entry about this bugfix, this PR will be good to go!

@UmarMukhtar0039

UmarMukhtar0039 commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

@j9liu This is ready

@j9liu j9liu added this to the June 2026 Release milestone May 26, 2026
@laurenfrederick laurenfrederick requested a review from j9liu May 26, 2026 15:14
@j9liu

j9liu commented May 26, 2026

Copy link
Copy Markdown
Contributor

Thanks @UmarMukhtar0039! I confirmed that this does fix the crash in standalone game mode.

It seems that Gaussian splats don't show up in the standalone window, unfortunately, but that can be addressed as a separate issue. I'll wait for CI to pass before merge. Thanks again!

@UmarMukhtar0039

Copy link
Copy Markdown
Contributor Author

Hi @j9liu I also noticed that. I am pretty sure it has to do with how we get the world context - the function GetPrimaryWorld() the code early exits if we are not in the editor. I'll see what I can do in my free time.

@j9liu j9liu merged commit 505fd4d into CesiumGS:main May 26, 2026
23 checks passed
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.

nDisplay Bug with GaussianSplatSubsystem

2 participants