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

The Witness: Fix extremely late crash when Nothing items exist #3749

Closed
wants to merge 4 commits into from

Conversation

NewSoupVi
Copy link
Member

@NewSoupVi NewSoupVi commented Aug 8, 2024

In the area hint code, I forgot to check item is None before doing item.player == world.player in a couple of places. This caused an unnecessary crash when Nothing items exist.

Tested: New unit test (Edit: That is no longer part of the PR)

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Aug 8, 2024
@NewSoupVi NewSoupVi added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Aug 8, 2024
@NewSoupVi NewSoupVi force-pushed the area_hint_none_fix branch 2 times, most recently from 485b0ff to 1e2125d Compare August 8, 2024 23:25
@alwaysintreble
Copy link
Collaborator

i disagree with this on principle. there should be no unfilled locations when fill is finished. #2830

@NewSoupVi
Copy link
Member Author

NewSoupVi commented Aug 8, 2024

i disagree with this on principle. there should be no unfilled locations when fill is finished. #2830

Idk how to respond to that. Makes sense, I guess. Witness is fine with unfilled locations and right now they're still "a thing" so

If that gets merged I guess I'll close this

@NewSoupVi NewSoupVi force-pushed the area_hint_none_fix branch from d0878ab to dd262e3 Compare August 9, 2024 09:21
@NewSoupVi
Copy link
Member Author

NewSoupVi commented Aug 9, 2024

Simplified the change & decided to get rid of the unit test.
It's now one additional line that protects against this for now and wouldn't cause problems in the future
Maybe that's less controversial, iono
(Credit to Exempt-Medic for thinking of the simpler change)

Copy link
Member

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's one line. I would personally much rather have #2830 but this is one line, and if this gets merged first, it can just be undone in a bigger PR that undoes the other places Witness accounts for this

@NewSoupVi NewSoupVi closed this Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants