Saves failing

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
plgarcia
Posts: 288
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Saves failing

Postby plgarcia » Tue Nov 28, 2017 12:26 pm

Since the 29th of September some saves do not work.
I did not determine the conditions leading to this.
Since that date, I use spreadsheets, and compounds. I have at this stage no idea if there is a correlation to that proble I never encountered before.

The symptom is that there is a message saying that FreeCad has not been able to rename file, and there is an extra-extension left in the folder. Eexample: gear.FCStd.f71adee0-b838-4c18-a299-cc0ff0b9c028.

Of course this is to be solved I think, but I realize this post is not precise enough, and I will add more information as soon as I encounter again the problem.

But when such an error occurs, a message box should be raised, because the user may not notice the message appears in the console, and then think his lasts changes are lost when reloading the file from the history list. That is what happened to me. When renamed the file saved works perfectly.
Second the document should not be considered as saved by FreeCAD allowing then to close FreeCAD with no action of the user and letting him uninformed of the situation.


OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12619 (Git)
Build type: Release
Branch: master
Hash: b3631e134be8bfade0534f2dc0ee668ae71a223f
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: French/France (fr_FR)
triplus
Posts: 8849
Joined: Mon Dec 12, 2011 4:45 pm

Re: Saves failing

Postby triplus » Tue Nov 28, 2017 3:10 pm

Hi @plgarcia.

Ideally you will able to reproduce the issue consistently at some point. That would help considerably.
plgarcia
Posts: 288
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: Saves failing

Postby plgarcia » Tue Nov 28, 2017 4:38 pm

As I said I will provide more information I soon as I can, it means as soon as the problem occurs again, and I realize the problem has occured. As it is quite silent it is when I reopen the document I realize last changes are not included.

May be should I always launch Freecad with logs!
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Saves failing

Postby GeneFC » Tue Nov 28, 2017 7:48 pm

This sounds like a typical Windows 7 problem.

Are you storing the .FCStd files in the "Program Files" directory? Windows sometimes decides that writing is not allowed in that directory.

The warning inside FreeCAD is a good idea.

Gene
plgarcia
Posts: 288
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: Saves failing

Postby plgarcia » Tue Nov 28, 2017 8:57 pm

Not at all, always the same for years now, and for 1,5 yers on this PC.
A completely different folder. But this never happenned before, and it happenned 25 times since the 29th of October.

As I added the parameer to get logs, I Hope I will have information in the logs next time.
User avatar
DeepSOIC
Posts: 7214
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Saves failing

Postby DeepSOIC » Tue Nov 28, 2017 9:35 pm

Hi! Just in case it helps.
When FreeCAD saves a file, it does:
1. write a new file with a salt appended to project's file name
2. if 1 was successful, delete the old file (or rename it to become a backup),
3. rename the new file to original file name.
This is done to avoid leaving you with a broken (half-empty) file if saving of the project fails.

It looks like in your case, FreeCAD actually fails to delete the old file, but doesn't notice it, and then reports that the renaming failed... But that's just a guess...
plgarcia
Posts: 288
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: Saves failing

Postby plgarcia » Tue Nov 28, 2017 10:57 pm

Yes that's what I do now I know. Thanks for the advice.

The idea here is:
First to identify the cause and fix the software.
Second change the code to make clear to the user a problem occured.
plgarcia
Posts: 288
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: Saves failing

Postby plgarcia » Wed Nov 29, 2017 10:51 am

Yes I have it!
I quite recently use the revert function, instead of closing FreeCAD and reloading when I encounter a problem.
So I created a new document adding 2 parts, saving it, revert, adding a new part, saving again, revert again. At this stage everything is OK.
Adding a new part again and saving and the problems appears.

I Think the problem is linked to the revert function.
Capture200.JPG
Capture200.JPG (221.8 KiB) Viewed 689 times
The log does not show much more!
Attachments
FreeCAD.log
(17.26 KiB) Downloaded 28 times
User avatar
DeepSOIC
Posts: 7214
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Saves failing

Postby DeepSOIC » Wed Nov 29, 2017 11:08 am

google drive might be interfering (e.g. it's busy uploading a file to the cloud while freecad attempts to rename it). Can you reproduce the problem in a location not affected by all that sync stuff?
plgarcia
Posts: 288
Joined: Wed Jun 17, 2015 9:47 pm
Location: Near Paris (France)

Re: Saves failing

Postby plgarcia » Wed Nov 29, 2017 12:40 pm

You are right.
I made the same test on the desktop and no problem.
Rerun a test on googledrive again. A simpler test:
save, add an part, save, add a part save, ... and fails.

So the problem may be induced by an recent change in googledrive!

In googleDrive there is an option :
"Warn when deleting an element from shared folder". (Translation from French)
I deactivate this option and the problem seems to disappear.
Then a GoogleDrive issue.
Anyway. A problem when saving should be reported in a way more visible to the user so he knows he has something to do. (unprotect the meia, save elsewhere, ...)

Sorry I did not thing GoogleDrive could be the reason of the problem.
Thank you
Last edited by plgarcia on Wed Nov 29, 2017 1:07 pm, edited 1 time in total.