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

Fix #6507: Don't try to load invalid depots from older savegames #7546

Merged
merged 4 commits into from Apr 29, 2019

Conversation

LordAro
Copy link
Member

@LordAro LordAro commented Apr 27, 2019

And also another bug spotted along the way
And another cleanup

Fixes #6605 as well, as it appears to be duplicated

@LordAro LordAro requested a review from PeterN April 27, 2019 13:31
@PeterN
Copy link
Member

PeterN commented Apr 28, 2019

Is there any possibility of vehicles being inside one of these invalid depots?

@LordAro
Copy link
Member Author

LordAro commented Apr 28, 2019

Given we don't properly understand what caused the invalid depots, I can't be entirely sure. However, given all known "invalid depots" have been next to rails, and there aren't any connecting rails, I don't think so. As best as I can tell, they were depots that existed at some point, but were removed prior to saving, but somehow were still saved anyway

@nielsmh
Copy link
Contributor

nielsmh commented Apr 28, 2019

Is there a way to check if any vehicles are (supposed to be) inside the depot before deleting it, and fail loading in that case?

@LordAro
Copy link
Member Author

LordAro commented Apr 28, 2019

Wouldn't it fail in some other way if you try to delete a depot with vehicles in it?

@PeterN
Copy link
Member

PeterN commented Apr 28, 2019

Probably overthinking it. Deal with other brokenness if it occurs, let's not preempt it.

@PeterN PeterN merged commit 63a7df0 into OpenTTD:master Apr 29, 2019
@LordAro LordAro added the backport requested This PR should be backport to current release (RC / stable) label May 2, 2019
@LordAro LordAro added backported This PR is backported to a current release (RC / stable) and removed backport requested This PR should be backport to current release (RC / stable) labels May 28, 2019
@LordAro LordAro deleted the bug6605 branch November 17, 2022 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR is backported to a current release (RC / stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash: loading savegame
3 participants