ParadiseSS13 / Paradise

Paradise Station's GitHub main repository.
https://www.paradisestation.org/forum
GNU Affero General Public License v3.0
383 stars 1.15k forks source link

Griefsky bots cause unresolvable exception on shot #25847

Open leboucliervert opened 4 weeks ago

leboucliervert commented 4 weeks ago

Exploit Reports

BYOND Version

515.1640

Issue Description

When you shoot and do damage to any type of griefsky bot (toysword and esword) three times, it will cause the following exception : Exception has occurred: Cannot execute null.assess threat(). in the retaliate code block of code/modules/mob/living/simple_animal/bot/secbot.dm

What did you expect to happen?

For it to not cause an unresolvable exception.

What happened instead?

It caused an unresolvable exception that freeze the game until closed or ignored via VScode.

Why is this bad/What are the consequences?

Bug bad. Can probably stop a round on the main server.

Steps to reproduce the issue.

Spawn griefsky bot (toy or real) Turn off or leave on (Does not matter) Shoot thrice with a damaging energy weapons On the third damaging hit, the exception will occur

When did the problem start happening?

I was coding the 7th june and discovered the error while fixing another bug in the griefky explode() code. I also checked on a non-modified fork of the main repository and the same error occurs.

Extra information

No response

Relevant log output/runtime error

Exception has occurred: Cannot execute null.assess threat().

Affected line of code :
line 183 of code/modules/mob/living/simple_animal/bot/secbot.dm :
`threatlevel = H.assess_threat(src)`
Taurtura commented 2 weeks ago

While destroying it does runtime, it doesn't seem to freeze the game when I tested this. It is also worth noting it only runtimed when destroyed, and not after three shots.

leboucliervert commented 1 week ago

Woe is me for testing it badly. I always shot it with pulse weaponry so it always died in three shots. As for the freezing.. I assume it is because I use a potato PC