The International Simutrans Forum

 

Author Topic: "Out of memory" errors  (Read 3441 times)

0 Members and 1 Guest are viewing this topic.

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
"Out of memory" errors
« on: December 27, 2010, 10:43:10 AM »
I've started getting an 'Out of Memory' error when trying to load a large savegame:

FATAL ERROR:
sim_new_handler()
OUT OF MEMORY or other error allocating new object
PRESS ANY KEY

A very recent autosave version of this file still loads fine. When that earlier file is running, Sim-Exp takes up around 315MB of the system's memory. But I'm running a 4GB system, and this still leaves over half of physical memory unallocated, so I'm not sure why I'm receiving this memory error on trying to load the slightly-bigger file. It is a big savegame -- but it should be nothing that my system can't handle. Any ideas?

Edit: this error occurs in both 8.2 and 9.0.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: "Out of memory" errors
« Reply #1 on: December 27, 2010, 12:37:14 PM »
Jha4ceb,

I'll need your saved game (the one that causes the problem, and preferably also the earlier one that doesn't) in order to diagnose and attempt to fix this. Can you upload them to http://files.simutrans-germany.com?

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
Re: "Out of memory" errors
« Reply #2 on: December 30, 2010, 01:25:19 PM »
Here are the two files:

http://simutrans-germany.com/files/upload/UK3older.sve
http://simutrans-germany.com/files/upload/UK3newer.sve

If all's gone well, 'UKolder' is the file which works, and 'UKnewer' is the one which doesn't. Perhaps if I carry on with the older save the same error will not occur -- but it would be useful to know what the issue is so as to avoid it occurring in future!

The files use some additional buildings and vehicles from the Japanese site -- let me know if there any pak-related problems opening them and I'll upload my entire folder.

Many thanks.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: "Out of memory" errors
« Reply #3 on: December 30, 2010, 01:58:34 PM »
Jha4ceb,

thank you for that. If the files contain addons, then I will definitely need all of the addons, or else the game will fail when loading the files. I should be grateful, therefore, if you could upload them. Thank you for that.

Incidentally, in the meantime, have you tried with version 9.1 to see whether it still fails? Also, are you running a 32- or 64-bit system, and, if 64-bit, Windows or Linux?

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
Re: "Out of memory" errors
« Reply #4 on: December 30, 2010, 02:11:58 PM »
Here's my /pak folder:

http://simutrans-germany.com/files/upload/jha4ceb-pak.rar

I think that's everything required to open it -- let me know if not.

Opening the files under 9.1 appears to have the same results.

I'm running Windows 7, 64-bit.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: "Out of memory" errors
« Reply #5 on: December 30, 2010, 04:52:27 PM »
Thank you for that information.

This error is a very odd one, and difficult to track down: the immediate cause of the problem is that the saved game (the newer one) has become corrupted somewhere when saving the various convoys. How it has become corrupted is not clear, but the consequence is that, about 1,800 convoys in (of a total of about 2,900), one of the convoys (and possibly all subsequent ones) is filled with junk data, which causes the error (specifically, the number of route steps is stored as a number higher than the amount of memory that the system can allocate).

I can't immediately see a way of tracking this one down, I'm afraid: the problem is with the save process somewhere in conditions that I have no way of knowing how to replicate. The best thing to do is to keep going from your older saved game, save frequently, and see whether the problem recurs.

Terribly sorry that you've had difficulties. Incidentally, was it with 8.2 or 9.0 that you saved it?

Offline Carl

  • Devotee
  • *
  • Posts: 1599
    • Website
  • Languages: EN
Re: "Out of memory" errors
« Reply #6 on: December 31, 2010, 10:35:58 AM »
Thanks so much for looking at this, jamespetts. It does indeed sound like an odd error -- from what you've said, I'm hoping it's a one-off that won't happen again. As you advise, I'll save often.

The file was saved in 8.2.