cmss13-devs / cmss13

Contains the code for CM-SS13
https://cm-ss13.com
GNU Affero General Public License v3.0
82 stars 462 forks source link

Admin moving a shuttle that can't land causes a crash #6402

Open ThePiachu opened 3 weeks ago

ThePiachu commented 3 weeks ago

Testmerges

None

Round ID

NA

Description of the bug

I was testing something locally and ran into this bug:

[2024-06-08 10:49:19.497] runtime error: Called request() with mode: pre-arrival.
 - proc name: stack trace (/proc/stack_trace)
 -   source file: code/__HELPERS/unsorted.dm,1467
 -   usr: Immature Queen (/mob/living/carbon/xenomorph/queen)
 -   src: null
 -   usr.loc: the floor (235,55,4) (/turf/open/shuttle/dropship)
 -   call stack:
 - stack trace("Called request() with mode: pr...")
 - Alamo (/obj/docking_port/mobile/marine_dropship/alamo): request(LZ1: Communications Landing Zo... (/obj/docking_port/stationary/marine_dropship/lz1))
 - Alamo (/obj/docking_port/mobile/marine_dropship/alamo): admin fly shuttle(Immature Queen (/mob/living/carbon/xenomorph/queen))
 - Shuttle (/datum/controller/subsystem/shuttle): ui act("fly", /list (/list), /datum/tgui (/datum/tgui), /datum/ui_state/admin_state (/datum/ui_state/admin_state))
 - /datum/tgui (/datum/tgui): on act message("fly", /list (/list), /datum/ui_state/admin_state (/datum/ui_state/admin_state))
 - /datum/tgui (/datum/tgui): on message("act/fly", /list (/list), /list (/list))
 - /datum/tgui_window (/datum/tgui_window): on message("act/fly", /list (/list), /list (/list))
 - tgui Topic(/list (/list))
 - ThePiachu (/client): Topic("type=act%2Ffly&payload=%7B%22i...", /list (/list), null)

It was caused when I accidentally sent two shuttles to the same location as admin and tried moving one of them to a different landing zone.

What's the difference with what should have happened?

You should be able to safely recover from admin derps.

How do we reproduce this bug?

  1. Start game
  2. Send both shuttles as admin to the same LZ via Admin -> Shuttles -> Shuttle Manipulator
  3. When one arrives and the other can't land, you will see messages that the shuttle is being blocked
  4. Try sending the blocked shuttle to any other LZ via Shuttle Manipulator
  5. You will encounter the runtime error caused by trying to send the shuttle that is in the pre-arrival state

Issue Bingo

dadlips commented 3 weeks ago

You can solve this by moving the other dropship.