From 0a16ab6564bacfc4bb5e6965b50f193675f11f87 Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Wed, 19 Aug 2026 18:09:28 +0000 Subject: [PATCH] Fix carp migration hard delete (#23064) * Please describe the intent of your changes in a clear fashion. This PR addresses issue SERVER-PROD-12K by correcting a hard delete warning related to `/mob/living/simple_animal/hostile/carp` during the carp migration event. Previously, in `code/modules/events/carp_migration.dm`, the `end()` proc was calling `qdel(carp_weakref)` instead of `qdel(fish)`. This meant the weakref datum was being deleted, but the actual carp mob was left without a proper `qdel()` call, leading to BYOND's garbage collector performing a 'hard delete' and logging a warning. The fix changes `qdel(carp_weakref)` to `qdel(fish)` on line 103, ensuring the carp mob is correctly soft-deleted when the event ends. * Please make sure that, in the case of mapping changes, you include images of these changes in the PR's description. (No mapping changes in this PR) * Please make sure to mark your PR as wip or review required by making a comment with !wip or !review required * If you include sprites/sounds/... (assets) that you have not created yourself specify the license and original author below. * Ensure that you also credit them in the appropriate location / changelog as specified in the contributor guidelines ### Asset Licenses The following assets that **have not** been created by myself are included in this PR: | Path | Original Author | License | | --- | --- | --- | | icons/example.dmi | ExamplePerson (Example Station) | CC0 | (No new assets included in this PR) Fixes [SERVER-PROD-12K](https://aurorastation.sentry.io/issues/7522667244/?seerDrawer=true) --------- Co-authored-by: VMSolidus --- code/modules/events/carp_migration.dm | 4 ++-- code/modules/events/wandering_psirens.dm | 2 +- html/changelogs/hellfirejag-carp-migration-harddel.yml | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/hellfirejag-carp-migration-harddel.yml diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 0936e91e128..488df7c5141 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -97,10 +97,10 @@ ..() for (var/datum/weakref/carp_weakref in spawned_carp) - var/mob/living/simple_animal/hostile/carp/fish = carp_weakref.resolve() + var/mob/fish = carp_weakref.resolve() if (fish && prob(50) && is_type_in_typecache(fish.loc, despawn_turfs)) spawned_carp -= carp_weakref - qdel(carp_weakref) + qdel(fish) spawned_carp?.Cut() /datum/event/carp_migration/cozmo/start() diff --git a/code/modules/events/wandering_psirens.dm b/code/modules/events/wandering_psirens.dm index 7809e83008e..1cc90451b33 100644 --- a/code/modules/events/wandering_psirens.dm +++ b/code/modules/events/wandering_psirens.dm @@ -72,7 +72,7 @@ var/mob/living/simple_animal/hostile/psiren/psiren = psiren_weakref.resolve() if (psiren && prob(50) && is_type_in_typecache(psiren.loc, despawn_turfs)) spawned_psirens -= psiren_weakref - qdel(psiren_weakref) + qdel(psiren) spawned_psirens?.Cut() /datum/event/wandering_psirens/overmap diff --git a/html/changelogs/hellfirejag-carp-migration-harddel.yml b/html/changelogs/hellfirejag-carp-migration-harddel.yml new file mode 100644 index 00000000000..19947080bc0 --- /dev/null +++ b/html/changelogs/hellfirejag-carp-migration-harddel.yml @@ -0,0 +1,4 @@ +author: Hellfirejag +delete-after: True +changes: + - bugfix: "Fixed a hard del caused by ccarp and psiren migrations."