Factorissimo2


Factorissimo adds factory buildings to Factorio. Place them down, walk in, build your factories inside!

Content
3 years ago
0.14 - 1.1
222K

b Game freezes randomly

3 years ago

This is from reddit: https://www.reddit.com/r/factorio/comments/ri3f5r/help_modded_game_keeps_freezing_seemingly_at/
Just download the save and wait ~3min (use /c game.speed=10 fo faster results)

There seems to be some kind of endless loop in the "update connections" logic.

In connctions.lua, the line
new_slot[1+#new_slot] = conn
is related to the freeze. Remove the line, and it doesn't freeze anymore.

I imagine the problem is that current_slot is equal to new_slot, and the loop then checks the newly added connection, adding it again and again and again.

3 years ago

Hi, I'm that reddit poster! Can confirm, removing Factorissimo fixes the described issue. I'd be glad to do any testing you'd like to get this working again, I really like using this mod. I'm a web developer with limited lua knowledge, so I shouldn't be completely helpless

3 years ago
(updated 3 years ago)

Hey there, I've made a quick attempt to find the issue, no time for more detailed inspection. The line DarkShadow44 pointed out in connections.lua is definitely not the problem, as this is a central essential line in connection logic, making sure all factory connections keep moving items and fluids around. Removing it will disable every existing factory connection, bringing your factory to a standstill (though it still gets power) and indirectly preventing the conditions for whatever the issue actually is, which can likely even be a bug in another mod.

Without further interaction, the game freezes on or immediately after tick 7371190. In fact, if the connection logic is disabled after e.g. tick 7371000, the game will still freeze.

Here's a quick and dirty tick counter you can paste into console for bug-hunting purposes (will not persist through save+reload and will cause instant desyncs in MP) and to produce saves as close to the freeze as desired:

/c script.on_event(defines.events.on_tick, function(event) game.print(game.tick) end)

This might help you locate the issue yourself if you have any more ideas as to what could cause this. I'm rather confident it isn't a Factorissimo bug as I haven't changed anything critical for a while (see changelog) and never had any freezes reported.

3 years ago

I think you're right, it appears to be an interaction with Renei's Transportation. I had a factory using its thrower inserters, which dump onto the floor if the belt they're aimed at is full. Found a factory absolutely flooded with items, and I bet it tried to throw the fatal item at tick 7371190. Thanks for pointing me in the right direction, I just won't use that mod moving forward. It seemed kind of scuffed anyway

New response