vgstation-coders / vgstation13

Butts
GNU Affero General Public License v3.0
265 stars 546 forks source link

Runtime "bad index" when haunting dead simple mobs. #17068

Closed ShiftyRail closed 4 years ago

ShiftyRail commented 6 years ago

Bad "something" is very bad indeed, so I'm reporting it.

Clicking on a Russian who has just died gives me this error :

[10:12:52] Runtime in atoms_movable.dm, line 326: bad index

proc name: get lock cat (/atom/movable/proc/get_lock_cat)
usr: Gregory Powell (shiftyrail) (/mob/dead/observer)
usr.loc: The floor (235, 254, 1) (/turf/simulated/floor)
src: Russian (/mob/living/simple_animal/hostile/humanoid/russian/ranged)
src.loc: null
call stack:
Russian (/mob/living/simple_animal/hostile/humanoid/russian/ranged): get lock cat(/datum/locking_category/observ... (/datum/locking_category/observer))
Russian (/mob/living/simple_animal/hostile/humanoid/russian/ranged): lock atom(Gregory Powell (/mob/dead/observer), /datum/locking_category/observ... (/datum/locking_category/observer))
Gregory Powell (/mob/dead/observer): manual follow(Russian (/mob/living/simple_animal/hostile/humanoid/russian/ranged))
Gregory Powell (/mob/dead/observer): Topic("src=\[0x3000275];follow=\[0x30...", /list (/list))
Shifty_rail (/client): Topic("src=\[0x3000275];follow=\[0x30...", /list (/list), Gregory Powell (/mob/dead/observer))
Shifty_rail (/client): Topic("src=\[0x3000275];follow=\[0x30...", /list (/list), Gregory Powell (/mob/dead/observer))

Clicking on a Russian who is dead just sends me to nullspace.

If I had to take a guess, I would say it's because Russian are simple animals when alive, and carbon/human when dead. I'm not sure.

Shadowmech88 commented 4 years ago

If memory serves, "bad index" errors occur from attempting to access an index inside a list which has been defined, but not yet created.

ghost commented 4 years ago

Just tested this. Appears to be fixed.