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 with selection #5888

Closed
DorpsGek opened this issue Jan 30, 2014 · 5 comments
Closed

Crash with selection #5888

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

Comments

@DorpsGek
Copy link
Member

twerkhoven opened the ticket and wrote:

It is possible to crash openttd using the convert rail tool.

Steps to reproduce:
* Load attached crash.sav
* Switch to company 2 (not sure if this affects outcome, just for completeness)
* Use convert rail (clean PURR) tool and select an area roughly the size of the selection in the png image. Zoom out as much as possible whilst doing this (8x)
* While dragging, press ctrl to change selection types.
* For me to replicate the crash, I needed a bigger selection area, pretty much the entire screen at 8x zoomed out @ 1440x900

It might not work 100% of the time, when succesful in crashing openttd with the following message:
Assertion failed at line 728 of /bamboo/src/command.cpp: res.GetCost() == res2.GetCost() && res.Failed() == res2.Failed()

If the player is connected to a multiplayer server when doing this, the server will crash too.

The included crash.* files are supplied by Meech, not by myself. I have replicated the crash, and will include my own crash.* in a reply.

Attachments

Reported version: 1.4.0-beta3
Operating system: Linux


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

twerkhoven wrote:

My own crash.* files

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5888#comment12984

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2014

fonsinchen wrote:

The cost when trying the command is different from the cost when actually executing it. Could it be that we have some kind of nondeterminism there? That might also explain the recent desyncs ...

res CommandCost
cost Money
m_value 902160 long long
expense_type EXPENSES_CONSTRUCTION (0) ExpensesType
message 65535 StringID
success true bool
textref_stack_grffile 0x0 GRFFile *
textref_stack_size 0 uint

res2 CommandCost
cost Money
m_value 887840 long long
expense_type EXPENSES_CONSTRUCTION (0) ExpensesType
message 65535 StringID
success true bool
textref_stack_grffile 0x0 GRFFile *
textref_stack_size 0 uint


This comment was imported from FlySpray: https://bugs.openttd.org/task/5888#comment12991

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2014

fonsinchen wrote:

The code in rail_cmd.cpp:1642f doesn't take diagonal tile iteration into account. That's why the results differ.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5888#comment12992

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2014

fonsinchen wrote:

This fixes it. However, if you have a lot of bridges and tunnels to be converted at the same time it may be somewhat expensive. Maybe "if (ManhattanDistance(tile, p1) < ManhattanDistance(endtile, p1))" works better. I'm not totally sure if that's correct, though.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5888#comment12994

@DorpsGek
Copy link
Member Author

DorpsGek commented Feb 1, 2014

fonsinchen closed the ticket.

Reason for closing: Duplicate

of #5866


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

@DorpsGek DorpsGek closed this as completed Feb 1, 2014
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 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