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

Airport Removal crashes trunk/ #640

Closed
DorpsGek opened this issue Feb 20, 2007 · 9 comments
Closed

Airport Removal crashes trunk/ #640

DorpsGek opened this issue Feb 20, 2007 · 9 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

izhirahider opened the ticket and wrote:

trunk/, revision 8824.

Removing an airport causes OpenTTD to crash, reporting the following message:

(...)/src/station.h:118: const AirportFTAClass* Station::Airport() const: Assertion `airport_tile != 0' failed.

A way to reproduce it is shown in the following video:
http://www.youtube.com/watch?v=1jStlM2gPnQ

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/640
@DorpsGek
Copy link
Member Author

Rubidium wrote:

It's caused by r8755, but I'm not sure what the best way to solve this problem is.


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment945

@DorpsGek
Copy link
Member Author

Leviath.NL wrote:

I did manage to just delete that line to fix the problem but this seems no real solution to me....


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment958

@DorpsGek
Copy link
Member Author

Tonio2000 wrote:

Help me!!!

What can I do?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment960

@DorpsGek
Copy link
Member Author

Weztie wrote:

I have found a work around. Perhaps it will help developers locate the problem too.

If you remove the airport you want to delete from the goto list for all airplanes you can delete the airport.
However, you do need to ensure that any airplanes that have just left the airport have made their turns away from the airport. That is they are not in the holding or takeoff patterns.


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment961

@DorpsGek
Copy link
Member Author

Arathorn wrote:

I've found out that simply making sure no airplane is currently going to the airport you want to remove or no airplanes are taking off you can safely remove the airport.


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment1071

@DorpsGek
Copy link
Member Author

Weztie wrote:

I believe that this became the case when patch r8921 was made. There are comments against that patch that indicated it fixed some airplane issues. I did a little more testing and found that the crash appears to occur whenever a plane is on-route to the airport you are deleting, or has taken off from, but not yet made the first turn.


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment1074

@DorpsGek
Copy link
Member Author

Skaven55 wrote:

I have created this patch to solve this problem. r8755 added an incorrect assert to airport_tile != 0 where GetAirport already handles this issue (as it did prior to r8755). A deletion of an airport causes airport_tile to reset to 0 and the next call of Airport() results in a debug error.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment1103

@DorpsGek
Copy link
Member Author

Celestar wrote:

Attempt to solve this problem by adding a "dummy" State Machine. However, as the previous poster displayed, GetAirport already makes sure that the game asserts when a wrong State Machine is selected, so a simple removal of the assert would fix the problem as well.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/640#comment1112

@DorpsGek
Copy link
Member Author

Celestar closed the ticket.

Reason for closing: Fixed

r9524


This comment was imported from FlySpray: https://bugs.openttd.org/task/640

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant