Players have figured out a way to freeze everyone's clients by spamming equipment drop (and automatic re-equip via magnetic harness) for a few seconds. Server seems to think nothing wrong (no infinite loop it complains about, no runtime, nothing logged, still thinks my client is connected), but client is just completely unresponsive indefinitely. If I kill the client, I can reconnect fine.
Server memory usage seems mostly unphased if I check before I do the exploit and then right after. Nothing has an overtime greater than .001...
Numbered Steps to Reproduce Problem:
1. Download and extract branch given on Discord for CMSS13
2. Rename containing folder to colonialmarines
3. Build and run (or if you want TGUI working you need to use bin/build.cmd); or whatever you need to do to run it
4. Spawn as a weapon specialist (pyro) with armor, flamer pack, flamer with mag harness, and another weapon with mag harness
5. Spam press E and Q (equip and drop) until you hang. (Requires show item animation preference to be its default setting of All)
Code Snippet (if applicable) to Reproduce Problem:
///Add an image to a list of clients and calls a proc to remove it after a duration
/proc/flick_overlay_to_clients(image/image_to_show, list/show_to, duration)
for(var/client/add_to in show_to)
add_to.images += image_to_show
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(remove_images_from_clients), image_to_show, show_to), duration, TIMER_CLIENT_TIME)
///Like remove_image_from_client, but will remove the image from a list of clients
/proc/remove_images_from_clients(image/image_to_remove, list/show_to)
for(var/client/remove_from in show_to)
remove_from.images -= image_to_remove
Expected Results:
Player to just be repeatedly dropping their weapons and mag harnesses snapping them back to their equipment.
Actual Results:
Client will hang after a few seconds of repeated use.
Does the problem occur:
Every time? Or how often? After about a few seconds of this spam
In other games? Unsure but likely
In other user accounts? Yes
On other computers? Yes
When does the problem NOT occur?
As far as I've seen this issue is exclusive to the pyro for us if they have another primary weapon since that means there can be two weapons both snapping back onto their equipment. Also if the show item animation preference is not on its default value of all, the client will not hang (because the code in the DM snippet isn't executed)
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Not sure when issue started. Reproduces in both 515.1634 and 514.1589.
Workarounds:
Only work around I found was to comment out the code in this reproduction steps to prevent it from doing the temporary images for the client.