From 6e86e089f36641b02641fb03cdab1f8875c88bb3 Mon Sep 17 00:00:00 2001 From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Date: Sat, 15 Apr 2023 22:30:32 +0200 Subject: [PATCH] Fuck this, we rollin' (#16202) --- code/controllers/subsystems/timer.dm | 6 +-- .../fluffyghost-timerstacktrace.yml | 41 +++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/fluffyghost-timerstacktrace.yml diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm index 6a390ae5168..5b14ad02ae1 100644 --- a/code/controllers/subsystems/timer.dm +++ b/code/controllers/subsystems/timer.dm @@ -559,16 +559,16 @@ var/datum/controller/subsystem/timer/SStimer CRASH("addtimer called without a callback") if (wait < 0) - CRASH("addtimer called with a negative wait. Converting to [world.tick_lag]") + stack_trace("addtimer called with a negative wait. Converting to [world.tick_lag]") if (callback.object != GLOBAL_PROC && QDELETED(callback.object) && !QDESTROYING(callback.object)) - CRASH("addtimer called with a callback assigned to a qdeleted object. In the future such timers will not \ + stack_trace("addtimer called with a callback assigned to a qdeleted object. In the future such timers will not \ be supported and may refuse to run or run with a 0 wait") wait = max(Ceilm(wait, world.tick_lag), world.tick_lag) if(wait >= INFINITY) - CRASH("Attempted to create timer with INFINITY delay") + stack_trace("Attempted to create timer with INFINITY delay") // Generate hash if relevant for timed events with the TIMER_UNIQUE flag var/hash diff --git a/html/changelogs/fluffyghost-timerstacktrace.yml b/html/changelogs/fluffyghost-timerstacktrace.yml new file mode 100644 index 00000000000..4356aef4458 --- /dev/null +++ b/html/changelogs/fluffyghost-timerstacktrace.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: Fluffyghost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - backend: "Use stack_trace when addtimer fails for QDEL'd or negative timers."