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

Crash while watching airport with many (IsBuoy_(t)) #86

Closed
DorpsGek opened this issue Mar 28, 2006 · 3 comments
Closed

Crash while watching airport with many (IsBuoy_(t)) #86

DorpsGek opened this issue Mar 28, 2006 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

FrankW opened the ticket and wrote:

To reproduce:

  1. Open attached save game
  2. Go to "Frunpool Flughafen" (should already be centered when opening the game)
  3. Wait a bit, it should not take long to crash

Results:
Assertion in station_map.c, Expression IsBuoy_(t)
If assertion is ignored, Assertion title < MapSize() follows, then another assertion and then it crashes.
I think this bug was not present in a somewhat older nightly.

Reported version: trunk
Operating system: All


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

FrankW wrote:

Seems like this is a regression, this broke between r4109 and r4115.
BTW: The last assertion i get is IsTileType(t, MP_STATION) (for the "then another assertion" in the bug report itself).


This comment was imported from FlySpray: https://bugs.openttd.org/task/86#comment150

@DorpsGek
Copy link
Member Author

Darkvater wrote:

Indeed, the GetStationType() screws up for the helipads. The old code says:
(str=STR_3060_AIRPORT, m5 < 0x43 || (m5 >= 83 && m5 <= 114)) ||

But the new code says:
IS_INT_INSIDE(_m[t].m5, AIRPORT_BASE, AIRPORT_BASE + AIRPORT_SIZE) ||
IS_INT_INSIDE(_m[t].m5, AIRPORT_BASE_EXTENDED, AIRPORT_BASE_EXTENDED + AIRPORT_SIZE_EXTENDED);

which is [8, 67) || [83, 114). IS_INT_INSIDE is NOT inclusive the last element os in essence it is m5>=83 && m5<114, different from the old code. Perhaps a +1 at the end? I would look at station_map.h again double-checking everything because according to the old code HANGAR0=32, HANGAR1=45, but in the new HANGAR0=32, HANGAR=65. I think that is wrong as well.


This comment was imported from FlySpray: https://bugs.openttd.org/task/86#comment151

@DorpsGek
Copy link
Member Author

Celestar closed the ticket.

Reason for closing: Fixed


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

@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