[X4-281] In-game crash - 475669 (Lua out of memory) Created: 16/Apr/19  Updated: 16/Oct/20

Status: Open
Project: X4 - Foundations
Component/s: None
Affects Version/s: 1.0
Fix Version/s: None

Type: Bug Priority: Important
Reporter: Stefan Hett Assignee: Stefan Hett
Resolution: Unresolved Votes: 0
Labels: crash

Issue Links:
refers to X4-268 Out of (system) memory related crash.... Open
refers to X4-454 Exitcode 1003 (UI system initializati... Open


You landed on this page because we have detected a crash in "X4 - Foundations".

We are currently investigating the cause of the crash.

This type of crash can actually be divided into two categories:

  1. caused by real low system memory conditions
  2. caused by an in-game issue

Please follow the steps below in the given order to resolve the issue.

Restricted virtual memory

To rule out that you are suffering the crash because of a system setup issue, please refer to the instructions in X4-268 and verify that the virtual memory setup on your system is correct and doesn't artificially limit the available memory.

3rd-party mods

A second possible cause are 3rd-party game extensions/addons which allocate too much memory (usually this should be considered a bug in the addon/extension). If you are running the game with extensions/addons and are regularly running into this crash, try to trace down the problematic addon by disabling one addon after another. If you could determine the problematic addon, just leave a comment in this issue and we'll investigat it and if we can confirm the issue, add the addon to the known list of addons which can cause this crash.

Further support

If you are sure that the page file size setup is correct on your machine and no 3rd-party addon seems to trigger the crash (or if you are running the vanilla client), we'd like to get information about what might have triggered the crash. If you are aware of a way to reproduce the issue, please send a mail to crash@egosoft.com with the subject set to "X4-281 - In-game crash - 475669", describe how to trigger the crash (if the repro case requires loading a savegame, please make the savegame available - f.e. by uploading the save to OneDrive or GoogleDrive and send us the link), add a list of enabled game extensions, attach a screenshot of the machine's page file setup as described in X4-268, and the dump file (see this page with details on how to locate the dump file on your drive).

We'll update this issue here, once new details become available.

Technical background

The game uses Lua as one of its script engines. When a script is loaded or performs certain operations, memory is allocated. If this allocation fails a memory exception is raised, leading to this crash.
We are aware this currently happens especially in two cases of the game:

  1. when the UI engine initializes (i.e. most likely when the user starts the game)
  2. at runtime while the game is running

Usually the memory consumption of Lua is quite low and a crash when starting the game should indicate some arbitrary machine restrictions (i.e. limited available memory way below what the min-specs require). A crash at runtime however can also be triggered by requesting a ridiculous amount of memory.
In vanilla games, this should never happen and if it does, is considered a bug which we will fix ASAP.

Historical notes

Before 3.30 Hotfix 1 Beta 1 the issue could occur in 'normal' situations. This was caused by the older Lua engine being limited to the lower 2GB of memory address space. Depending on 3rd-party tools, drivers, etc. users could run into this limit in common cases. 3.30 Hotfix 1 Beta 1 removed this limitation, so that the Lua engine can also use address space above the 2 GB range.

Comment by Anonymous [ 20/Apr/19 ]

Lost an hour+++ building a section of my super station Shipyard... (((((

Comment by Anonymous [ 01/Jun/19 ]

two hour lost for build my shipyard

Comment by Anonymous [ 02/Jun/19 ]

again 3-4 hour lost , the Auto save is stupid....

Comment by Stefan Hett [ 03/Jun/19 ]

Did you check the instructions pointed out at https://www.egosoft.com:8443/jira/browse/X4-268 ?
Also note that as of 2.50 you can disable auto save under settings -> Game options -> auto save and/or increase the interval. Also the "issue" that the auto save interval wasn't reset when you manually saved the game was fixed in 2.50 so the frequency of auto saves should be reduced if you regularly save the game yourself.

Comment by Anonymous [ 28/Sep/19 ]

(Ver.2.5) How the Build mode is like now it's total Crap. Transparency of Unbuild stuff is to high. Cant zoom into the "-" Axis. And this... Out of Memory. LOL i have 32GB Ram and 8GB (GPU) Ram... Still have to exit the Build mode every 30-40 Modules set. Or the Game gets Crazy and Crash. If i periodically "Exit" that it can Save. NP... if i try to Build to much, Crash. ;(

Comment by Stefan Hett [ 29/Sep/19 ]

As stated in the description above, we would be interested to get the details on the particular case triggering the crash. Without further details we unfortunately cannot look into the situation.

With regards to your feedback on the build mode: I passed it on to the designer, but can't promise any update on the state of these. In general such feedback is better located in our forums here: https://forum.egosoft.com/viewforum.php?f=146

Comment by Anonymous [ 26/Nov/19 ]

CTD while saving a station template

Comment by Anonymous [ 27/Nov/19 ]

Computer shut itself down entirley.

Comment by Anonymous [ 14/Jan/20 ]

i7 990x Nvidia 2070 24GB ram 8GB video ram. There was alot of video corruption when I first found a Kha'ak installation in Pious Mists IV. This crash seems to have fixed that issue. There are no more multi colored hexagons on my map and the game seems to be running smoother. However this didn't fix the issue with the video corruption the last two times I had this crash. I'd suggest checking for missing/inverted textures on the Kha'ak Installation and on player station modules.

Comment by Anonymous [ 31/Jan/20 ]

B3.00 and a handfull of mods. so please disregard, not all of them run well with b3. but i am an idiot with a powerful computer.
Time to make a cup of tea and build an even more powerful computer.

Comment by Anonymous [ 13/Feb/20 ]

Crash while moving a block in my shipyard.

I just went to have a XL construction module removemed because of out of boundary placement and started to move a block (8 vertical 2, 5 cross, XL repair, L repair, L build, S/M repair, S/M build).

It's realy anoying to loose everything after lot of time of placement...

32GB Ram, AMD FX8370E, AMD RX Vega 64 8GB, is it not enough ?

Comment by Anonymous [ 31/Mar/20 ]

Crashed while building a really big station. I-9-9900K, 32 Gigs Ram, GeForce 2080TI 11 gigs video ram. 1 Terabyte M.2 drive. One thing I have noticed about this game is that my FPS will drop to less than 30 however my CPU and GPU temp won't increase. Something is wrong with how you utilize hardware.

Comment by Anonymous [ 08/Apr/20 ]

Crash by start the game at x4 3.0 before, the game runs

Comment by Anonymous [ 15/Apr/20 ]

at 4k resolution the game crashes, sometimes it manages to run without crashing but the menu (new game / options etc.) does not show at all, only the background animation is visible.
32GB ramu, nvidia 1080 ryzen 1700x

Comment by Anonymous [ 03/May/20 ]

Hi Stefan, This seems a pain in my ass. Can you let me know m8.

Neil ' Maxumous ' Short

Comment by Anonymous [ 05/May/20 ]

game continues to crash repeatedly after load screen---tried re-installing from steam, verifying integrity of the game files, removing save files, checked on page file size: set to system managed, disabled AV, tons of free disk space on all drives, tried running the game from both M.2 and Western Digital SATA drive, made no difference. game was running fine 4/22 and sometime there after it quit working.

32GB ram, Core i7-8700K @ 3.7Ghz, Windows 10, GeForce 2080 Ti graphics card with updated drivers

Comment by Anonymous [ 05/May/20 ]

dump is attached related to my post a few minutes ago

Comment by Anonymous [ 29/May/20 ]

Was building an extremely large station/shipyard (2000+ modules), placing any station mod took several seconds before crash. Hope this helps.

Comment by Anonymous [ 31/May/20 ]

crashes on initial UI load for 4K ultrawide resolution, reducing resolution and changing fullscreen/boarderless in config.xml sometimes will get it to load correctly, after the menu loads I can set the resolution and borderless and it'll run
crashes consistently in the station builder, any significant time spent in the tool or dealing with larger station builds

Comment by Anonymous [ 06/Jun/20 ]

game does't work anymore.
Fresh game installation, run game -> game window appear -> short movie -> game title screen showing -> crash with 475669 (Lua out of memory) or Exitcode 1003 (UI system initialization error).
Game not working on 4k, after split vendetta i had option to set desktop resolution to full hd 1920x1080 and game starts normally, but now i cant run at all. Even config.xml is not created to set options manually. And before split vendetta game running normaly on full hd resolution and i think i running this game on 4k too.
I tried running game with administrator rights, but this not help, is any possibility to fix thits bug ?

32GB ram, Ryzen 1700x, Windows 10, GeForce 1080 graphics card with updated drivers.

Comment by Anonymous [ 06/Jun/20 ]

Construction of a complex of more than 1300 units. No mods

Comment by Anonymous [ 07/Jun/20 ]

"Construction of a complex of more than 1300 units. No mods"

Comment by Anonymous [ 07/Jun/20 ]

"Construction of a complex of more than 1300 units. No mods"
4th failure. 2600 units. I need more RAM. Failure won't stop me. I'll build it even if my computer explodes.

Comment by Anonymous [ 07/Jul/20 ]

I have the exact same issue. Unable to launch game at all. Game would launch if I used the clean config.xml as suggested, but now that won't work as well and constant LUA out of memory and UI initialization failure crashes every single time. I reinstalled, deleted everything, beta 3.30, standard, nothing works.

Comment by Stefan Hett [ 07/Jul/20 ]

We are working on a fix for this particular situation which seems to trigger the problem for you. Once 3.30 is released we will provide instructions on this page for affected users and provide them with a specific fix for their systems. Please monitor this page for future updates and revisit it a day or two after 3.30 was released.

Comment by Anonymous [ 20/Aug/20 ]

What added to the problem was that the game had been running for a few days, so the memory usage was increasing. It eventually ran out of the available memory and that probably caused the crash to happen. Plus i have different mods installed.

Generated at Tue Dec 07 22:37:50 CET 2021 using JIRA 6.2.7#6265-sha1:91604a8de81892a3e362e0afee505432f29579b0.