[0.8.x] Factorio hangs on load

This subforum contains all the issues which we already resolved.
SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

[0.8.x] Factorio hangs on load

Post by SilverWarior »

Hi guys!
Here is one probably quite rare ocuring bug but bug nonetheless. It probably won't be easy to track it down as it happens only under certain conditions. More detailed explanation of these conditions below.

If Factorio can't sucsessfully conect to server to check if there are any updates available (blocked by firewall or the internet conection goes down) it will cylce itself up in waiting for server reply and simply stays at loading screen with fully filed progressbar.
With the use of Process Explorer I have created memory Minidump. Check provided "Factorio MiniDump 1.dmp" to see at which status is Factorio at that time.
https://dl.dropboxusercontent.com/u/653 ... mp%201.dmp

So I then have to forcefully kill the Factorio as it can't be closed in normal ways (ALT+F4).
But here another bug presents. Factorio never gets completly killed. It seems that one thread, probably the one waiting for network reply doesn't get terminated. Check provided screenshot from Process Explorer "Factorio Threads Status.png"
https://dl.dropboxusercontent.com/u/653 ... Status.png
I have used Process Explorer again to create both Minidump and FullDump at this point. So check provided "Factorio MiniDump 2.dmp".
https://dl.dropboxusercontent.com/u/653 ... mp%202.dmp


So what are the conditions under which this bug apears:
1. There is available internet connection at application start
2. Internet connection gets terminated or blocked by firewall after the application has been started and before check for new updates.

On my computer this happens everytime I update Factorio to newer version. Why? I use Eset Smart Security which incroporates both AntiVirus software as Firewall in one. And one nice feature of this firewall is that it is able to recognize when there was any change made to the executable of a program which has been added to Firewall rule list.
In case of most other application Eset Smart Security reminds me that there has been a change made to such program and then asks me to confirm that this program can comunicates to the internet.
But for some reason when Factorio tries to connect to update server my Firewall doesn't registers this as an network comunication atemp but strictly folows existing rules. If thre is alowed rule for Factorio already made it alows it to comunicate through the network but if there is no rule for Factorio it blocks it straight away.
I use interactive mode on my Firewall so it asks me for any new connection atempt and Factorio is currently the only application which doesn't trigger the firewall to ask me for permisions to alow or deny network trafic for Factorio. I don't know why.

My system:
WIndows 7 64 bit
ESET Smart Security 5
Factorio installed on D:\Igre\Factorio so it is not afected by Windows UAC or DEP.
I use installer version of Factorio

If you need any more information please let me know and I'll try to provide it.

BTW Which aproach does Factorio use for comunicating with Update server?
This information would come in handy to me to figuure out why my Firewall doesn't request confirmation when Factorio tries to do network comunication with Update server.
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.8.x] Factorio hangs on load

Post by cube »

Hi, thanks for reporting this, these kinds of bugs are always hard to catch :-)
Anyway ... we have a suspicion what might be causing this (timeouts inside libCurl), but a little experiment on your machine would help.

Could you please try to reproduce the problem and then try to wait at least 5 minutes? My guess would be that the connection should time out (and show an error message).
I have no idea what I'm talking about.
SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: [0.8.x] Factorio hangs on load

Post by SilverWarior »

cube wrote:Hi, thanks for reporting this, these kinds of bugs are always hard to catch :-)
Anyway ... we have a suspicion what might be causing this (timeouts inside libCurl), but a little experiment on your machine would help.

Could you please try to reproduce the problem and then try to wait at least 5 minutes? My guess would be that the connection should time out (and show an error message).
OK I'll try that when you release 0.8.4 update or do you want me to do it sooner. This would require me to install older version and then update to newest one.
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: [0.8.x] Factorio hangs on load

Post by cube »

Ok, we're already releasing 0.8.4 ...
I have no idea what I'm talking about.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.8.x] Factorio hangs on load

Post by kovarex »

So we limited the timeout to 10 seconds, it should solve this bug (when updating from 0.8.4 to later versions), if not, please let us know.
SilverWarior
Filter Inserter
Filter Inserter
Posts: 559
Joined: Mon Mar 04, 2013 9:23 am
Contact:

Re: [0.8.x] Factorio hangs on load

Post by SilverWarior »

kovarex wrote:So we limited the timeout to 10 seconds, it should solve this bug (when updating from 0.8.4 to later versions), if not, please let us know.
That solved the bug. Thank you.

Now could you be please so king and help me figure out why my Firewall doesn't notify me when factiorio tries to comunicate through network but simply blocks it if the Factorio is not put into Firewall exception rule.
What I would need is more information about what type of connection Factorio uses when checking for updates. If you are reluctant to share this information publicly can you athleast send me this info vie PM.
I would realy like to get to bottom of this becouse it is quite posible that my firewall is not the only one which would block Factorio instantly. So in the end finding the reasons why might also help out others.

EDIT: I think I figured out why my Firewall doesn't warns me when Factorio tries to establish comunication with update server.
I have just used network packet monitoring software (Wireshark) and I see that Factorio first tries to ping the http://www.factorio.com as test to see if there is internet connection available and if that is sucsessfull it establish connection with update server.
Now by default my Firewall alows any application except to those who are on blocked list to initiate ping. So when Factorio tries to send ping to http://www.factorio.com it isn't blocked but when later it ries to connect to update server my Firewall treats this as unexpected network trafic and blocks it right away.
Now it seems that I'll have to contact Eset to see if they can change Firewall behavior so that it will notify me in such case. But first I have to create a test application to verify this behavior so that I can send it to them.
I'l try to keep you appriesed.

EDIT2: I managed to verify that if any application uses Windows ICMP system for sending Ping requests my Firewall won't block it.
But I havent managed to recreate the scenario when my test application won't cause for my Firewall to alert me on my test application trying to establish any internet connection. I have tried using four different network libraries and and my firewall managed to detect network comunication atempt from all of them. I even tried using diferent conection protocols TCP, UDP, FTP, SSL, etc.

@developers
I would be happy if you could build me a simple test application which uses same approach for network communication that is implemented in Factorio posibly using same network library Factrio uses so I can send this application to Eset so they can figure out why their firewall doesn't properly handle network communication atempt from it.
Having source code for it would also help
Post Reply

Return to “Resolved Problems and Bugs”