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

Don't give bogus cache error for path reservations #3003

Closed
DorpsGek opened this issue Jun 28, 2009 · 6 comments
Closed

Don't give bogus cache error for path reservations #3003

DorpsGek opened this issue Jun 28, 2009 · 6 comments
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) stale Stale issues

Comments

@DorpsGek
Copy link
Member

Swallow opened the ticket and wrote:

r16687

In the YAPF (rail) function PfCalcCost, it seems to me that reserved tracks aren't masked out when required. For most pathfinders this makes no difference, but it does when finding a safe tile.
I think that changing line 443 of yapf_costrail.hpp to:
if (!tf_local.Follow(cur.tile, cur.td) || !tf_local.MaskReservedTracks()) {
would solve the issue.

Upon request, I could setup a test savegame.

I do not know whether this causes any problems/desyncs, but at least it created 'CACHE ERROR' messages in my console.

Reported version: trunk
Operating system: All


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

michi_cc wrote:

Whatever the problem is, that can't be the proper solution because it would
essentially declare a [free track] - [reserved track] situation as DEAD_END and
SAFE_TILE, which it definitely is not.

So, yes, a test savegame is very much of interest here.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3003#comment6280

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Yes, YAPF cache errors are a possible cause for desyncs.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3003#comment6281

@DorpsGek
Copy link
Member Author

Swallow wrote:

See attached file, created with r16691. Train 2 is trying to reserve a path through train 1's reservation, which succeeds
while pathfinding but fails when trying to reserve, causing CACHE ERROR messages when DEBUG_YAPF_CACHE is set to 1.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3003#comment6282

@DorpsGek
Copy link
Member Author

DorpsGek commented Jul 4, 2009

michi_cc wrote:

The 'CACHE ERROR' itself is just a cosmetic problem caused by the failure to
actually reserve the found path. As both pathfinder rounds do find the same path,
this is not a desync-situation though.

I'll see if I can do something to improve the situation.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3003#comment6291

@DorpsGek
Copy link
Member Author

LordAro wrote:

Doesn't seem to be any warnings any more in current trunk (r27893), but the failure to reserve the found path is still there, i.e. train 2 is still blocked from moving

(currently yapf_costrail.hpp:496)


This comment was imported from FlySpray: https://bugs.openttd.org/task/3003#comment14554

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) enhancement labels Apr 7, 2018
@TrueBrain TrueBrain added bug Something isn't working and removed enhancement from FlySpray labels Apr 14, 2018
@andythenorth andythenorth added the stale Stale issues label Jan 5, 2019
@andythenorth
Copy link
Contributor

Thanks for this. There's been no activity on this for some time, and as it stands, it doesn't look likely that it will go any further. I'm closing it as we try to keep the issue count low for OpenTTD, it helps us focus on things that are important and fun. Feel free to discuss in irc or request re-opening if you disagree. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) stale Stale issues
Projects
None yet
Development

No branches or pull requests

3 participants