The International Simutrans Forum

 

Author Topic: Load error for savegame created in 9.2 with Pak.Britain-Ex  (Read 11472 times)

0 Members and 1 Guest are viewing this topic.

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Load error for savegame created in 9.2 with Pak.Britain-Ex
« on: January 06, 2011, 10:20:04 PM »
Hello,
I wish to report an error I get while loading a savegame created in 9.2 with Pak.Britain-Ex 0.7.1. The error message appears when the load progress bar reaches more than half, and always at the same point. Its a new map with most default settings except for starting money 200 million, with just an electrified rail track, two platforms and an electric depot, no trains yet. I haven't even renamed anything. Before electrification, with just tracks on the map & no platforms or depot, the game saves & loads fine. Same error message existed in 9.1 as well with savegame created in 9.1. I'm using Win7 x64.

Error message:
Code: [Select]
FATAL ERROR:
loadsave_t::rdwr_str()
string longer (65535) than
allowed size (128)
PRESS ANY KEY

If required I can attach the savegame as well.

Thanks!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #1 on: January 06, 2011, 10:31:21 PM »
Thank you very much for your report. It might help if you were to upload a saved game, but I suspect that it won't tell me where the problem occurred as there would be some error in saving.

To be clear - are you saying that you created a game in 9.1 and it failed when trying to load it in 9.1; then you created a game with 9.2, saved it, and it also failed when trying to load it in 9.2?

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #2 on: January 06, 2011, 11:09:16 PM »
I tried out sdog's massive game and get something similar in 148 save game.
the only part that is different is string longer (22728)

oddly enough, it doesn't happen in 153.
In 156 I get a constant "Bus or car stops must be placed on road tiles" error message.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #3 on: January 06, 2011, 11:41:20 PM »
AEO,

Sdog's earlier saved games were saved with a pre-release version of 9.0 the saved games of which are not compatible with the released versions.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #4 on: January 06, 2011, 11:53:09 PM »
aha, I suspected it was due to an incompatibility between a self compiled and official release versions.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #5 on: January 07, 2011, 08:32:31 AM »
i'll write a warning in the other thread.

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #6 on: January 07, 2011, 08:54:50 PM »
I couldn't upload the saved game file as its beyond allowed limit. Its easily reproducible for me though. Just create a new map in 9.2 with pak Britain-Ex 0.7.1. Create a railway line, electrify it with AC catenary, place an electric depot, place 2 stations, run an electric loco with freight train. Save it and then try to load the game. It crashes with the same error message. I'll try for a smaller map tomorrow.

Thanks.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #7 on: January 07, 2011, 10:07:58 PM »
Thank you for your instructions to reproduce. Unfortunately, however, following those instructions, I cannot reproduce the problem. Can you try uploading a saved game to http://files.simutrans-germany.com?

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #8 on: January 07, 2011, 11:05:18 PM »
Its surprising that the crash that I see from day 1 of playing experimental 9.1 and then 9.2 cannot be reproduced.
Thanks for the suggestion. I have uploaded it there. http://simutrans-germany.com/files/upload/New_4.sve

Hoping for a positive response this time.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #9 on: January 09, 2011, 12:45:42 AM »
Thank you for uploading that. The game does indeed fail to load, and fails in a part related to reloading electrical substations: have you placed any electrical substations in your game? In any event, the immediate cause of the failure is that the saved game is corrupted.

Oddly, however, I cannot reproduce the circumstances that cause the corruption in the first place: I have on numerous occasions successfully saved and re-loaded games including electrical substations.

I am wondering whether it is possible that the difficulty is occasioned by some 32-bit/64-bit incompatibility. I think that, when I get my 64-bit computer built, I might try compiling 64-bit Windows binaries to see whether this assists your problem. It has hitherto been thought that 32-bit binaries work on 64-bit Windows systems without trouble, but the fact that you are able to reproduce regularly a problem that I cannot reproduce at all indicates a possibility that this might not be so. I know that there have been significant difficulties using 32-bit binaries on 64-bit Linux systems (including odd behaviour that cannot be reproduced on my 32-bit machine).

Can anyone else who is running 64-bit Windows confirm whether there have been any similar difficulties?

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #10 on: January 09, 2011, 07:26:43 AM »
Yes, its related to powerlines & electric substations. I did some more research and found that
  • On any map 512*512 or more, it crashes if you have powerlines and electric substations.
  • On any map 384*384 or less, the same kind of powerlines and electric substations work pretty well.
I've been playing Simutrans since 2000, but this is the first map-size related crash I've seen. I hope its solved soon.

For example, I have uploaded 2 saved files, with all default settings...

Can any other member with Win7 x64 please confirm this crash by the given steps... IMO, a program which works properly on 32-bit Windows works without any issues on 64-bit, but not vice-versa.

Thanks.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #11 on: January 09, 2011, 12:15:11 PM »
Hmm, that's very odd. I just created a 768x768 map, added a power station and then a substation next to the power station, power lines to a city and a substation in the city, saved it, and it reloaded without a problem. I have uploaded my saved game here. I should be grateful if you could test it by trying to load it, then re-save it, then re-load it, and let me know what result that you get. Thank you very much!

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #12 on: January 09, 2011, 01:06:36 PM »
Thanks. I hope you tested both my uploaded games whether they load properly.
I downloaded your saved game. It loads fine, and I saved -> loaded again without any problem. I then connected another city with powerline/substation and again saved -> loaded without any problem.
Interestingly now if I create a new 512*512 map and do the same thing as above it doesn't crash. Not sure what's going on at all. I'll have to play more tonight on various maps & situations to confirm again.

EDIT: Still crashes with powerlines & electric substations on a large map.
« Last Edit: January 09, 2011, 04:03:29 PM by TheUniqueTiger »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #13 on: January 09, 2011, 08:31:37 PM »
When you write "large map", how large are you meaning? And in what precise situations do the crashes occur?

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #14 on: January 09, 2011, 09:46:33 PM »
The game is acting really weird. I had sure crashes earlier, but now on a 1024*1024 map, connecting a gas-fired power station to city crashed the game on save -> load. Nothing new. However on another 1024*1024 map with several gas-fired power stations connected to several cities saves -> loads correctly without problems.
By large map I meant maps 512*512 or more as I thought it to be the cause earlier, but not now.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #15 on: January 09, 2011, 09:52:25 PM »
Very odd. It's really very difficult to track these things down without being able to reproduce them; if you get any more information, do let me know.

Offline Junna

  • Devotee
  • *
  • Posts: 1082
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #16 on: January 13, 2011, 08:41:03 AM »
I get this error as well (string longer 38585), and it also seems that it can be predetermined from your save, because the "e 9" version-info will not be recorded in the save list as it should be. However, trying several times to save the save game does nothing, nor does saving it as something else in a new save, so I guess it is some corruption in the actual game rather than just the save, or something about the saving process (autosaves also face the same result). Sometimes the saving works fine under exactly the same circumstances and the same map.

Offline AvG

  • *
  • Posts: 308
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #17 on: January 13, 2011, 01:14:18 PM »
James,
This happens in my case:
Playing a heightmap UK size 1276*886 starting year 1800 using EXP9.1
I guess I saved and loaded maybe 50 times until gameyear 1804. (All needed Pak-files are made and tested "on the fly")
Now, all of a sudden, I also get the fatal error message when loading the latest save-file. (String longer (5124) than allowed size(128))
Changing to EXP9.2 makes no difference.
AvG

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #18 on: January 13, 2011, 06:19:43 PM »
Hello James,
I have continued the 'large map' saved game which did not crash. Still no crashes on that one after several saves/loads. However I had a crash on another new map yesterday while save -> load with similar message. So its pretty irregular and unpredictable.
I have downloaded the experimental source code. Can any developer of Simutrans-exp please point me to the specifics of what/where to look for possible error? As it appears its something that the save method saves as string of unknown length, whereas the load method expects the same string to be of limited (128) length. If someone could go through the save/load code for such kind of mismatch, it would be great help.
Thanks.

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #19 on: January 13, 2011, 06:34:08 PM »
Look at all rdwr methods.

If you want debug save/load, set 'saveformat' option in simuconf.tab to xml or xml_zipped.
It will make savefiles much bigger, but much more suitable for catching errors.

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #20 on: January 13, 2011, 08:20:12 PM »
I have the slight feeling this might be a result of a dangling pointer or some other sort of memory corruption.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #21 on: January 13, 2011, 10:37:53 PM »
Apologies for not having responded sooner to this discussion: I have been busy lately, partly at work, and partly building a new computer. This seems like a very hard error indeed to track down. Can those who have it try to give some indication of any particular circumstances in which it occurs? Also, can all those who have the issue give a brief outline of your system specifications? Finally, do any of you have the problem in a game saved with 9.2? The problem appears to be in the saving, rather than the loading.

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #22 on: January 14, 2011, 05:47:14 AM »
Hello James,
As I have said earlier, it seemed to be a regular feature with electrification with powerlines/substations, however some maps had crashes while others did not as I found later. It was there for a map created & saved in 9.1 as well as 9.2. I'll go through the same again and look to find out. Till that period if someone tracks down the error, it'll be great. Here are my system specifications:

Intel Core2Duo E7500 @ 2.93GHz, 3GB DDR2 RAM, GigaByte Motherboard G3100, 1.5TB WD Green HDD, Win 7 Ultimate 64-bit

Thanks.

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #23 on: January 14, 2011, 09:22:08 AM »
The problem appears to be in the saving, rather than the loading.

I suspect the problem appears before saving. A sort of memory corruption that is not noticed quickly in a running game, but when the data structures are saved, will prevent the loading of that saved (but corrupted) data.

It's just a guess, but comparing these reports to old bug reports from early Simutrans versions, it seems like a likely reason.

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #24 on: January 14, 2011, 09:34:24 AM »
Can you please help me with how to debug? I don't see the console window, neither does the log file give any details other than the fatal error message. I went through the settings in the corrupted saved game file (bzip2 compressed, reading each char after decompressing) and they are correct when compared to another xml saved file. The saved game is quite large after decompression (5MB), hence not feasible to go through the entire thing.
James, how did you find out at first that it crashes while loading electric substations?

Thanks.

EDIT: @ Hajo, after saving the game I continued it for about 30 mins, absolutely normal. Then I closed without saving again. Next time when I tried to load, the game crashed.
« Last Edit: January 14, 2011, 09:38:46 AM by TheUniqueTiger »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9561
  • Languages: De,EN,JP
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #25 on: January 14, 2011, 10:00:00 AM »
THe fatal error message would be a useful start for debugging such stuff ...

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #26 on: January 14, 2011, 10:01:30 AM »
I guess we must wait and see what James will come up with. My diagnosis is just a guess and might be wrong as well. I'd recommend running the game with Valgrind (a memory debugger) if that is possible. It might help to get a clearer picture about the causes of the problem.

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #27 on: January 14, 2011, 10:29:32 AM »
THe fatal error message would be a useful start for debugging such stuff ...
Hello prissi,
I got the same error message as above (and in the first post) in a newly created 1024*1024 map with connecting powerlines to cities & gas-fired power stations while loading after saving.
Code: [Select]
FATAL ERROR:
loadsave_t::rdwr_str()
string longer (65535) than
allowed size (128)
PRESS ANY KEY
The same message appears in the log and nothing else which could help debug further.

Is there any method to see the console window which lists step by step debug messages like 'loading cities', 'loading vehicles' etc?

Thanks.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9561
  • Languages: De,EN,JP
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #28 on: January 14, 2011, 10:32:50 AM »
Sorry, I was thinking you find this during saving.

And hosetly, this rather looks like an error in the code, as aparently a -1 is readed when a string was expected.

Offline TheUniqueTiger

  • *
  • Posts: 78
    • HiFiBB ... Simply HiFi!
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #29 on: January 14, 2011, 12:20:31 PM »
Here's a detailed test done on a map and I was really surprised by the result.

1. Created a new 2048*2048 (as crash is more in large maps), saved it, loaded it, everything good.
2. Created a powerline connecting a gas-fired power station to a city. I remembered the exact locations of the substations & the powerline. Saved it as another file. On loading crashed!
3. Restart Simutrans, load the file created in (1). Loaded well again. Then placed just substations at the same coords in (2), no powerlines. Saved it as another file. On loading continues well.
4. Next continue to build powerlines over the same path as in (2). Now the map is exactly as it was before saving in (2). Saved this time. On loading continues well.

***Recreating the same thing did not crash, which had crashed earlier. I suppose Hajo is correct that something gets corrupted even before saving, sometimes it works normally.

Offline Junna

  • Devotee
  • *
  • Posts: 1082
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #30 on: January 14, 2011, 04:06:43 PM »
I've had this problem without building any electricity lines, so I don't think that is the problem.

I was able to play for quite some time, saving many times on a large (2000x2000+) map with thousands of vehicles while using pak.britain (non-ex), but after playing for a while with britain-ex, this happened to the save game in question. Not sure this is indicative of something.

As I said earlier, this error can be seen when a game is saved in the save games list. Normal saves will display the "e 9" version information or similar in the list, but when this corruption occurs, it will not be present. Trying to save again and again does not change anything, so I'd say it's not related to the saving process but, as has been suggested here, a memory corruption.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #31 on: January 15, 2011, 02:25:34 PM »
Can I check - are any of you who have this problem running 32-bit systems?

Offline Junna

  • Devotee
  • *
  • Posts: 1082
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #32 on: January 15, 2011, 03:40:27 PM »
Can I check - are any of you who have this problem running 32-bit systems?

I am.

Offline ӔO

  • Devotees (Inactive)
  • *
  • Posts: 2345
  • Hopefully helpful
  • Languages: en, jp
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #33 on: January 20, 2011, 11:20:41 PM »
okay, I have gotten this too.

using 9.2ex with pak britain 0.7.1
The things that were changed between 190x and 191x 1 and 2 (1 is the autosave from 10 min earlier, 2 is a manual save) were mainly replacement of tracks from WSSR to improved WSSR and replacement of all branch lines to use GWR 2-6-2T.

not much else was changed, from what I can recall.
It was within a 5 or 6 year time frame, since I accidentally saved in 1911 for the 190x save and there wasn't much change in what was available since 1911.

http://dl.dropbox.com/u/17111233/acetate%20190x.sve
http://dl.dropbox.com/u/17111233/acetate%20191x%20bad1.sve
http://dl.dropbox.com/u/17111233/acetate%20191x%20bad2.sve

---------------------------------------------------------------
edit

I think I figured out the problem with my saves. Changing the game settings while running caused it. I only changed the "ground_info" from on to off while playing by using the "i" key, because it was annoying me, and this caused the game saves to corrupt.

The feature where changing game settings through the new map window, and reloading the save to make it take effect was not working, which is why I tried the "i" key method.
« Last Edit: January 21, 2011, 04:04:27 AM by AEO »

Offline AvG

  • *
  • Posts: 308
Re: Load error for savegame created in 9.2 with Pak.Britain-Ex
« Reply #34 on: January 22, 2011, 11:33:28 AM »
James,
I just noticed that while saving the program is still running. Checked in Standard. There the program is halted.
Can this cause the load/save problems?
AvG