Crash on autosave? - Appears to be when out of system memory.

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Crash on autosave? - Appears to be when out of system memory.

Post by ahostofissues » Thu, 15. Sep 22, 15:41

Is anyone else experiencing commonly crashing during autosave (crashes entire computer, as if I'd held the power button down)?

Windows, game with 4 minor mods installed, most recent X4 build and all DLC. Game/mods had been stable/unchanged for 500+ hours. Last few days, get crash of entire machine at what appears to be end of Autosave process about 50% of the time. That save file is corrupted (cannot load it, loader crashes and reverts back to main game menu - so not only doesn't save, erases previous autosave with corrupted file).

I have not made any changes, so something changed with either Steam auto-update patch or recent Windows patch (or perhaps I have a piece of hardware that's becoming faulty). No user-initiated changes to setup, configuration, installed software, etc. This machine is literally only used for playing X4 (and other games, but only X4 for a couple months now).

Please comment if you've had any similar experience recently.

CBJ
EGOSOFT
EGOSOFT
Posts: 51974
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Crash on autosave?

Post by CBJ » Thu, 15. Sep 22, 15:54

The game itself can't crash the whole PC, at least not without help from a problem at the driver or hardware level. It's possible that it's a driver issue, as driver files can be corrupted just like any other, but relatively unlikely of course. Somewhat more likely is something like a memory fault, especially since loading and saving the game can take up considerably more memory than just playing it. Another possibility is something like a heat issue, but again, that doesn't quite seem to match the situation you're describing.

User avatar
Duncaroos
Posts: 503
Joined: Wed, 4. Jan 12, 22:23
x4

Re: Crash on autosave?

Post by Duncaroos » Thu, 15. Sep 22, 17:06

What's your PC specs? If custom build is your PSU have enough wattage?

What about hard saves (i.e. user initiated the save)?
Playing X4+All_DLC 6.20 Build - on:
CPU: Ryzen 5 5600X; RAM: 4x8GB DDR4 3200MHz; GPU: GTX 1070 8GB, Driver v516.94, DirectX 12.0; OS: Win10 Home 22H2 (19045.3086); Monitor: Single Acer S232HL 1920x1080

Duncaroo's Station Storage Estimator

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Thu, 15. Sep 22, 17:25

Duncaroos wrote:
Thu, 15. Sep 22, 17:06
What's your PC specs? If custom build is your PSU have enough wattage?

What about hard saves (i.e. user initiated the save)?
User-initiated shift-S saves and quick-saves do not produce the problem (not that I've ever observed anyway).

The PC is a couple years old, some mods by me to stock model. Has been running with no hardware changes since shortly after purchase (so, for instance, if I had messed up the PSU calculations it would have showed up long before now).

Could be summarized as "no changes to hardware or installed software for 18 months, except auto-updates by Steam and auto updates by Windows; had been running X4 fine for hundreds of hours of gameplay for months; issue has appeared in the last week."

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Thu, 15. Sep 22, 17:29

CBJ wrote:
Thu, 15. Sep 22, 15:54
The game itself can't crash the whole PC, at least not without help from a problem at the driver or hardware level. It's possible that it's a driver issue, as driver files can be corrupted just like any other, but relatively unlikely of course. Somewhat more likely is something like a memory fault, especially since loading and saving the game can take up considerably more memory than just playing it. Another possibility is something like a heat issue, but again, that doesn't quite seem to match the situation you're describing.
Right. Worst case game should crash, but the fact that it appears to be triggering a Windows kernel panic... either a GPU driver update I missed or a heat-related degredation failure from just playing too damn much X4 over too many hours.

But before I start ordering new components and/or entire machine, I thought it was worth asking whether anyone else was seeing this, meaning it could possibly be due to a recent windows and/or steam update. But likely just my machine...

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4764
Joined: Fri, 21. Dec 18, 18:23
x4

Re: Crash on autosave?

Post by Imperial Good » Thu, 15. Sep 22, 18:33

ahostofissues wrote:
Thu, 15. Sep 22, 15:41
Is anyone else experiencing commonly crashing during autosave (crashes entire computer, as if I'd held the power button down)?
Please confirm the exact way your computer crashes.
  • BSoD. Windows says an unrecoverable error occurred and then the system restarts. This can be caused by buggy drivers or unstable hardware.
  • System becomes entirely unresponsive. Have to hold down power button or press restart button. This can be caused by faulty or unstable hardware.
  • System seems to completely power down. Might automatically start itself a few seconds later and then proceeded to boot like normal. This can be caused by unstable hardware, especially AMD Ryzen CPUs that are not in a stable configuration.
A dxdiag listing of your system would also be useful.

Why it crashes after auto save and not manual saves is hard to say. Could be something as weird as a power transient caused by changes in CPU and GPU workload that are slightly different between the modes of saving.

Rei Ayanami
Posts: 3333
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Crash on autosave?

Post by Rei Ayanami » Sat, 17. Sep 22, 03:44

The autosave causing the crash and normal saves working does not necessarily mean that there is something wrong with the autosave, perhaps by pure chance X4 tried to save onto a corrupted part of your harddrive (causing a system crash) while normal saves by pure chance accessed a working part of your harddrive.
ahostofissues wrote:
Thu, 15. Sep 22, 17:29
But before I start ordering new components and/or entire machine, I thought it was worth asking whether anyone else was seeing this, meaning it could possibly be due to a recent windows and/or steam update. But likely just my machine...
Before ordering new parts I'd try running some diagnostic applications for your hardware, especially RAM and your harddrive, to make sure that it's actually the hardware that is causing the issue. Sometimes diagnostic tools can even repair it (depending on what's wrong).

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Sat, 17. Sep 22, 23:15

Imperial Good wrote:
Thu, 15. Sep 22, 18:33
ahostofissues wrote:
Thu, 15. Sep 22, 15:41
Is anyone else experiencing commonly crashing during autosave (crashes entire computer, as if I'd held the power button down)?
Please confirm the exact way your computer crashes.
  • BSoD. Windows says an unrecoverable error occurred and then the system restarts. This can be caused by buggy drivers or unstable hardware.
  • System becomes entirely unresponsive. Have to hold down power button or press restart button. This can be caused by faulty or unstable hardware.
  • System seems to completely power down. Might automatically start itself a few seconds later and then proceeded to boot like normal. This can be caused by unstable hardware, especially AMD Ryzen CPUs that are not in a stable configuration.
A dxdiag listing of your system would also be useful.

Why it crashes after auto save and not manual saves is hard to say. Could be something as weird as a power transient caused by changes in CPU and GPU workload that are slightly different between the modes of saving.

The crash is, as I stated, as if I had held down the power button to force power-off my computer. The boot sequence then triggers, starting with computer BIOS screen. I have not made any changes to hardware for 18 months, have done nothing to change any hardware settings/configuration except letting Windows and Nvidia install driver updates. System has been stable for all that time until now.

I'm not really interested in doing diagnostics, submitting save files, etc. I have a modded game and I understand the policy is that there is no tech support when mods are installed (as it could be corrupted state in one of them that is causing the issue).

I'm not expecting someone to help diagnose the issue. I just wanted to know if I had a unique situation or something many users were experiencing. It appears I have a unique problem with my specific installation and/or mods.

I just had it happen again on a quick-save (user-initiated save), which is why I returned here to see if there were any reports/confirmation.

I'll do some diagnostics, etc, on my own, but most likely I'll just give up on X4. If/when the problem appears in other areas, then maybe I'll consider hardware solutions. For now, given the lack of any issue of any kind except when running X4, it seems safe to assume that it's either steam, X4, or a mod. Given that I find X4 unplayable without a few critical quality of life mods (Sector Satellites, etc) I just really don't have any interest in playing the base game to enable a path toward effective tech support.

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Sat, 17. Sep 22, 23:37

Rei Ayanami wrote:
Sat, 17. Sep 22, 03:44
The autosave causing the crash and normal saves working does not necessarily mean that there is something wrong with the autosave, perhaps by pure chance X4 tried to save onto a corrupted part of your harddrive (causing a system crash) while normal saves by pure chance accessed a working part of your harddrive.
Again and again and again... ? That seems... unlikely.

Much more likely there's a corrupted state of either X4 or a mod that triggers a seg fault during some difference with quick/auto save that does not happen (and has never, ever happened) with a standard save.

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Sat, 17. Sep 22, 23:47

Imperial Good wrote:
Thu, 15. Sep 22, 18:33
ahostofissues wrote:
Thu, 15. Sep 22, 15:41
Is anyone else experiencing commonly crashing during autosave (crashes entire computer, as if I'd held the power button down)?
Please confirm the exact way your computer crashes.
  • BSoD. Windows says an unrecoverable error occurred and then the system restarts. This can be caused by buggy drivers or unstable hardware.
  • System becomes entirely unresponsive. Have to hold down power button or press restart button. This can be caused by faulty or unstable hardware.
  • System seems to completely power down. Might automatically start itself a few seconds later and then proceeded to boot like normal. This can be caused by unstable hardware, especially AMD Ryzen CPUs that are not in a stable configuration.
A dxdiag listing of your system would also be useful.

Why it crashes after auto save and not manual saves is hard to say. Could be something as weird as a power transient caused by changes in CPU and GPU workload that are slightly different between the modes of saving.
If there's something specific you're looking for in the DxDiag results, you can find it here:

https://we.tl/t-R3yuwt4bdU

I don't see anything there that catches my eye, but again maybe you're looking for something specific...

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Sun, 18. Sep 22, 00:04

Rei Ayanami wrote:
Sat, 17. Sep 22, 03:44
...
Before ordering new parts I'd try running some diagnostic applications for your hardware, especially RAM and your harddrive, to make sure that it's actually the hardware that is causing the issue. Sometimes diagnostic tools can even repair it (depending on what's wrong).
I've already done windows boot memory diagnostic and full disk diagnostics. Neither found any issues.

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Sun, 18. Sep 22, 00:32

For what it's worth, an examination of the "game go boom!" save file shows that the file ends with :

Code: Select all

<log time="70953.294" type="consume" owner="[0x1372d]" ware="plasmaconductors" v="389"/>
<log time="70953.518" type="produce" owner="[0x204a9]" ware="medicalsupplies" v="12168" t2="71254.511" v2="12390"/>
<log time="70953.594" type="trade" owner="[0x3fbaf]" ware="ore" v="46234"/>
<log time="70953.63" type="collect" owner="[0x374ef]" ware="ore" v="2528"/>
<log time="70953.669" type="collect" owner="[0x65a1b]" ware="silicon" v="1430"/>
<log time="70953.702" type="trade" owner="[0x644b6]" ware="superfluidcoolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>

... repeat for literally 4 million lines...

<log time="70953.775" type="trade" owner="[0x4eolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eolant"5
--EOF--
The file is 15921487 lines long.

That's... not right.

When I restart and load previous manual save (about 10 minutes of gameplay earlier) the corresponding section of the quick-save file is:

Code: Select all

<log time="70953.518" type="produce" owner="[0x20d58]" ware="medicalsupplies" v="12168" t2="71254.511" v2="12390"/>
...
<log time="70953.594" type="trade" owner="[0x4045e]" ware="ore" v="46234"/>
<log time="70953.63" type="collect" owner="[0x37d9e]" ware="ore" v="2528"/>
<log time="70953.669" type="collect" owner="[0x662ca]" ware="silicon" v="1430"/>
<log time="70953.702" type="trade" owner="[0x64d65]" ware="superfluidcoolant" v="5937"/>
<log time="70953.775" type="trade" owner="[0x4eb46]" ware="cheltmeat" v="4146"/>
<log time="70954.236" type="produce" owner="[0x7d19]" ware="medicalsupplies" v="36876"/>
<log time="70954.301" type="produce" owner="[0x5005f]" ware="water" v="18150" t2="71196.118" v2="18700"/>
<log time="70954.333" type="trade" owner="[0x36c74]" ware="energycells" v="166879"/>
<log time="70954.333" type="trade" owner="[0x4ef10]" ware="quantumtubes" v="1101"/>
...
Seems pretty clear that the game state is messed up, and is writing garbage to the file when the crash occurs.

Doesn't seem like a hardware problem. I've come around to ruling that possibility out.

It's the game or the mods.

User avatar
Duncaroos
Posts: 503
Joined: Wed, 4. Jan 12, 22:23
x4

Re: Crash on autosave?

Post by Duncaroos » Sun, 18. Sep 22, 01:49

Unfortunately you won't get Devs chasing a problem for a save that's been modified. Got a vanilla save that has a similar setup that crashes on autosave? I run vanilla and never encountered the game crashing when auto-saving.

I have a recent game in Tech Support forums that is vanilla you can test out? Not totally late-late game, but it has lots of hours behind it and a pretty substantial player faction.

*Ninja edit: have you tried clearing out your Logbook in game? Maybe it's so large/long it's causing you issues.
Playing X4+All_DLC 6.20 Build - on:
CPU: Ryzen 5 5600X; RAM: 4x8GB DDR4 3200MHz; GPU: GTX 1070 8GB, Driver v516.94, DirectX 12.0; OS: Win10 Home 22H2 (19045.3086); Monitor: Single Acer S232HL 1920x1080

Duncaroo's Station Storage Estimator

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Sun, 18. Sep 22, 03:48

Duncaroos wrote:
Sun, 18. Sep 22, 01:49
Unfortunately you won't get Devs chasing a problem for a save that's been modified. Got a vanilla save that has a similar setup that crashes on autosave? I run vanilla and never encountered the game crashing when auto-saving.

I have a recent game in Tech Support forums that is vanilla you can test out? Not totally late-late game, but it has lots of hours behind it and a pretty substantial player faction.

*Ninja edit: have you tried clearing out your Logbook in game? Maybe it's so large/long it's causing you issues.
I don't expect devs to fix it, or even investigate. I posted just to see if anyone else was experiencing a similar issue they hadn't reported.

And since it's an intermittent problem, I'd have to sit and play for hours before concluding that it "wasn't happening" on a particular save load as a starting point. Not fun, not interested. I'm not being paid to be a beta tester for software someone else wrote.

And vanilla... yah. No. The game has some fundamental issues with crew leveling and the satellite system implementation that make it literally unplayable for me without mods to fix each. I won't play vanilla as currently implemented. I resorted to mods after the first dozen hours as the only alternative to walking away and going back to Stellaris or EU-4.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4764
Joined: Fri, 21. Dec 18, 18:23
x4

Re: Crash on autosave?

Post by Imperial Good » Sun, 18. Sep 22, 04:10

Given you are using an AMD Ryzen 3 1200 Quad-Core Processor your symptoms match general AM4 CPU instability. Why your system has suddenly become instable, who knows, but it could be anything from silicon aging, thermals to it never being perfectly stable to begin with but the workload of your save just recently reached such to trigger instability. Diagnosing such instability can be very difficult, but fortunately it seems that it reliably occurs during autosaving in X4 so you can use that as a test if you have found the cause or not. Using mods or X4 in general should have nothing directly to do with this as such crashes are always a hardware issue in my experience. X4 is more prone to running into these issues though, but that is purely due to it making CPUs work more than most games do.

First, I would recommend checking for a BIOS update. AMD has rolled out stability improvements over the years for the AM4 platform. Take the last BIOS that is still compatible with first generation (Zen1) Ryzen processors. Do not update to a version later than the last one that supports first generation Ryzen (Zen1) as this might render your motherboard incompatible with your CPU.

Make sure all CPU overclocks are disabled so the CPU is running at standard/stock speed. Several people in the past using first gen Ryzen had similar issues at various times due to "automatic overclocking" that some motherboard vendors provide.

If you are using DCOP (AMD's version of XMP for AM4 memory overclocking) then consider disabling it to allow the memory to run at much slower standard speeds. If this fixes the crash then the issue would be something related to the memory controller not liking the memory timings and that some manual tuning of the DCOP profile may be required.

If an overclock is causing the instability, then it could be related to silicon aging. You should be able to restore most of the overclock performance by tuning some values to be more stable.

As you are using AM4 there are potential CPU replacements/upgrades available should your motherboard support them. At least Zen2 should be partially compatible which could mean something like a Ryzen5 3600 could be a replacement option if it can be found cheaply.

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Wed, 19. Oct 22, 18:05

Follow up:

I've been doing a good deal of testing, trying to isolate a problematic mod, etc. What've found is that:

a) it does not seem to be related to a particular mod. I've experienced the problem even with zero mods installed.
b) it *does* seem to have some correlation to Firefox, oddly. Not conclusive, but the correlation does seem to exist and support for it as the cause is growing rather than shrinking.

This is a windows 10 machine which I use only to run steam, and occasionally browser to look things up. And I find, anecdotally, that when I scrupulously avoid running firefox, no matter how I have the game configured things seem to be fine no matter how long I play or how often I save.

But when have firefox running, especially when I tab out to it from X4 and back, there is a highly increased likelihood of the "lock up the entire computer" situation happening. Again, since this is a single-use computer, I can't say it wouldn't happen if I had other software running instead of firefox. But it does seem to be an issue with either firefox, x4, or the combination of two... something doing something either Windows 10 or my hardware doesn't like that's causing a low-level kernel panic or core system bad memory allocation or something.

ahostofissues
Posts: 115
Joined: Sat, 6. Aug 22, 23:41

Re: Crash on autosave?

Post by ahostofissues » Wed, 26. Oct 22, 18:59

Final status: seems to be resolved, as a memory issue.

When physical memory is all allocated, save process triggers corruption that locks up the machine (low-level malloc issue of some sort presumably).

With more memory available, problem has not occurred for many days now.

Base game + Sector Satellites mod + Learning All The Things mod

Running firefox (leaving it running in background while game active) seemed to be a particularly greedy memory use issue, exacerbating the problem but not a direct cause. Was able to replicate with other applications running.

Post Reply

Return to “X4: Foundations - Technical Support”