Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controlled ship landing causes undefined behavior #25

Open
sfiera opened this issue Mar 13, 2015 · 3 comments
Open

Controlled ship landing causes undefined behavior #25

sfiera opened this issue Mar 13, 2015 · 3 comments

Comments

@sfiera
Copy link
Member

sfiera commented Mar 13, 2015

Original issue 22 created by sfiera on 2009-12-05T16:06:00.000Z:

What steps will reproduce the problem?

  1. Instruct a transport to land at a planet.
  2. Wait until the landing action has started (i.e. after the "whoosh").
  3. Take control of the ship.

What is the expected output? What do you see instead?

When the transport finishes the landing sequence, the game crashes. The
game should not permit the player to take control of any ship that has
started its landing sequence.

@sfiera
Copy link
Member Author

sfiera commented Mar 13, 2015

Comment #1 originally posted by Nathaniel.Stalberg on 2009-12-06T01:29:53.000Z:

Actually, I just tested this and it doesn't usually immediately crash Ares or Antares. It does cause strange
behavior though. Apparently, if you don't control anything, the game tries to transfer control to the next
object created, including ones that you shouldn't be able to control: projectiles, warp flares, energy pods,
enemy ships, etc. When the object you currently "control" dies, you jump to another, or if no objects are being
created, just sit around controlling nothing. The camera centers on the object, but you can't control it and
mouse selection and almost all keys stop working. You can still control the computer menu by double clicking
on it, but that's about it. Certain options don't work, including "transfer control", while others, such as "go to
my position" can cause the game to crash. You can still win or lose the mission, so if you captured the planet
needed to win, you'll win as normal within a couple seconds. During my speedrun, I recorded a video showing
Ares crashing when this happens, but I haven't replicated that today.

@sfiera
Copy link
Member Author

sfiera commented Mar 13, 2015

Comment #2 originally posted by sfiera on 2009-12-06T07:46:07.000Z:

Alright, then we'll chalk it down to undefined behavior. There's no correct course
of action, so it takes some arbitrary, incorrect course of action.

@sfiera sfiera modified the milestone: Later Mar 14, 2015
@sfiera
Copy link
Member Author

sfiera commented Apr 14, 2015

Implementation note: I think all that needs to be done is prevent transfers to objects whose presenceState is "kLandingPresence". This is probably fairly easy.

@sfiera sfiera removed their assignment Aug 31, 2016
@sfiera sfiera removed this from the Later milestone Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant