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

Fix AtmosDeviceSystem debug assert Heisenbug #29752

Merged

Conversation

Tayrtahn
Copy link
Member

@Tayrtahn Tayrtahn commented Jul 5, 2024

About the PR

Kills the pesky debug assert that sometimes triggers on certain integration tests.

Why / Balance

Fixes #28908.

Technical details

The assertion is triggered when an atmos device that is being tracked as off-grid (more accurately, on a grid that doesn't have an atmosphere) is updated and turns out to actually be on-grid (a grid with an atmosphere). There are a few ways this can happen, with grid splitting, automatic atmosphere addition when a grid is big enough, and possibly more.

The assertion is replaced by code to gracefully handle the issue by making the device try to RejoinAtmosphere and get properly tracked.

The PR includes a test that reproduces the error with the current master and passes with the changes from this PR. A method was added to AtmosDeviceSystem to check whether a given entity is considered off-grid.

Media

Code.

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

Nah.

@Tayrtahn Tayrtahn requested a review from Partmedia as a code owner July 5, 2024 22:24
@github-actions github-actions bot added the Status: Needs Review This PR requires new reviews before it can be merged. label Jul 5, 2024
@Partmedia Partmedia added the Atmos label Jul 5, 2024
@Partmedia
Copy link
Contributor

Thanks for investigating, fixing it, and testing it! I'm going to need to take some time to understand the issue and fix, but if someone else is confident and understands what's going on please go ahead and merge this.

@Tayrtahn
Copy link
Member Author

Tayrtahn commented Jul 5, 2024

Yeah, by all means do take your time with this. My understanding of the atmos system is pretty minimal, so there very well could be a better fix for this!

@metalgearsloth
Copy link
Contributor

Option A I comment out vgroid (which I'm not against).
Option B I merge this in the interim pending further review.

If anyone wants me to take option A let me know.

@metalgearsloth metalgearsloth merged commit e6f55fa into space-wizards:master Jul 11, 2024
13 checks passed
Callmore pushed a commit to Callmore/space-station-14 that referenced this pull request Jul 14, 2024
Fix AtmosDeviceSystem debug assertion Heisenbug
aspiringLich pushed a commit to aspiringLich/space-station-14 that referenced this pull request Jul 21, 2024
Fix AtmosDeviceSystem debug assertion Heisenbug
themias pushed a commit to themias/space-station-14 that referenced this pull request Aug 9, 2024
Fix AtmosDeviceSystem debug assertion Heisenbug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Atmos Status: Needs Review This PR requires new reviews before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpawnAndDeleteAllEntitiesOnDifferentMaps fails randomly
3 participants