[0.14.8] Cryptic message while saving game

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
cheese-tv
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Sep 23, 2016 3:51 am
Contact:

[0.14.8] Cryptic message while saving game

Post by cheese-tv »

I get this message while trying to save the game:

Code: Select all

rename(p1, p2): invalid arguments: operation not permitted
Full file path is

Code: Select all

\\storage.cheesoft.ru\RedirectedUserProfileFolders$\Cheese\Application Data\Factorio\saves\2016-07-31-v0.13.13.zip
Attachments
save-dialog.gif
save-dialog.gif (3.79 MiB) Viewed 5871 times

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by Neemys »

The game was unable to rename the temporary zip it make while saving. Check that the folder is accessible and proper permission are assigned to the user launching factorio (read and write to the save folder).

It do that every time you save ?
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

cheese-tv
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Sep 23, 2016 3:51 am
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by cheese-tv »

Fixed it.
Yes, it was every time I save.
Looks strange, but windows reboot fixed it.

studmuffin
Inserter
Inserter
Posts: 44
Joined: Fri Apr 01, 2016 4:41 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by studmuffin »

I'll have to test a windows reboot as mentioned above. But at least wanted to show that I was getting the same message. Running factorio headless on windows 10, and playing on a different port. I was the only one on the server getting this message. Looking at the log file, it looked like it was having trouble saving, but when I would check the save folder, all the autosaves were there. Force closing the server would also give the same weird save path, but then it would print another line the console with the correct path stating it saved correctly. These would both happen every autosave. Saving from the client did not produce this error.

I'm running 0.14.10
player(p1,p2) error message
player(p1,p2) error message
1.png (85.28 KiB) Viewed 5790 times
weird save path
weird save path
2.png (7.21 KiB) Viewed 5790 times
Attachments
factorio-previous.log
log file from who knows how many hours of play time...
(3.63 MiB) Downloaded 93 times

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by Neemys »

This save process, from what I guess, is : Factorio when saving, create a new file named name.tmp.zip. When saving is done it remove name.zip then rename name.tmp.zip to name.zip.

Your problem seem to be in the rename process, either it fail because of a lack of permission, harddrive not ready, maybe factorio was unable to delete the old save so that's why he is unable to move the new one or another reason

- To check if it is an inability to delete the old save, try saving with a new name not already used. (if factorio failed to save an autosave the last one migth be still here so checking the folder show nothing)
- Check folder permission in windows for your account.
- Check that the harddrive is accessible at the time of saving (refresh (F5) save folder in explorer for example).

If the three above wasn't the cause of the problem. I think you should fill a bug report, devs know better than me how save is done and maybe they can do something about that.


The OP problem was surely the harddrive not accessible as it was a network drive and not a physical one on the machine and those drive are not 100% accessible. But you, it's on your machine so I doubt it.
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

studmuffin
Inserter
Inserter
Posts: 44
Joined: Fri Apr 01, 2016 4:41 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by studmuffin »

Neemys wrote:The OP problem was surely the harddrive not accessible as it was a network drive and not a physical one on the machine and those drive are not 100% accessible. But you, it's on your machine so I doubt it.
You are correct that it is on the same machine so it shouldn't be an accessibility problem. The server saves are in subdirectories to the parent my local saves go.

Code: Select all

%appdata%/Factorio/saves/_local_save.zip
%appdata%/Factorio/server1/saves/_server_save.zip
I did realize though (now that you mention it), my local save folder did not hold any autosaves from the time I was on the server. Playing after a reboot, the message stopped appearing and the folder did hold autosaves. Strange behavior, but a reboot seemed to fix whatever issue it was having with saves. It is likely, since the server is running from the same game files as my playable client, that factorio had some issue with accessing folders when the server started, so even when I would restart my client, factorio was still technically running, and it wasn't able to reset.

if it happens again, i'll log more information and report it where ever if may fit best.

thank you for the reply Neemys!

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by Neemys »

Has far as I know server's autosave should happen in the save folder configured with factorio (the one you should see when saving/loading in single player).

The server was running on your machine ? In the same folder save folder as a client ? if yes that's the reason why you have problem. Avoid a client and server in the same save folder. If that's the case, this is a bug to report as the game should report the save as not writable and not that cryptic message. I will do some test later and fill that bug report.
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

renhanxue
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Oct 08, 2016 10:03 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by renhanxue »

I get this message a lot running ordinary single player. 0.14.3, Windows 7 x64. I don't get it all the time and it's a different autosave zip (1, 2, 3) every time. My gut feeling immediately says "race condition" and thus annoying to debug, but if there's anything I can do to help find the issue I'd be glad to help. Below is a log file from a long playing session (note that I go AFK while paused occasionally) so you can get an idea of roughly how frequent it is.

Code: Select all

1072.863 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
1072.869 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
3179.232 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave2.zip failed; previous version (if any) should still be available
3179.234 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
3576.564 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave2.zip failed; previous version (if any) should still be available
3576.566 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
4919.494 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave2.zip failed; previous version (if any) should still be available
4919.496 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
6415.902 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave2.zip failed; previous version (if any) should still be available
6415.904 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
7330.198 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave3.zip failed; previous version (if any) should still be available
7330.200 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
7701.345 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave3.zip failed; previous version (if any) should still be available
7701.347 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
7823.104 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
7823.106 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
8554.027 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
8554.029 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
8919.351 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
8919.353 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
9681.855 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
9681.857 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
16338.863 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
16338.865 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
16460.641 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave2.zip failed; previous version (if any) should still be available
16460.643 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
16642.250 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave3.zip failed; previous version (if any) should still be available
16642.252 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
16764.009 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
16764.011 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
23763.796 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
23763.798 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
24650.052 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave2.zip failed; previous version (if any) should still be available
24650.054 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
25901.397 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave3.zip failed; previous version (if any) should still be available
25901.399 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
28223.220 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave3.zip failed; previous version (if any) should still be available
28223.222 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
29384.413 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave3.zip failed; previous version (if any) should still be available
29384.415 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
30904.116 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave1.zip failed; previous version (if any) should still be available
30904.118 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted
33286.141 Warning WriteFileGuard.cpp:25: Writing C:\Users\<redacted>\AppData\Roaming\Factorio\saves\_autosave3.zip failed; previous version (if any) should still be available
33286.143 Error ParallelScenarioSaver.cpp:82: Saving scenario failed: rename(p1, p2): invalid arguments: operation not permitted

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by Neemys »

From the log you provided, seem like it does not happen everytime. As far as I know there should not be a race condition if you are playing single player and no other instance of factorio are running (check the task manager). But yes maybe another software is locking the file. The problem is the message in logs does not tell why it couldn't save.

Even while playing single player you don't have a factorio server running on the same machine ?

Does it still happen after a computer reboot ? Or after this reboot no problem but after a while it happen again ?

If you see again this message, try to deactivate your anti virus to see if it is not him that lock the file. Do the same with other active protection you have (if you have).

Try launching the game as admin and see if it happen again.

Do you still have enough space in your C hardrive ?
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

renhanxue
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Oct 08, 2016 10:03 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by renhanxue »

It does not happen every time it autosaves, no (as I said). Occasionally, but frequently enough to be mildly annoying. It's been happening for a while, at least since I returned to the game for 0.14 (I think last time I played was 0.10 or 0.11 and I can't remember if I had the same problem back then).

No other Factorio instances, have never played multiplayer. No antivirus, MSE is turned off. About 110 GB space left on C:\ (Samsung EVO SSD). You did give me an idea though; I've disabled CrashPlan (backup service) temporarily and will see if that changes anything. I'll be back.

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by Neemys »

If it happen again, try searching for a program that lock the file for the autosave it has not been able to save, see here for a way to see who is locking a file. Process Explorer is a microsoft program so no harm to your computer ;)

If nothing is locking the save, the last thing I will do is clean reinstall the game to be sure that left over from previous version don't cause the problem. (backup what you want to keep, delete the game, delete the factorio folder in appdata, run the game and see if it happen again)

Maybe try switching where factorio save see viewtopic.php?p=210026#p210026 to change it. You can try to verify the disk using windows tool to check for bad sector.

After that, I can't help you.
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

renhanxue
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Oct 08, 2016 10:03 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by renhanxue »

Yeah, it's CrashPlan allright. Was finally fast enough in ProcExp to actually catch it red handed. I've told it to ignore the autosaves so hopefully the problem goes away now.

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by Neemys »

Good to know it's fixed now ;)

But having

Code: Select all

 rename(p1, p2): invalid arguments: operation not permitted
as an error message is not really helpful. I wonder if devs could distinguish multiple cause for a save to bug. Like displaying multiple error message like "file locked" (your case), directory not accessible (OP case), or whatever else reason. I will try to add a suggestion later.

Edit : looks like there is indeed different message. Seem like the OP problem wasn't related to network drive disconnected as when I try it, the game freeze and must be manually terminated (when all write path are in network drive) or the game display a message telling it couldn't write if only the save folder is disconnected. When I change permission to block factorio overwrite on a save, the game told me no permission. So Looks like this message only happen when the file is locked by another program.
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by posila »

I agree the message is not helpful at all, sadly that is what we get from the filesystem library. Before we try to do platform-specific solutions, I'll try to do small workaround and enhance logging in this section of our code.

Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Re: [0.14.8] Cryptic message while saving game

Post by Neemys »

Thanks !
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !

Post Reply

Return to “Technical Help”