Elvas Tower: Save error - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Save error Inconsistent save set file names Rate Topic: -----

#1 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,426
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 25 January 2023 - 03:01 AM

Since version 1.5, I regularly have problems when resuming from saved data. In the menu, no picture is shown, and on loading the saved data, there is a load error for the replay data.
This problem, however, is not due to problems with resuming as such, but has its roots in a change to the generation of the saved data.

A saved data set is made up of four files - the actual save (.save), picture (.png), logfile (.txt) and replay (.replay).
In previous versions, a single base name, based on timestamp of the save, was created and this name was used on all four files.
In version 1.5, however, each of the four filenames is generated separately, still based on the timestamp.

This is wrong, for if the creation of the save file takes a bit longer, the other files are not saved within the same second and therefor will be created using a different name, as this example shows :

23/01/2023  15:08        36,377,044 Newfoundland NF2017  2023-01-23 15.08.30.save
23/01/2023  15:08         1,259,862 Newfoundland NF2017  2023-01-23 15.08.31.png
23/01/2023  15:08             1,919 Newfoundland NF2017  2023-01-23 15.08.31.replay
23/01/2023  15:08            21,164 Newfoundland NF2017  2023-01-23 15.08.31.txt


Due to these differences in the filenames, the resume function cannot find the .png, .replay and .txt files.

So my kind request to whoever made this change is to revert the code to the original setup, and use a single base name from which all four names are derived, to ensure correct consistency of the filenames within a saveset.

Regards,
Rob Roeterdink

#2 User is online   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,874
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 25 January 2023 - 10:34 AM

Hi Rob,


View Postroeter, on 25 January 2023 - 03:01 AM, said:

This is wrong, for if the creation of the save file takes a bit longer, the other files are not saved within the same second and therefor will be created using a different name, as this example shows :

For those who don't know this, GitHub provides a means to view the history of changes to a file. In this case file GameStateRunActivity.cs which shows the old code with a red background and the new with green. It also includes a "Blame" option to identify the person responsible !

It turns out that was me (in Feb 2022) as part of a larger change.

Thanks for identifying this problem. I hope to have some time to correct it this weekend.

#3 User is online   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 7,015
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 25 January 2023 - 11:24 AM

Ideal bug report with complete analysis; and nice answer.
Wish all the rest issues would be solved this way.

#4 User is offline   roeter 

  • Vice President
  • Group: Status: Elite Member
  • Posts: 2,426
  • Joined: 25-October 11
  • Gender:Male
  • Country:

Posted 25 January 2023 - 02:31 PM

Chris,

thanks for that.

Regards,
Rob Roeterdink

#5 User is online   cjakeman 

  • Vice President
  • PipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 2,874
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 28 January 2023 - 02:08 AM

View Postcjakeman, on 25 January 2023 - 10:34 AM, said:

Thanks for identifying this problem. I hope to have some time to correct it this weekend.

A bugfix has now been submitted and will automatically appear in the Unstable Version.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users