News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Out of Memory error when load a savefile

Started by GabrielAstock, May 02, 2025, 04:19:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GabrielAstock

This bug happens on my pak128 savegame on Version 124.3.1 with many addons

When I save the savefile or try to open certain menus (such as the map) when the savefile is open, the game crashes with an error as follows:

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

The only documentation is from 2010 and there is no solution on how to fix it
My drive has 502GB left so I don't know why it tells me it has no memory, is the any way to fix it? Thank you!

Savefile link : https://drive.google.com/drive/folders/1L1beuirCffTNUIRCqhb_aIYg3Rp1kUoo?usp=sharing

My addons folder : https://drive.google.com/drive/folders/1ROoZ6V-T0fNQn57RR-KLD5H03EnmHAYj?usp=sharing

ceeac

Cannot reproduce with 124.3.1 or the latest nightly. How much (free/total) RAM do you have and how much of it is occupied by Simutrans when the error occurs?

jamespetts

That error normally occurs when you actually run out of memory, rather than being a bug with the game.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

GabrielAstock

Quote from: ceeac on May 04, 2025, 07:06:47 AMCannot reproduce with 124.3.1 or the latest nightly. How much (free/total) RAM do you have and how much of it is occupied by Simutrans when the error occurs?

I have 32GB of RAM and 17GB available when I open simutrans (17% of RAM is used for simutrans)

jamespetts

Quote from: GabrielAstock on May 05, 2025, 10:46:46 AMI have 32GB of RAM and 17GB available when I open simutrans (17% of RAM is used for simutrans)
Have a look at the system monitor when you're opening this particular saved game and keep an eye on the memory graph and what it does right at the point when the error occurs.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

Please make sure you are using the 64 bit version of the executable, as the game would need 6.5 GB of memory.


GabrielAstock

Quote from: jamespetts on May 05, 2025, 10:48:14 AMHave a look at the system monitor when you're opening this particular saved game and keep an eye on the memory graph and what it does right at the point when the error occurs.

I've done some testing and nothing changes on the graph when this error occurs. It happens randomly (usually at the start of each month in game)

However a new error has also occured, where the game just closes by itself right after I pressed Save

*I'm also using the 64-bit version
Sorry for causing this much trouble!

prissi

Maybe there is some hardware trouble or some translation text is broken. If the crash happens at the begin of a month, a broken translation seems likely (despite all the safeguards). Maybe try English as main language. If the crash goes away, then some of the text at the begin of a new month is broken.

Crashing after save sounds more like a corruption of the main memory, though.

GabrielAstock

Quote from: prissi on May 08, 2025, 12:45:43 PMMaybe there is some hardware trouble or some translation text is broken. If the crash happens at the begin of a month, a broken translation seems likely (despite all the safeguards). Maybe try English as main language. If the crash goes away, then some of the text at the begin of a new month is broken.

Crashing after save sounds more like a corruption of the main memory, though.
I've changed the language to English and it still happens, is there any way to fix it in case the memory is really corrupted? Thank you in advanced!

prissi

OK, I can reproduce this, but only in release builds without the DEBUG switch. Using DEBUG switch, it loads but is so slow that I cannot run this savegame.

After removing the broken ancient pak128 from the folder and putting it as addons to a current pak128, the error seems to go away. I think some of the ancient translations and fonts in this pak128 were causing the crash. (Maybe old ground definitions.)

Put the content https://mp.imass.nagoya-u.ac.jp/nextcloud/index.php/s/7MBspoBYHMs6En2 in the Documents/simutrans/addons folder and load a new pak128 with addons. With that, the crash goes away for me. I think the outdated copies of pak128 in the folder contained a broken pak.

(Also, you have vehicles for goods that has no producer ... )

And for the future, using addons with an addon folder can prevent this. That is the purpose of the addon folder, to allow to update the main pak128 without affecting addons.

GabrielAstock

Quote from: prissi on May 13, 2025, 12:15:19 PMOK, I can reproduce this, but only in release builds without the DEBUG switch. Using DEBUG switch, it loads but is so slow that I cannot run this savegame.

After removing the broken ancient pak128 from the folder and putting it as addons to a current pak128, the error seems to go away. I think some of the ancient translations and fonts in this pak128 were causing the crash. (Maybe old ground definitions.)

Put the content https://mp.imass.nagoya-u.ac.jp/nextcloud/index.php/s/7MBspoBYHMs6En2 in the Documents/simutrans/addons folder and load a new pak128 with addons. With that, the crash goes away for me. I think the outdated copies of pak128 in the folder contained a broken pak.

(Also, you have vehicles for goods that has no producer ... )

And for the future, using addons with an addon folder can prevent this. That is the purpose of the addon folder, to allow to update the main pak128 without affecting addons.
Everything works now, but my net profit has dropped sharply after updating pak128 again. Is there anyway to fix this?

prissi

You could either use freeplay (and do not care about it) or add all vehicles from an old pak128 to the addons folder.

The reason is that a lot of vehicles in the old pak128 had zero running costs or unreasonable small numbers, especially some airplanes, buses and ships. Those have been rebalanced in recent pak128 releases to fit the rest.

GabrielAstock

Quote from: prissi on May 18, 2025, 07:27:37 AMYou could either use freeplay (and do not care about it) or add all vehicles from an old pak128 to the addons folder.

The reason is that a lot of vehicles in the old pak128 had zero running costs or unreasonable small numbers, especially some airplanes, buses and ships. Those have been rebalanced in recent pak128 releases to fit the rest.
Hi, sorry for replying after so long. I've replaced the vehicles back with the original paks, but nothing seems to have changed. (The cash flow has dropped from 300 million to 19 million) How can I go back to the old numbers?

prissi

You can also try to add the old goods. Also, the speed bonus was broken in the simuconftab in old versions which can has an impact too. (Although this is saved with the game for quite some time.)

Are you really comparing version 124.3.1 with this separate installation? If it is from a much older Simutrans version, there were errors in just_in_time, speed_bonus etc. and new defaults may be causing this. Also make sure there is not one of the no_routing_over_overcrowded or avoid_overcrowding setting active by accident