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

Save vs. Autosave #78

Closed
DorpsGek opened this issue Mar 18, 2006 · 5 comments
Closed

Save vs. Autosave #78

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

Comments

@DorpsGek
Copy link
Member

dzhony opened the ticket and wrote:

When I tried to save the game during the autosave in progress, the game freezed. But the save I made is OK.

Attachments

Reported version: 0.4.5
Operating system: Windows


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

Darkvater wrote:

That is perfectly ok, you cannot save while you are saving. The game will wait until the autosave is done, then save your game.
At least that's what it's supposed to do. Please try with the latest version, 0.4.7


This comment was imported from FlySpray: https://bugs.openttd.org/task/78#comment152

@DorpsGek
Copy link
Member Author

Celestar wrote:

There seem to be issues with the saveload code. Even if two autosaves happen too quickly after one another, the game freezes and doesn't wake up again.


This comment was imported from FlySpray: https://bugs.openttd.org/task/78#comment204

@DorpsGek
Copy link
Member Author

Darkvater wrote:

Indeed, but you have to be really quick to do this becauseI couldn't reproduce manually, only by programmatically running 2 saves right after each other.

The problem is that the flag that tells the game a save is already in progress is only called after the thread is created and running. If that takes a long time then bamm. Deadlock.

Attached diff fixes it but I don't know how beautiful it is. Comments?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/78#comment230

@DorpsGek
Copy link
Member Author

TrueBrain wrote:

With some alterations I commited a patch that fixes this bug. FYI: dualcore machines always cause thread problems if you set bools within the thread. They fork the thread in the second core, and continue the game in the first core, even before 1 line is executed from the thread. Very nasty... :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/78#comment438

@DorpsGek
Copy link
Member Author

TrueBrain closed the ticket.

Reason for closing: Fixed


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

@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