The International Simutrans Forum

 

Author Topic: Save/Load dialog does not show pakset for recent saves.  (Read 419 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3714
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Save/Load dialog does not show pakset for recent saves.
« on: January 08, 2021, 08:51:51 PM »
As stated in the subject - all my saves up to Dec 4th have their pakset displayed, but all since Dec 8th have just space instead of pakset name.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20720
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #1 on: January 08, 2021, 10:06:18 PM »
This looks as though it may be a merge related issue - I wonder whether Ranran might have some idea about this...?

Offline Ranran

  • Devotee
  • *
  • Posts: 1481
  • Languages: ja
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #2 on: January 08, 2021, 10:23:10 PM »
As previously reported, there is an issue where the save version cannot be read correctly. The version will be blank. (It is saved correctly just because it cannot be read. If you use an old client, you can check that the version information is recorded in the save data created by the current client)
I think that is the cause.
One of the possible problems seems to be the incorrect version. (Or the part related to this is incorrect)
Code: [Select]
#define SIM_SAVE_MINOR      7
#define SIM_SERVER_MINOR    7
But I have no idea what this version should be.
For example, current nightly build can't recognize the saved game version recorded by itself, but the it will read recorded version if you change it. But I couldn't find the number to read its own saved game.
I explained this before in that thread.
This may be due to the current version number. It could be displayed when changing the version number. I couldn't find a version number that could display everything correctly. So I asked which version number was right.
It seems that the version number is saved correctly in the save data when saving. Because they are displayed correctly when using older clients.

Offline Vladki

  • Devotee
  • *
  • Posts: 3714
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #3 on: January 08, 2021, 10:38:27 PM »
Ranran, sorry I don't understand what you mean...
In any case - current nightly shows pakset only in saves from December 4th and older. So there must be some change that happened between 4th and 8th of December, that broke saves in this way. Upgrade of bridgewater brunel, and maybe implementation of the new compression (lzstd ?) comes to my mind?

Offline Ranran

  • Devotee
  • *
  • Posts: 1481
  • Languages: ja
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #4 on: January 08, 2021, 11:14:13 PM »
I remember coming to a different conclusion before because my symptoms are different from you. The cache file doesn't seem to be created correctly.

Offline Vladki

  • Devotee
  • *
  • Posts: 3714
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #5 on: January 08, 2021, 11:17:15 PM »
And just to make it clear, the missing pakset info does not make any problems - the games load normally.

Offline Ranran

  • Devotee
  • *
  • Posts: 1481
  • Languages: ja
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #6 on: January 09, 2021, 12:31:44 AM »
Code: [Select]
/*
// read pak_extension from file
loadsave_t test;
test.rd_open(fname);
// add pak extension
pak_extension = test.get_pak_extension();

// now insert in hash_table
sve_info_t *svei_new = new sve_info_t(pak_extension.c_str(), sb.st_mtime, sb.st_size, test.get_version_int(), test.get_extended_version());
// copy filename
char *key = strdup(fname);
sve_info_t *svei_old = cached_info.set(key, svei_new);
delete svei_old;
*/
I remembered commenting out because I couldn't merge this part correctly. It would be helpful if someone could confirm or correct this.

Offline Vladki

  • Devotee
  • *
  • Posts: 3714
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #7 on: January 10, 2021, 08:46:51 PM »
Oh, since yesterday, the pakset is not shown at all. Not even for older saves. But the pakset info is stored, because I can start simutrans like:
Code: [Select]
./simutrans-extended -load test.sve And it loads the right pakset automatically. Otherwise it is a bit uncomfortable that for manual loading you don't know which saves are form the currently used pakset.

Ah I see it may be related to me deleting the cache.xml file... Anyway I uncommented the code mentioned by Ranran (gui/loadsave_frame.cc), and the pakset info is now shown.

Offline Vladki

  • Devotee
  • *
  • Posts: 3714
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Save/Load dialog does not show pakset for recent saves.
« Reply #8 on: January 25, 2021, 10:53:20 PM »
Ranran, what is the problem with the code you mention? I have uncommented it, and the load dialog shows the pakset without any problems. Is there any reason to keep it commented/disabled?