[BUG] 4.1 Crash on autosave (solved)

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

Moderator: Moderators for English X Forum

Post Reply
User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

[BUG] 4.1 Crash on autosave (solved)

Post by Xkuka » Wed, 24. Nov 21, 05:13

I had a couple of these so far, but until now the game just closed.
Now i have an error i can report:

Code: Select all

X4 PANIC
SMem::Allocate() failed allocating 1061683289 bytes - error: Not enough space
The thing is, when it crashed without error i was in fullscreen, i read that window mode can help, and that is the difference. I can save just fine myself, only happens on autosave.
I have plenty memory, RAM, SSD, whatever. This is not a memory issue on my system side.

What else can i provide to solve this? I guess nobody want to inspect a modified safe file... :P
Last edited by Xkuka on Wed, 24. Nov 21, 17:20, edited 1 time in total.
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

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

Re: [BUG] 4.1 Crash on autosave

Post by CBJ » Wed, 24. Nov 21, 08:57

It clearly is a memory issue, as the error message is pretty clear about that. Without any information about your system, what mods you are running, and what else is running on your PC, however, it's hard to tell whether it's reasonable for the game to be looking for that much memory. At a guess, it may be simply that the mods you're using have caused your game to get too big.

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave

Post by Xkuka » Wed, 24. Nov 21, 13:16

CBJ wrote:
Wed, 24. Nov 21, 08:57
It clearly is a memory issue, as the error message is pretty clear about that. Without any information about your system, what mods you are running, and what else is running on your PC, however, it's hard to tell whether it's reasonable for the game to be looking for that much memory. At a guess, it may be simply that the mods you're using have caused your game to get too big.
Here my system:

I9 9900k
16GB Ram DDR4 @ 2666mhz
GTX 980
System on NVMe SSD and games on SATA SSD
1080p monitor

Everything up to date ->OS, drivers, BIOS.
As i said, lots of memory, both system and games ssd are 1TB and nowhere near capacity. And RAM is used between 10-11 GB when playing X4.
Only the GPU is sweating a little but i kept the settings so i have still plenty of FPS reserves.

Nothing in the background usually other than Firefox, Logitech Gaming Software and MSI Afterburner. Its really that clean. :mrgreen:

Yeah that is 1GB the game tries to allocate. And i guess i was lucky until now, got my first crash on quicksafe too... Same error.
But still, i got that. The question is where it wants to allacate that and why. The save file is only afraction of that, why does it allocate 1GB when saving the game?
I doubt that the mods make the game too big, down is a list of them, mostly QoL stuff, except for the paints. I guess i am sort of midgame, as my plans go there is still much to grow in this game. And my own empire isnt that big, try to keep it simple and produce everything in one complex with as little overhang as possible. And i just started to grow my fleet... almost at my own S/M warf...

Heres the latest dmp:
https://drive.google.com/file/d/1xwJW5H ... sp=sharing

How can i read those dmp's myself? Maybe i dont need to bother anyone if i can extract from it what i need to know.

Mods:

Code: Select all

Paintjobs Galore
Better Kill Credit
Better piracy
Convert Paint To Default
Capital Ship Loot Magnet
Equipment Modifications Redone
Fly-by Lockbox
Fly-by Looting
Sector Explorer
Inventory Collector
Sector Patrol
HJ - CopyBehavior
HJ - Paintjobs Collection
JP_CollectDroppedCargo
Trader Seminars
Surface element targeting
LearningAllTheThings
Map Sound Loop Muted
Mobile Repair Service
No Crafting Music
no_rcs_sfx_50_percent_volume
No more static sounds from terminals
NoMoreCockpitChairSound
NoMoreNotificationsSound
NoRanksThanksTannoy
Paintjobs for Sale
Reaction Force
SirNukes Mod Support APIs
Secret Stash
Civilian Fleets: Mimicry Extension
Last edited by Xkuka on Wed, 24. Nov 21, 13:29, edited 2 times in total.
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

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

Re: [BUG] 4.1 Crash on autosave

Post by CBJ » Wed, 24. Nov 21, 13:24

Savegames are compressed on disk, so the uncompressed size could be much larger. Fairly large allocations during saving are quite normal. Again, though, your system information notwithstanding, the crashdump confirms that this is an out of memory error.

The error occurs while saving script data, so one guess would be that one of your mods' scripts has "gone wild" and is creating crazy amounts of data.

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave

Post by Xkuka » Wed, 24. Nov 21, 13:42

CBJ wrote:
Wed, 24. Nov 21, 13:24
Savegames are compressed on disk, so the uncompressed size could be much larger. Fairly large allocations during saving are quite normal. Again, though, your system information notwithstanding, the crashdump confirms that this is an out of memory error.

The error occurs while saving script data, so one guess would be that one of your mods' scripts has "gone wild" and is creating crazy amounts of data.
Alright, that was a hint. I deactivated compression and made a save. -> 700mb
Is there somehow a limitation when it gets bigger? I guess i can live with large save files. Maybe the compression is the problem at that file size?

I will for testing deactivate everything, then stop any ship, and see if the file size changes.
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

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

Re: [BUG] 4.1 Crash on autosave

Post by CBJ » Wed, 24. Nov 21, 13:50

As previously explained, memory is the limitation. Compression does use more memory. You can try switching that off in the advanced settings in-game, but the fact that it's running out of memory on your system does suggest there is a problem with one of the mods you're using, and that's something you'd have to take up with the mods' authors.

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave

Post by Xkuka » Wed, 24. Nov 21, 14:37

CBJ wrote:
Wed, 24. Nov 21, 13:50
As previously explained, memory is the limitation. Compression does use more memory. You can try switching that off in the advanced settings in-game, but the fact that it's running out of memory on your system does suggest there is a problem with one of the mods you're using, and that's something you'd have to take up with the mods' authors.
Well, as i said i have disabled all extensions now. And as mentioned turned the compression off. Its safegame friendly. I know i know not every script is entirely removed from the game when you remove the mod. But i did that, and i teleported around a bit to let the game do its thing and made more safes. In that time the size grew from 790mb to 797mb.
Might be related that i just helped the PAR to clear a Xenon sector and they are building like crazy. And from that on its not far to 1GB. So the game grows naturally.

My question remains, i try to refrase, is there a limitation as for the file sizes? Is 800mb uncompressed unusual large for the state of the game?

Here take a look, you should be able to load without any problem.
https://drive.google.com/file/d/1hHxQQ7 ... sp=sharing

And how is that meant? "Compression does use more memory." Does it need more RAM to process the savegame?

Here's a screenshot from task manager while X4 is running on the other screen. Does not look like 1GB would cause too much trouble there...
https://drive.google.com/file/d/10MXBd5 ... sp=sharing

I mean i get that you cant bother with every modded game, but cmon i try my best to sort it out. As far as i understand there shouldnt be anything that is creating that sort of tables that make that kind of big file sizes (+200mb) all of a sudden. The game was running 3 days already, and now a script should have gone haywire? I am not ready to take that pill just like that... :D


I will turn anything on again and try to continue without compression. I got that feeling about that... You will see me crying if it keeps crashing. :roll:
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

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

Re: [BUG] 4.1 Crash on autosave

Post by CBJ » Wed, 24. Nov 21, 14:55

Xkuka wrote:
Wed, 24. Nov 21, 14:37
I know i know not every script is entirely removed from the game when you remove the mod. But i did that, and i teleported around a bit to let the game do its thing and made more safes. In that time the size grew from 790mb to 797mb.
Might be related that i just helped the PAR to clear a Xenon sector and they are building like crazy. And from that on its not far to 1GB. So the game grows naturally.
As you've noted, disabling the mods doesn't necessarily remove everything associated with the scripts. Yes, the game can grow as you play, but normally only as more ships and stations get added to the universe. It can also go up and down depending on which sector you're in.
Xkuka wrote:
Wed, 24. Nov 21, 14:37
My question remains, i try to refrase, is there a limitation as for the file sizes? Is 800mb uncompressed unusual large for the state of the game?
Simple answer: no.
Xkuka wrote:
Wed, 24. Nov 21, 14:37
And how is that meant? "Compression does use more memory." Does it need more RAM to process the savegame?
Yes, the compression process itself takes up RAM. Saving without compression requires less.

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave

Post by Xkuka » Wed, 24. Nov 21, 15:37

CBJ wrote:
Wed, 24. Nov 21, 14:55
Yes, the compression process itself takes up RAM. Saving without compression requires less.
Ok, you know what is very, very interesting. It just happened again, and i noticed that the exact same number from that error isnt exactly unique. (1061683289 bytes).
Not only is that the same like from my first report, the same error with the same value was posted by other users, for 4.1 beta 3, but close enough. And when it happens, here is the proof, i still have plenty RAM for saving.
https://drive.google.com/file/d/1idIsrO ... sp=sharing

I made a couple of saves in succession until the crash, and i dont see where i am running out of memory. And you know as well that a simple error might not be true. So at which memory is that error really pointing?
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave

Post by Xkuka » Wed, 24. Nov 21, 15:48

I got a feeling the standby memory is bugged and not clearing.

https://drive.google.com/file/d/19rkEM1 ... sp=sharing

I'll try something... :gruebel:
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave

Post by Xkuka » Wed, 24. Nov 21, 16:07

Ok, no conclusion yet, but i found something i would have liked to hear from you... haha
It might be that my vRAM was too little, and therefore also the standby could not clear properly. I had fixed 4GB vRAM, and it was full, also the standby was full, and what happens when a program is utilizing that heavily and nobody really tells you? Right... :idea:

I increased it to 24GB and its already using 10 of it.
Learning by burning... :mrgreen:
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave

Post by Xkuka » Wed, 24. Nov 21, 17:20

I think i got it solved. I tried hard to provoke another crash but it didnt happen anymore.

So, here is a little explanation for whoever might run into this. And maybe even for an addition in the troubleshooting section, because i read that twice and there is no word about vRAM.

https://drive.google.com/file/d/1ikq-qL ... sp=sharing
On the screenshot you see that the game actually requires 10GB of memory, half of it is outsourced to the page file. The task manager only tells you what is in the active memory. My page file, or vRAM was originally managed by windows, until i had the first crash. At that point windows had allocated like 2GB to it. I set it up to 4, but i didnt really think i was actually on the right track already, it was simply not nearly enough. And i did not get the error message earlier, the game just closed on the first crashes.
Now it is set to 24GB, and the real usage of ram has actually decreased by roughly 1GB! Also the standby memory is actively managing, which was not the case when the page file was too little. It was constantly full because it could no shift data to the page file.

So if you have "only" 16GB of ram, it should be highly recommended that you increase the virtual memory to at least 10GB, and set it to your fastest drive. I guess a page file on a HDD does not feel too well.

And by the way, uncrompressed saving is also faster. If i would've known that earlier...
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30349
Joined: Fri, 16. Apr 04, 19:21
x4

Re: [BUG] 4.1 Crash on autosave (solved)

Post by Alan Phipps » Wed, 24. Nov 21, 18:13

Just to prevent any confusion over memory types here.

VRAM or Video RAM is the dedicated fast memory physically mounted on your graphics card and only used for graphics. The minimum requirement to play X4 is a 3 GB VRAM card, although 4 GB or more is recommended.

Shared graphics memory is an allocation of your normal fitted system RAM (which is slower than VRAM) that can be used for graphics purposes when there is no suitable dedicated VRAM space available.

Pagefile or swapfile is a reserved portion of space on one or more system drives that is used by the system as virtual RAM when your system is getting short of fitted system RAM space to use. This is usually much slower than VRAM or system RAM, although generally M2 NVMe SSDs are faster than SATA SSDs and much faster than mechanical hard disk drives (HDDs). Fragmentation is a fairly frequent cause of problems when using rather full HDDs for pagefile as it can cause timing issues while the system is slowly reconstructing badly fragmented large memory files. Fragmentation is not an issue for SSDs. Pagefile can and will be used for any system memory purposes and not just for graphics.

I hope this helps.
A dog has a master; a cat has domestic staff.

User avatar
Xkuka
Posts: 207
Joined: Sun, 14. Mar 10, 19:25
x4

Re: [BUG] 4.1 Crash on autosave (solved)

Post by Xkuka » Wed, 24. Nov 21, 19:02

Alan Phipps wrote:
Wed, 24. Nov 21, 18:13
Just to prevent any confusion over memory types here.
I am so sorry that i used vRAM to describe the page file. It meant virtual RAM. But vRAM is of course actually used for video RAM... lol

But in my defense, i am not at work, just trying to play a videogame... :D
***Never not modified***
Specs: I9 9900k, 32GB DDR4, ASUS RTX2060 12GB, Sys drive: 1TB Nvme SSD, Games drive: 1TB Nvme SSD, Win10 pro 21H2

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30349
Joined: Fri, 16. Apr 04, 19:21
x4

Re: [BUG] 4.1 Crash on autosave (solved)

Post by Alan Phipps » Wed, 24. Nov 21, 19:32

No need. My post wasn't aimed at your use of vRAM which was itself perfectly clear; it was intended just to clarify things for other readers unaware of the differences and purposes.
A dog has a master; a cat has domestic staff.

Post Reply

Return to “X4: Foundations - Technical Support”