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

[MIRROR] Fixes a bunch of AI related CI runtimes #1071

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Skyrat: Skyrat-SS13/Skyrat-tg#25552
Original PR: tgstation/tgstation#80202

About The Pull Request

A bunch of the numerous CI issues

image

image

You can view the full list of them here https://github.com/Skyrat-SS13/Skyrat-tg/actions/runs/7148986054/job/19470671408.

What seems to be happening is, the ai_controller fire()s, and at some point the the pawn var has become null from qdeletion. Many of the SelectBehaviors() procs make use of that var, and then try to access it without any safeties whatsoever.

I believe it is mainly happening because of long do_after()s and other procs that sleep.

This PR just adds those safeties. I probably didn't get them all, but this should fix the ones I have seen in CI. There may be a better solution to cover all future cases of this but I will wait on feedback to proceed. See below comments:


I don't know if you would rather this to always be checked at the controller level instead (or in able_to_plan() perhaps?) but I could do that if it's wanted. I wasn't sure if there were certain things that depended on SelectBehaviors() running for cleanup so I opted against that.

On that note, shouldn't we just be qdeleting the ai_controller when the pawn gets qdeleted? Is that not already happening? And if not, is there a reason for it? That would probably be the best way to handle it...

Why It's Good For The Game

I would like to stop seeing so many random CI failures, wouldn't you?

Changelog

🆑 vinylspiders
fix: fixes some AI runtimes that were caused by the pawn becoming null
/:cl:

* Fixes a bunch of AI related CI runtimes (#80202)

## About The Pull Request

<details><summary>A bunch of the numerous CI issues </summary>

![image](https://github.com/tgstation/tgstation/assets/13398309/70b0419e-0ac4-4a59-8acb-02511f8d6987)

![image](https://github.com/tgstation/tgstation/assets/13398309/4303923d-aaea-438f-9eb2-d27b510c7bc6)

</details>

You can view the full list of them here
https://github.com/Skyrat-SS13/Skyrat-tg/actions/runs/7148986054/job/19470671408.

What seems to be happening is, the `ai_controller` `fire()`s, and at
some point the the `pawn` var has become null from qdeletion. Many of
the `SelectBehaviors()` procs make use of that var, and then try to
access it without any safeties whatsoever.

I believe it is mainly happening because of long `do_after()`s and other
procs that sleep.

This PR just adds those safeties. I probably didn't get them all, but
this should fix the ones I have seen in CI. There may be a better
solution to cover all future cases of this but I will wait on feedback
to proceed. See below comments:

---

I don't know if you would rather this to always be checked at the
controller level instead (or in `able_to_plan()` perhaps?) but I could
do that if it's wanted. I wasn't sure if there were certain things that
depended on `SelectBehaviors()` running for cleanup so I opted against
that.

On that note, shouldn't we just be qdeleting the `ai_controller` when
the pawn gets qdeleted? Is that not already happening? And if not, is
there a reason for it? That would probably be the best way to handle
it...

## Why It's Good For The Game

I would like to stop seeing so many random CI failures, wouldn't you?

## Changelog

:cl:
fix: fixes some AI runtimes that were caused by the pawn becoming null
/:cl:

* Fixes a bunch of AI related CI runtimes

---------

Co-authored-by: Bloop <[email protected]>
@Iajret Iajret merged commit 3151b6b into master Dec 12, 2023
23 checks passed
AnywayFarus added a commit that referenced this pull request Dec 12, 2023
@Iajret Iajret deleted the upstream-mirror-25552 branch December 12, 2023 22:40
Iajret pushed a commit that referenced this pull request Feb 20, 2024
* [NO GBP] fixing issues with cutouts and potted plants (#81570)

## About The Pull Request
This should fix #81560 and fix #81561,

## Why It's Good For The Game
Oh no, another invisibility exploit.

## Changelog

:cl:
fix: fixed an issue with tactical appearance (potted plants / cardboard
cutouts) not going away after giving the item to someone else.
fix: Fixed slaughter demon cutouts being invisible. Also fixed another
issue with the tactical appearance not going away when the cardboard
cutout is pushed down.
/:cl:

* [NO GBP] fixing issues with cutouts and potted plants

---------

Co-authored-by: Ghom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants