Page 1 of 1

[Rseding91] [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Mon Oct 28, 2024 12:48 am
by LoganDark
I'm encountering a bug in my save where while trying to conquer a biter settlement, my game (build 79682) will just freeze.

As in, everything just stops, audio stops, everything freezes, entire game is now stopped. If I attach Visual Studio 2022 to the process, I can see a call stack similar to the following:

Code: Select all

factorio.exe!Character::changePosition(const Vector & movement) Line 3031
factorio.exe!Character::update() Line 657
factorio.exe!EntityOrderHelpers::EntityOrderList<...>...
factorio.exe!EntityOrderHelpers::EntityOrderList<...>...
factorio.exe!ActiveEntitiesList::update(MapTick tick) Line 13
factorio.exe!Surface::update() Line 2364
factorio.exe!Map::updateEntities() Line 1272
factorio.exe!Map::update() Line 1222
factorio.exe!Game::update() Line 175
factorio.exe!Scenario::update() Line 1233
factorio.exe!Scenario::updateStep() Line 1150
factorio.exe!MainLoop::gameUpdateStep(...)
factorio.exe!MainLoop::gameUpdateLoop(MainLoop::HeavyMode heavyMode) Line 1206
Sometimes, it'll be in other functions like ZoomUtil::scaleToZoom, but it will always be inside Character::update, and if I try to step out of Character::update, it never returns (but all the functions it calls, including Character::changePosition, eventually return - it's just Character::update itself that never does, and keeps calling Character::changePosition in a seemingly infinite loop).

I've tried using the instrumentation stuff to pause in any Lua code but it doesn't seem like any Lua is being executed here.

My save is _autosave2.zip, my log is factorio-previous.log, and I have one tweaked mod installed (stdlib_2.0.0.zip) that isn't on the marketplace.

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Mon Oct 28, 2024 1:18 am
by LoganDark
Crash goes away if I remove the Infinite Quality Tiers mod

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Mon Oct 28, 2024 9:30 pm
by Rseding91
Do you have some steps I could do to reproduce the freeze? Like "load save, wait 5 seconds, freeze" or "load save, walk directly west, freeze"?

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Mon Oct 28, 2024 9:39 pm
by LoganDark
Rseding91 wrote: Mon Oct 28, 2024 9:30 pm Do you have some steps I could do to reproduce the freeze? Like "load save, wait 5 seconds, freeze" or "load save, walk directly west, freeze"?
do you load in where I was when I saved? I've attached an image with a location on the map (look at where I am), you basically have to be here, then attack the biter base that's very close to the east of where I am (east, not the east-southeast one). when the spitters start shooting at me is usually where my game freezes. I've repro'd this many many times in multiplayer and singleplayer, usually I can do it in about 5-30 seconds from loading the save. basically all you have to do is aggro the base and then move around near it

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 1:58 am
by LoganDark
hey, have you tried to reproduce this yet? why is it in the "not a bug" category?

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 7:13 am
by Rseding91
I tried to reproduce it but did not experience any freezing. I don’t know why it’s here.

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 7:16 am
by LoganDark
Rseding91 wrote: Sat Nov 02, 2024 7:13 am I tried to reproduce it but did not experience any freezing. I don’t know why it’s here.
weird.. when you load in, do you have my inventory? I have a power armor mk2 with 2-3 exoskeletons in it

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 7:24 am
by Rseding91
Yes, there were some biters, they killed a few turrets and then eventually killed me after I got stuck for a while.

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 7:31 am
by LoganDark
usually I go provoke the nests, shoot at them, get spitters shooting at me and etc and then the freeze happens, I'm not sure what else could be missing, if you're using windows and everything

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 7:45 am
by Rseding91
If you can get it into the stuck state and then in task manager make a process dump I could use that to load it into the VS debugger and see what’s happening. You want to compress it.

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 8:14 am
by LoganDark
Rseding91 wrote: Sat Nov 02, 2024 7:45 am If you can get it into the stuck state and then in task manager make a process dump I could use that to load it into the VS debugger and see what’s happening. You want to compress it.
Here is a memory dump of the same freeze happening on Factorio 2.0.13 (build 79912 expansion, win64). Sorry for taking so long, the compression took like 20 minutes

(edit that didn't upload?? hold on let me try again)

Re: [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 8:17 am
by LoganDark
here's the zip uploaded to my web server because the Factorio forum won't accept a 450MB zip file: https://logandark.net/files/Q3847PQ5-66 ... io.DMP.zip

Re: [Rseding91] [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 12:28 pm
by Rseding91
Just to confirm, this is still in 2.0.11? Or was this dump made in 2.0.13/2.0.14?

Re: [Rseding91] [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 4:11 pm
by LoganDark
Rseding91 wrote: Sat Nov 02, 2024 12:28 pm Just to confirm, this is still in 2.0.11? Or was this dump made in 2.0.13/2.0.14?
The memory dump was made on Factorio 2.0.13 (build 79912 expansion, win64)

Re: [Rseding91] [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 8:39 pm
by Rseding91
Ok, I was finally able to reproduce the issue and it's now fixed for the next release.

Re: [Rseding91] [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Sat Nov 02, 2024 11:53 pm
by LoganDark
Rseding91 wrote: Sat Nov 02, 2024 8:39 pm Ok, I was finally able to reproduce the issue and it's now fixed for the next release.
awesome thank you so much!

Re: [Rseding91] [2.0.11] Character::update calls Character::changePosition in an infinite loop

Posted: Fri Nov 08, 2024 11:35 am
by LoganDark
finally got 2.0.15 and this is in the change notes!!!! thank you so much!!!!