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

Fixes milk runtime in on_mob_life() (and maybe other reagents) #5327

Merged
merged 1 commit into from
Dec 30, 2023

Conversation

Birdtalon
Copy link
Contributor

@Birdtalon Birdtalon commented Dec 28, 2023

About the pull request

Seen this runtime a couple of times now with milk specifically. But this situation I believe could also occur in other reagent/on_mob_life()

holder being null can occur if we qdel the reagent during remove_reagent() and we then try to call procs on the now null holder further down the thread of on_mob_life(). We now check again if !holder after calling remove_reagent() at
/datum/reagent level which will cause us to return early in on_mob_life() which should call parent when implemented and not operate on a null holder

[2023-12-28 17:57:27.386] runtime error: Cannot execute null.remove reagent().
 - proc name: on mob life (/datum/reagent/drink/milk/on_mob_life)
 -   source file: code/modules/reagents/chemistry_reagents/drink.dm,168
 -   usr: null
 -   src: Milk (/datum/reagent/drink/milk)
 -   call stack:
 - Milk (/datum/reagent/drink/milk): on mob life(Gilles Liebreich (/mob/living/carbon/human), 0, 2)
 - /datum/reagents (/datum/reagents): metabolize(Gilles Liebreich (/mob/living/carbon/human), 0, 2)
 - Gilles Liebreich (/mob/living/carbon/human): handle chemicals in body(2)
 - Gilles Liebreich (/mob/living/carbon/human): Life(2)
 - Human Life (/datum/controller/subsystem/human): fire(0)
 - Human Life (/datum/controller/subsystem/human): ignite(0)
 - Master (/datum/controller/master): RunQueue()
 - Master (/datum/controller/master): Loop(2)
 - Master (/datum/controller/master): StartProcessing(0)
 - 

Explain why it's good for the game

Testing Photographs and Procedure

Screenshots & Videos

Put screenshots and videos here with an empty line between the screenshots and the <details> tags.

Changelog

🆑
fix: Runtime with milk and possibly other reagent's on_mob_life()
/:cl:

@github-actions github-actions bot added the Fix Fix one bug, make ten more label Dec 28, 2023
Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

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

Code changes look fine.

I was also able to reproduce the runtime on master, but not reproduce it on this branch.

@Drulikar Drulikar added this pull request to the merge queue Dec 30, 2023
Merged via the queue into cmss13-devs:master with commit 2764eaa Dec 30, 2023
28 checks passed
cm13-github added a commit that referenced this pull request Dec 30, 2023
@Birdtalon Birdtalon deleted the moremilk branch February 25, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Fix one bug, make ten more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants