[1.1.72] Game sometimes hangs on infinite loop

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
leeux
Inserter
Inserter
Posts: 34
Joined: Sat Oct 02, 2021 2:56 am
Contact:

[1.1.72] Game sometimes hangs on infinite loop

Post by leeux »

Hello, first time poster, sadly in order to report an issue I'm having :(

Sorry if this is not the right place to post it, or it's a known issue, etc. I'm pretty sure I looked at all the relevant threads I could find and found nothing similar, but I'm often blind :/

I'm guessing it's related to the autosave, but I'm not entirely sure, sadly. Is not 100% reproducible, and it doesn't happen every single time the autosave triggers. It seems to depend on what actions I'm doing or what's happening in the game at that time, or some such.

The log in AppData shows no activity before the hang, and there isn't much else I can say for sure, only that I'm almost 99% sure that this didn't happen at all before release 55, as I played almost 500hs on a vanilla megabase on a really big map without ever having this issue at all.

But my current game is a different one and it's modded, based on Krastorio 2, but I don't think that has much to do with this issue. It's still fairly small and undeveloped, as I'm only at around 200hs on this one, and growing slowly.

More Info on my setup,

* Currently on last stable release on Steam (1.1.59), heavily modded (~100 mods or so)
* My machine is on the low end of the requirements, I lost my GPU a few months ago and I still couldn't buy a new one, so I'm using one that I had from years. (The one I have is an old ATI HD4670, I was lucky the game worked at all with this one.)
* The save files are located on an SSD
* CPU Intel i7 3930K
* Running on Windows 7
* Running the single player mode, not server... the saves are made in blocking mode (according to the log... checked that because I read other thread that said that could be having issues.)
* Game is running on low specs, but it's maintaining 60 fps stable... I have low textures and some graphical settings are disabled or lowered (e.g. clouds)
* Playing in Borderless window mode, not in full screen (in case it matters)

When it hangs, it stops responding and CPU usage jumps to max usage on the core where it's running, and never recovers (I waited for about ~15 mins one time, while I did other stuff) and the only thing I can do is to kill factorio.exe process using the task manager.

The issue happens at least once per gaming session, so it's fairly frequent... it used to be a rare occurrence, but I think as the save game is growing in size, it's becoming more common, at least that's my guess.

There's no discernible pattern I can report on when the issue happens.. today it happened two times in ~6 hs, once was when I was looking at the map while driving a vehicle (cruise mode from the mod), and the second I was stationary placing belts in a new area where I was building stuff. The only reason I say it's related to the autosave is because when it happens, it's around the time where the autosave should have been triggering (I had my autosave set to 30 mins, because in my last game, the megabase, it took so long to start saving that I had to lower the frequency in order for it to not be disruptive to the gameplay.)

Not sure if there's any way to enable more debug info that could help in finding the cause of this issue.

Best regars,
Leeux.


EDIT: Edited thread title to state current game version
Attachments
factorio-previous.zip
I've attached the log file from the last hang-up that happened during my last session
(19.21 KiB) Downloaded 60 times
Last edited by leeux on Sat Dec 03, 2022 8:04 pm, edited 1 time in total.

Loewchen
Global Moderator
Global Moderator
Posts: 8308
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: [1.1.59] Game sometimes hangs on initiating autosave

Post by Loewchen »

Does this only happen on this map/playthrough or also if you load a save with a different map?
Is there constant drive activity while the game hangs?
If you set the auto save time to 1min does it hang more frequently?

leeux
Inserter
Inserter
Posts: 34
Joined: Sat Oct 02, 2021 2:56 am
Contact:

Re: [1.1.59] Game sometimes hangs on initiating autosave

Post by leeux »

Good points! Thanks for the reply.

Yesterday, I've decreased the autosave time to 5 mins after posting this, but I've yet to play the game for long after that. I'm gonna try today and see what happens.

Also, will going to try starting a new vanilla game without mods and play it for several hours (I have the last couple of achievements to chase, so it'll be a good excuse to do that!) but that will have to be another day, since I don't have much time for playing today, and I wan't to focus on that when I do.

What I can do today, whether changing the autosave time affects or not, is also load one of my more bigger/heavy games and see if that changes anything.

EDIT: Sorry, I completely forgot to address this point:
Loewchen wrote:
Sun May 22, 2022 12:48 pm
<smip>
Is there constant drive activity while the game hangs?
<smip>
No, no disk activity at all!

That was my first thought also the first time it happened, but no, no activity at all.

One thing I did one time was to look at the reported activity by the Process Explorer tool by looking at the threads in the process, and seeing what the one that's consuming the most was doing, and it didn't show anything recognizable or that jumps to my attention, but I can say with some degree of confidence that from what I could gather it seems that the thread that locking itself in an infinite loop is the main thread for the process (at least that's what seems to be to me, at least... sorry if this is irrelevant info.)

The whole installation is on the same SSD as the save games, but in order to do that, I created a windows junction/reparse point (i.e. it acts like a symbolic link on Unix) in my documents folder where my Factorio saves are located that points to a folder in the SSD, as I didn't want to have to move the whole folder, just the AppData for Factorio. This has been working like this for a looong time, since at least my second playthrough game (was also a Krastorio 2 game around ~8 to 10 months ago) and never had any issues with it.

I did it this way, because at that time I wasn't aware that the game allows for redirecting the saves folder natively... as I do this for many games, since my C drive where my personal folders are (and where the saves usually end up residing) is an old HD that's a bit on the slow side, and also, because it allows me to switch save profiles/mods and all, by editing the junction and pointing it to a different target.

Sorry for the extra verbosity, in case it doesn't add anything extra to the issue!

/END EDIT

I'll report back any news, when I have something to add!

Thanks again,
Best wishes.

leeux
Inserter
Inserter
Posts: 34
Joined: Sat Oct 02, 2021 2:56 am
Contact:

Re: [1.1.59] Game sometimes hangs on initiating autosave

Post by leeux »

Sorry for the long time without feedback, I didn't post back before because sadly I couldn't reproduce the issue again. Since I've set the autosave frequency back to every 5 mins, the hang never occurred again, despite hours and hours of play time over the last two weeks.

I'm gonna try to reset it back to every 30 mins, and see if it happens again... just to see if it's related or not. But even if it happens, it doesn't say much about what causes it :/

I've tried also loading my old big saves and move around the map for a while to see if that made it happen, but not luck either with that... but I didn't really committed to make any changes in those, since, they're old and done. I'll maybe start a new pure vanilla game over my coming holiday weekend, just to see if I can reproduce it with a clean save and no mods... but I don't have much hopes.

So, perhaps, if there's no other reports like this one at all from any other players, this can be dismissed as no more than a local issue... sorry for the needless noise :/

Best regards.

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: [1.1.59] Game sometimes hangs on initiating autosave

Post by lyvgbfh »

I've seen this happen to me sometimes with RAM exhaustion, saving seems to increase memory use during and things seem to slow down a ton if it doesn't have memory to use.

leeux
Inserter
Inserter
Posts: 34
Joined: Sat Oct 02, 2021 2:56 am
Contact:

Re: [1.1.59] Game sometimes hangs on initiating autosave

Post by leeux »

lyvgbfh wrote:
Wed Jun 08, 2022 2:27 am
I've seen this happen to me sometimes with RAM exhaustion, saving seems to increase memory use during and things seem to slow down a ton if it doesn't have memory to use.
Could be, maybe... but perhaps more due to low VRAM on the GPU than actual system RAM? As I said in my OP mine is an old HD4670 that has only 1 GB VRAM... the game stutters a bit when I move around over long stretches of the map rapidly (i.e. via train or vehicle) so I know it has issues moving stuff into/out of the VRAM, I think... could be perhaps related to that?

I don't personally think it could be normal system RAM, as I have 24GB of it and most of it is Free/Unused according to Windows Performance Monitor... but granted, I could be wrong. OTOH, if there was a hardware related problem with the RAM, I think it would affect more than the game, but I might be wrong on that too.

Also, there is the fact that I'm still not entirely sure that it's related to the autosave process... I have my suspicions on that due to the fact that the hangs happens after a long time I didn't see the autosave, so my guess is that it should've been about to happen, and the fact that in every autosave I notice a small freeze, minimal (i.e. less than a second) before the autosave screen appears (I assume it happens while the game collects all info that it needs to save, right?) so my thought was that it was that freeze that was getting caught up in some kind of infinite loop... but that's all guessing on my side.

If it happens again, will try to run some diagnosis tools and see if I can get some extra info on my side.

Best regards.

leeux
Inserter
Inserter
Posts: 34
Joined: Sat Oct 02, 2021 2:56 am
Contact:

Re: [1.1.72] Game sometimes hangs on an infinite loop while playing

Post by leeux »

Sorry to revive an old topic, but.. the hang still happens for me, and I still haven't managed to find what's causing it... it often happened when moving around the map, but the last two times it happened I was stationary... one time I was just hovering over containers to check what was in them, and the other time I was removing old power poles to reposition them.

I managed to capture the call stack of the state in which the game is while being hang in an infinite loop using visual studio (thanks for shipping the PDB btw, the stack wouldn't be as useful without it.)

Here's the state in which the game remains after the hang as shown by Process Explorer... is not of much use, but at least from here I can see the info of which thread hangs up:
01-Thread List from Process Explorer.jpg
01-Thread List from Process Explorer.jpg (101.5 KiB) Viewed 933 times
And this is the call stack of that thread, obtained by attaching to factorio process and breaking up execution...
02-Calls Stack from Visual Studio.jpg
02-Calls Stack from Visual Studio.jpg (90.53 KiB) Viewed 933 times
I can't recover from this hang up and I have to kill the process and lose progress :(

I'm playing on a potato video card atm, the game says it's using DX11 but I know for sure that my card only supports DX10... so that might be part of the issue... if so, I'm grateful that I can still play the game, no matter the hangs... I'm getting used to save more often! :)

I'll be editing the thread title to reflect current version (1.1.72) and the fact that it doesn't seem to have anything to do with the autosave... at least, I don't think so.
Attachments
Factorio-Log+Modlist.zip
(70.73 KiB) Downloaded 27 times

Post Reply

Return to “Technical Help”