[2.0.10] Crash on launch, out of memory errors

Place for things which are bugs but we have no idea how to solve them. Things related to hardware, libraries, strange setups, etc.
grillgamesh
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Oct 25, 2024 12:34 am
Contact:

[2.0.10] Crash on launch, out of memory errors

Post by grillgamesh »

Bug Information:
Upon fresh launch from a freshly booted PC after updating from steam, I was greeted with a "base mod" error (henceforth referred to as "Error 1".
I then relaunched the game, and was greetd with a "Failed creating a texture" (Henceforth referred to as "Error 2";
WIN+SHIFT+S would not allow me to capture a direct screenshot, as it would restart my graphics driver (presumably, at least... it's the same behavior as pressing WIN+CTRL+SHIFT+B. so something graphical happens I guess)

After 3 relaunches to confirm behvaior, all files were validated by steam. Steam then showed that gamefiles were all valid, and no corruption was present.

Steps to Reproduce:
Freshly rebooted Windows 10 desktop
Launch steam, and after updating to latest version of 2.0.10, you would be greeted with Error 1.
Relaunch game, and you will be greeted with Error 2.
Upon relaunch, Error 2 rears its head again, and prevents the game from launching. Several relaunches have shown that Error 2 will subsequently always happen after Error 1.

Logs:
factorio-current, and factorio-previous logs are attached.
Note that error 1 is not present in the logs, due to the logs not saving beyond 2 launches, and I relaunched several times.

Error 2 appears to be `D3D11_ERROR: ID3D11Device::CreateTexture2D failed in createInternalTexture on line 250. Error [0x8007000e] - E_OUTOFMEMORY`, which upon checking taskmgr, shows that I have over 12GB of RAM free, and GPU RAM is also almost completely free. Attached are screenshots of taskmanager showing free RAM for GPU and System.

I think I've gotten all the info, however I will answer any questions you may have.
stuff
Attachments
factorio-current.log
(10.76 KiB) Downloaded 20 times
factorio-previous.log
(10.55 KiB) Downloaded 16 times
saxnviolence
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Oct 25, 2024 7:25 pm
Contact:

Re: [2.0.10 - Steam] Crash Upon Launch - Multiple Errors

Post by saxnviolence »

I am having this same exact problem. Including my current and previous logs as well for posterity.
Attachments
factorio-previous.log
(8.05 KiB) Downloaded 18 times
factorio-current.log
(5.97 KiB) Downloaded 18 times
Genhis
Factorio Staff
Factorio Staff
Posts: 766
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [2.0.10 - Steam] Crash Upon Launch - Multiple Errors

Post by Genhis »

Thanks for the report. Both of you seem to have run out of memory, but based on the hardware specs this shouldn't be possible. Your page file seems a bit too full, you could try increasing its size.
grillgamesh
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Oct 25, 2024 12:34 am
Contact:

Re: [2.0.10 - Steam] Crash Upon Launch - Multiple Errors

Post by grillgamesh »

Oddly enough, my pagefile is at 4GB, on an NVMe drive.


logfile attached after I launched today.
Attachments
factorio-current.log
(9.62 KiB) Downloaded 17 times
10-26-2024, 11-14-08.png
10-26-2024, 11-14-08.png (8.08 KiB) Viewed 502 times
grillgamesh
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Oct 25, 2024 12:34 am
Contact:

Re: [2.0.10] Crash on launch, out of memory errors

Post by grillgamesh »

So, it seems to be that factorio writes to the pagefile first; not to RAM.
For some reason, if the pagefile is full (even when set to "system-managed"), even when windows has a substantial amount of VRAM and regular RAM, nothing can be written to RAM.
Not sure if this is a factorio-specific error, or some windows.... well, windows-ism... the internet had multiple threads on this exact issue with other programs, so it may be just some borked legacy layover NT kernel behavior from the time when RAM was lacking, and storage was plentiful... (i've found threads dating as far back as 2005, and some as recent as Early 2020, or Late 2020

For the time being, the solution seems to be:
- fresh boot, always
- open factorio before anything else has a chance to load in
- open any other apps, after factorio loads.

quite annoying, I realize, but it does in fact allow for the texture maps to be created, and the game to launch normally.

There *are* solutions to force factorio to try to write to system RAM before paging, but that requires some code rewrites for the actual executable, and uh... I'm not quite advanced enough to do exe unpacking and recompiling, especially with such a complex executable.

anyhow, here's the latest logs as well.
Attachments
factorio-previous.log
(15.33 KiB) Downloaded 16 times
factorio-current.log
(16.48 KiB) Downloaded 19 times
Loewchen
Global Moderator
Global Moderator
Posts: 9817
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [2.0.10] Crash on launch, out of memory errors

Post by Loewchen »

grillgamesh wrote: Sat Nov 02, 2024 7:33 am So, it seems to be that factorio writes to the pagefile first; not to RAM.
For some reason, if the pagefile is full (even when set to "system-managed"), even when windows has a substantial amount of VRAM and regular RAM, nothing can be written to RAM.
That is not how factorio works though, that is how operating systems work.
grillgamesh
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Oct 25, 2024 12:34 am
Contact:

Re: [2.0.10] Crash on launch, out of memory errors

Post by grillgamesh »

Loewchen wrote: Sat Nov 02, 2024 2:25 pm
grillgamesh wrote: Sat Nov 02, 2024 7:33 am So, it seems to be that factorio writes to the pagefile first; not to RAM.
For some reason, if the pagefile is full (even when set to "system-managed"), even when windows has a substantial amount of VRAM and regular RAM, nothing can be written to RAM.
That is not how factorio works though, that is how operating systems work.
true, true; however that's if you're using the OS memory manager, and not an in-house one. and as we all know, M$ memory management is wack. I'd take a WUBE-made memory manager over M$'s any day, lol.
but I digress, i was more making a write up of the stuff I discovered last night as more of a posterity thing for future reference than anything.
Post Reply

Return to “1 / 0 magic”