X4: Exitcode 1113 (Out of System Memory)

From Egosoft Wiki

You have landed on this page because a crash has been detected in X4: Foundations.

The crash usually occurs because the game ran out of system memory. Note that in normal situations, this should not happen with 64-bit applications, and usually indicates an issue with the system setup.

Please follow these steps to verify that your system is set up correctly:

Verify that the page file size is not limited

  1. Press the Windows Start button, enter Control Panel and click on the entry that appears, to open the system Control Panel
    PageFileVerify1.png
  2. Click on System and Security -> System -> Advanced system settings -> Performance / Settings.... -> Advanced -> Virtual memory -> Change...
  3. Ensure that in this dialog, either one drive is set to have the page file size managed by the system (i.e. numbers 2 and 3 in the screenshot below) or that "Automatically manage paging file size for all drives" (number 1) is ticked.
    PageFileVerify2.png

This will ensure that the system doesn't artificially limit the available memory that the game can use.

Verify that your drives have sufficient free space

Please check your free disk space. If you have specified only one drive to be used for the page file, verify that this drive has sufficient free space available (you can usually safely assume that ~20 GB of free disk space is sufficient). If you haven't limited the page file size, make sure that at least one drive on your system has sufficient free disk space available (again, 20 GB should be sufficient).

Memory leaks/peaks in other applications

This crash can also occur if the system runs out of memory because some other application starts consuming too much memory, or is suffering from a memory leak. If you regularly run into the out of memory crash, use the Task Manager and monitor the memory consumption by the programs running on your system. If you see a significant increase in another application (this might accumulate over time, potentially slowly, or produce high peaks), this is a hint that some issue with that other application may be the cause of the crash in the game.

Still running into this crash

If you have followed the steps above and are still being redirected to this page, feel free to contact us by mail for further support. Just send a mail to prioritysupport@egosoft.com (Subject: Exitcode 1113) and add the following details:

  • your dxdiag info, taken directly after the crash occurred (this Wiki entry describes how to get the information)
  • a screenshot of the virtual memory dialog from the first step above, showing your current page file settings
  • the corresponding crash dump file (see this page with details on how to locate the dump file on your drive) - make sure you pick the correct .dmp file by verifying that the timestamp that is encoded in the filename roughly matches the date/time at which the crash occurred

We'll then get back to you to try and work out the cause of the crash.

Technical background

Games/Apps require memory to perform their work. Games in particular can require a significant amount of memory. X4: Foundations is no exception here. In general, however, the game rarely uses more than 4-6 GB of RAM. This can spike in certain situations (e.g. when creating a savegame) for which a continuous memory block is required. Even under these circumstances, the system memory the game requires should not exceed 6-8 GB at most.

While you might assume that on a system with 8 GB of RAM you should never run out of memory, the following additional factors also need to be taken into account:

  1. other applications, drivers, and also the OS running at the same time as the game, also require a certain amount of memory
  2. memory fragmentation

Although you have greater control over the first point (i.e. you can terminate other memory-hungry applications before starting the game), you cannot do much about memory fragmentation. Memory fragmentation is similar to disk fragmentation. If the game currently requires 4 GB of RAM but is heavily fragmented, the memory it uses might be spread over (for example) 8 GB of address space. If the game now requires a larger chunk of continuous memory (e.g. when it tries to create a savegame), it might end up exceeding what's available on your system.

This is where page files come in. If the current amount of required memory exceeds what's available in physical memory (i.e. RAM), any currently unneeded data can be temporarily moved to the page file or can be directly referenced from the page file. Note that from Windows 10 onwards, data can also be compressed while kept in memory, increasing the space available to processes without falling back to using a page file. However, if you also run out of available space for the page file, there is no way for the system to provide the requested memory. It is therefore important to ensure that you do not unnecessarily restrict the page file size.

Why might you have restricted the page file in the first place?

Some years ago, you might have been advised to set the page file size to a "reasonable" maximum size, or even to create a separate drive partition to be used solely by the page file. This "reasonable" size was based on the fact that applications were limited to 2-3 GB of memory, and that having a page file 1.5-2 times the available memory size was considered more than sufficient to cover all practical scenarios. The situation is now different. With 64-bit and multi-threading now standard, and many applications often running in the background without slowing the system down. At the same time, HDDs and SSDs have become so large that the size of a page file is no longer an issue. As a result, arguments for limiting the page file size no longer apply. As a result, there is rarely any real reason for limiting the page file to a fixed size.

Difference between system and graphics card memory

You should also be aware that your system has two distinct sets of memory (actually there are more, but only these two are relevant for this topic):

  • RAM (aka: system memory)
  • VRAM (aka: graphics card memory / video RAM)

While both of these are technically the same thing, VRAM is the RAM which is solely used by the graphics card and is not available to the rest of the system. The out of memory crash described on this page happens when running out of system memory. As a result, increasing the amount of VRAM won't make much difference to whether you run into this crash, so buying a better graphics card won't help in this particular case (obviously it might improve other things).


Go to Exit Codes Table