Page 1 of 1

"Error when writing to file." when launching game [Solved]

Posted: Mon Oct 31, 2016 4:28 pm
by saneman
I had downloaded the zip, unzipped it onto my computer, and then ran it and created a world all in the same day. I come back today and when I launch factorio, it gets about to 50% and then says "Error when writing to file.". Can anyone tell me how to fix this.

Re: "Error when writing to file." when launching game

Posted: Mon Oct 31, 2016 4:43 pm
by daniel34
In which folder did you unzip it and is that the whole error message?
You can try launching it as administrator, but that would just be a workaround.

Please also post a Log File.

Re: "Error when writing to file." when launching game

Posted: Mon Oct 31, 2016 5:04 pm
by saneman
I uploaded log file, and yes this is the entire message. in the window title it just says "Error".
I unzipped it to X:

Re: "Error when writing to file." when launching game

Posted: Mon Oct 31, 2016 10:27 pm
by daniel34
Factorio takes a very long time to load, what are your system specs and what kind of drive is X? Factorio should be unzipped to a local HDD/SSD, or maybe an usb flash disk. Running it over a network drive can take a long time to load and can cause permission problems if it's setup wrong. Factorio needs write access to the directory.

It also shows errors when installing audio, not sure what that's about. Do you also have problems with sound in other programs/games?

Re: "Error when writing to file." when launching game

Posted: Tue Nov 01, 2016 2:30 pm
by saneman
The first time i unzipped factorio, i ran it and it opened in about a minute. When I came and tried to play it again after the next couple days, it was this slow and showed that error. the X: is an old 80gb disk drive. I have made all the folders in the factorio folder not read only in the properties of the factorio folder. the error still happens.

The processor is intel core i5-2520m
the ram is 4.00 GB
the system is 64 bit

Re: "Error when writing to file." when launching game

Posted: Tue Nov 01, 2016 7:36 pm
by saneman
Even running as administrator, or changing all files and folders to be under full control for my account, it still has this error.
Also, I do not have problems with audio in other games.

I tried deleting the whole thing (i backed up my save file) and then downloaded the thing again and unzipped it again. And after i redid that, i put all permissions to full control for my account again and it doesnt work. Was there a file that factorio put somewhere that blocked it? because i really was able to play the game when i first initially unzipped it. I can upload the save file i have if you need.

Re: "Error when writing to file." when launching game

Posted: Tue Nov 01, 2016 7:42 pm
by saneman
I attached the new factorio log and it looks like the audio isnt a problem anymore maybe from the permissions but i still get the error

Re: "Error when writing to file." when launching game

Posted: Tue Nov 01, 2016 8:44 pm
by DaveMcW
saneman wrote:the X: is an old 80gb disk drive.
Do you have any other drives you can test it on? Sounds like it might be a failing hard drive.

Re: "Error when writing to file." when launching game

Posted: Tue Nov 01, 2016 11:48 pm
by posila
Does "X:/Factorio_0.13.20/crop-cache.dat" exist? If so, make sure it is not read-only. Maybe delete it entirely.
Same for "player-data.json", "achievements.dat" and "X:/Factorio_0.13.20/config/config.ini". Those are files it might attempt to write into after start.

Re: "Error when writing to file." when launching game

Posted: Wed Nov 02, 2016 3:30 pm
by saneman
I am able to play again for now atleast, created a map and everything and ran it a couple times.

What I did:
1. delete all of factorio
2. restart computer
3. re-download, re-unzip to same place but instead i put the .13.20 folder inside a folder named "Factorio"
4. ran the game and it worked fine.

I posted log to see if you can find where it was fixed.