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 at building airports in Toyland in Multiplayer game #504

Closed
DorpsGek opened this issue Jan 2, 2007 · 5 comments
Closed

Crash at building airports in Toyland in Multiplayer game #504

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

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jan 2, 2007

Zuu opened the ticket and wrote:

== OTTD Version ==
0.5 RC2, compiled from source on 32bit Debian Linux

== How to reproduce? ==
* Open attached savegame (a multiplayer-game)
* Build any airport except helicopter airports.
=> Crash with the folowing output in the shell:
openttd: station_cmd.c:3187: StationRect_BeforeAddTile: Assertion `mode != RECT_MODE_TRY' failed.

I've tried to start a new singleplayer and then the game does not crash.
I've loaded the provided savegame in singelplayer and tried => resulting in crashes.

== The Game ==
512x512 map of Toyland.

== What to do? ==
See if this is just this multiplayer-game or if this bug hapens for any multiplayer game in Toyland.

Reported version: trunk
Operating system: All


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

DorpsGek commented Jan 3, 2007

Zuu wrote:

The openttd.cfg comes here.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/504#comment779

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 3, 2007

Zuu wrote:

[skip down to end of post, I found the true orgin of the bug]

Sorry for not beeing clear. The .cfg-file is for the server, not my client.

---

I've tried to host a game with that cfg (except for server ID, player name, server name, client ID).
Building Small airport works, but when I build a comuters airport, the server crashes this time (earlier when I found the bug it was my client that crashed). The client gets disconnected as the server crashes. The output from the server is:
openttd: station_cmd.c:3187: StationRect_BeforeAddTile: Assertion `mode != RECT_MODE_TRY' failed.

Exit code is 134, if that helps.

I've also tried with a windows-version of OTTD as client and it also crashes the server. (with the same assertion).
And lastly I've tried with windows as server with above attached .cfg and a Linux client. That resulted on a crash on the Linux Client.

== Summary ==
Crash ocours on Linux Client or Server, if both are Linux it oucours on the Server. If both are Windows nothing happens.

== Found the true orgin of bug! ==
When station_spread is set to < size of airport OpenTTD crashes on Linux. Why it does not on Windows I don't know. Maybe because the assert have been disabled in the windows build?

Yay! :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/504#comment780

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 3, 2007

Zuu wrote:

== Soulution ==
I've studied the code and I have found out why this bug ocours and I have a soulution. However, since it is over 3 AM, here, I'll post a patch later.

Cheers


This comment was imported from FlySpray: https://bugs.openttd.org/task/504#comment781

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 3, 2007

Zuu wrote:

== Patch ==
This patch fixes the "crashes". When one is placing airpots as new station, it does not make sure that it is smaller than station_spread. This is the simple way. The other way would be to reject airports larger than station_spread. But that would need changes in the gui, perhaps dissable airports in the build menu larger than station_spread.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/504#comment782

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2007

KUDr closed the ticket.

Reason for closing: Fixed

r7810 /trunk/src/station_cmd.c: -Fix: #504 Building airport whose size exceeds max station spread-out caused assert. (Zuu)


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

@DorpsGek DorpsGek closed this as completed Jan 4, 2007
@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