Page 1 of 1

[0.16.51] Stuttering after crafting electronic circuit

Posted: Tue Jan 22, 2019 10:24 pm
by GlowingOrb
Every 8-15 seconds factorio freezes for around 1 second. This happens irregardless of graphics setting, but strangely only after crafting the first electronic circuit

The attached zipfile contains 2 savefiles: One before crafting the circuit, one shortly after.
Also, it cotains 2 screenshots: One while not stuttering, one while stuttering and additionally the log-file.

As long as no circuit is crafted, everything is fine

edit: attachment was too big - uploaded to googledrive: https://drive.google.com/open?id=19p46f ... 8KQWHbDKMk

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Tue Jan 22, 2019 11:16 pm
by Rseding91
Thanks for the report. The debug time information says it spent half a second doing *something* outside of normal game logic during one of the recent game ticks.

It doesn't say what though - something we don't track because normally it never takes any amount of time. When I load the save myself it works perfectly fine - no stutter - so what ever is causing it is isolated to your system.

Do you have any 3rd party programs that might be hooking into the game?

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Tue Jan 22, 2019 11:24 pm
by GlowingOrb
The only idea would be steam overlay, but even disabling the overlay doesn't help much

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Tue Jan 22, 2019 11:30 pm
by Rseding91
GlowingOrb wrote: Tue Jan 22, 2019 11:24 pm The only idea would be steam overlay, but even disabling the overlay doesn't help much
Sorry, there's nothing else I can do. You'll need to experiment on your end to figure out what's interfering with the Factorio process.

You're the first person I've seen in my 4 years of working on Factorio have this issue.

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Tue Jan 22, 2019 11:36 pm
by GlowingOrb
I have just downloaded the non-steam version to check and it seems like it is actually caused by Factorios steam integration. Non-Steam version from factorio website does not have this issue

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Wed Jan 23, 2019 1:56 am
by Rseding91
GlowingOrb wrote: Tue Jan 22, 2019 11:36 pm I have just downloaded the non-steam version to check and it seems like it is actually caused by Factorios steam integration. Non-Steam version from factorio website does not have this issue
While possible, the current 0.16 "steam integration" doesn't execute any code when run in single player and only runs code on server creation if you enable "public" when you host a server. That wouldn't cause stuttering every X seconds since you can only host a server once and then it's hosted and if not hosting a server it doesn't even run steam code.

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Wed Jan 23, 2019 2:13 am
by Jap2.0
Rseding91 wrote: Wed Jan 23, 2019 1:56 am
GlowingOrb wrote: Tue Jan 22, 2019 11:36 pm I have just downloaded the non-steam version to check and it seems like it is actually caused by Factorios steam integration. Non-Steam version from factorio website does not have this issue
While possible, the current 0.16 "steam integration" doesn't execute any code when run in single player and only runs code on server creation if you enable "public" when you host a server. That wouldn't cause stuttering every X seconds since you can only host a server once and then it's hosted and if not hosting a server it doesn't even run steam code.
If sprites had to flip between RAM and VRAM, that would be every tick, correct?

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Wed Jan 23, 2019 2:34 am
by GlowingOrb
There must be some difference (e.g. Steam achievements ?)

I've now replace the executable in steamapps/common/factorio with the one from factorio website and it's also running fine when launching from steam (with steam overlay). So the only difference is the actual binary, while paths, config files, environment etc are all the same.

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Wed Jan 23, 2019 2:11 pm
by GrumpyJoe
couldn“t it just have been a corrupt installation and with reinstalling the non steam version, you "fixed" it?

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Wed Jan 23, 2019 10:15 pm
by GlowingOrb
GrumpyJoe wrote: Wed Jan 23, 2019 2:11 pm couldn“t it just have been a corrupt installation and with reinstalling the non steam version, you "fixed" it?
Very unlikely. I reinstalled the steam version several times before I created thispost (on different SSDs). To be sure, I've just renamed the exe and redownloaded via Steam - the stuttering is back. Once I replace the exe it's fixed again.

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Wed Jan 23, 2019 10:41 pm
by Rseding91
Are you using some beta version of steam? Or maybe a super outdated version of steam? Any steam 3rd party applications?

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Wed Jan 23, 2019 11:15 pm
by GlowingOrb
Nope, just the current non-beta steam client

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Sat Jan 26, 2019 12:12 am
by GlowingOrb
Ok, I fxed it. The issue was caused by steam itself - I noticed that some (but not all) other games had the same issue when started from steam. Opening steam with debug console opened showed that it would try to connect a controller every few seconds and fail which would cause the freeze.

The only strange thing is why this affected factorio only after crafting the circuit .

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Sat Jan 26, 2019 2:00 am
by Rseding91
GlowingOrb wrote: Sat Jan 26, 2019 12:12 am Ok, I fxed it. The issue was caused by steam itself - I noticed that some (but not all) other games had the same issue when started from steam. Opening steam with debug console opened showed that it would try to connect a controller every few seconds and fail which would cause the freeze.

The only strange thing is why this affected factorio only after crafting the circuit .
Is there a way I can reproduce the issue on my end? I don't see any option to enable steam controller support in the settings - just configure things about the controller.

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Sat Jan 26, 2019 3:05 am
by invisus
GlowingOrb wrote: Sat Jan 26, 2019 12:12 am Ok, I fxed it. The issue was caused by steam itself - I noticed that some (but not all) other games had the same issue when started from steam. Opening steam with debug console opened showed that it would try to connect a controller every few seconds and fail which would cause the freeze.

The only strange thing is why this affected factorio only after crafting the circuit .
I'm curious. You mention you fixed it, and describe the problem a bit more in detail... however, you don't actually explicitly state what you did or what you changed to fix this or prevent steam from attempting to connect to a seemingly nonexistent controller.

Re: [0.16.51] Stuttering after crafting electronic circuit

Posted: Sat Jan 26, 2019 8:20 pm
by GlowingOrb
I actually had one Blutooth 8bit Snes-like controller connected via usb for charging. Steam seemingly tried to connect to this controller via blutooth, even though the controller was'nt paired with my PC any more, which lead to the issue.

edit: seemingly, I'm not the only one where Steam is acting up in such a case:

https://steamcommunity.com/discussions/ ... 837148724/

edit2: It dind't seem to matter if the actual games supported controllers or not.
I had the issue with Factorio, Resident Evil 2 remake and Endless Space 2. No issues with Stellaris and Ring of Elysium