View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002666||FreeCAD||Bug||public||2016-08-09 14:14||2016-08-12 11:35|
|Platform||MS Windows||OS||7||OS Version||64 bit Windows 7|
|Fixed in Version||0.17|
|Summary||0002666: Error on Save File|
|Description||When select save file it comes up with an error message saying it can not save the file.|
This happens about 75% of the times, the other 25% it will save the file without error.
|Steps To Reproduce||Start FreeCAD, create a simple model, click save command. Then it will either save the file or come back with the error message that it can not save.|
|Tags||No tags attached.|
See also: http://forum.freecadweb.org/viewtopic.php?f=3&t=16859&p=133249&hilit=directaccess#p133249
No idea how it happens that the write operation fails but it must be a problem in the OCC library which we have no control over.
As workaround try this:
> In order to activate this go to the parameter editor and create under "BaseApp/Preferences/Mod/Part/General" the boolean key "DirectAccess" and set it to true.
Thank you for your reply. I have tried what you suggested but it has not worked. I still get the save error more often than not.
I would like to ask about FreeCAD save file structure. When I save a model file in a folder it saves what I would call a normal file and a backup copy, but it also saves strange very long files with random letters and numbers. What are these files and what is the BRep file 'C:/Users/cadman/AppData/Local/Temp/FCTD6AE.tmp' which it can not save?
I have attached a Screen Shot of the files in my save folder.
> Thank you for your reply. I have tried what you suggested but it has not worked. I still get the save error more often than not.
Then you didn't set the key on the right place because otherwise it doesn't print any errors at all.
This is the part of the source code where to write the brep files:
In case DirectAccess is set correctly this part is getting executed: https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Part/App/PropertyTopoShape.cpp#L336
The save strategy works this way:
* If you already saved a project, it first creates a new file with a GUID as suffix. This is because if we overwrote the file directly it may happen that it fails and then you would lose all your data.
* If the save succeeds we rename the old project file with a number e.g. FCStd1 if backup files are enabled or delete it if not
* then the file above with the GUID is renamed to the original file
If the files with the GUID can't be renamed then there must be another process accessing the original file.
But all this has nothing to do with the failure to save the brep files.
When saving a brep file there are two possible ways:
1. make a tmp. file, open the file and copy its contents into the project file (which is a normal zip file)
2. write it directly to the zip file (see DirectAccess)
By default we use the method 1.) because if the OCC library is build with a different compiler version than FreeCAD then method 2.) will crash (this is caused by a binary incompatibility of C++ streams and is not fixable).
Thank you for your reply.
I have just checked and I did not set the key "DirectAccess" in the right place.
I have now set it in the correct place and the Save command works O.K. now.
Thank you very much for your help.
No idea why method 1.) fails that often. There are actually only two kind of users: those for which it happens all the time and those for which it never happens. Not sure if this could be related to the hard disk or some system limitations.
The relevant part of the OCC lib is this and since the files are empty it must already fail when trying to open them.
Anyway, I will now make method 2.) the default because nowadays the possible binary incompatibility of the C++ streams is not such a big issue any more since for Windows we offer the libpacks where everything is built with the same compiler and on Linux it's not a problem anyway when using the packages from the repositories.
|2016-08-09 14:14||paulcquinn||New Issue|
|2016-08-09 14:14||paulcquinn||File Added: FreeCAD Error 02.jpg|
|2016-08-11 10:49||wmayer||Note Added: 0007259|
|2016-08-11 13:48||paulcquinn||File Added: FreeCAD Saved Files 02.jpg|
|2016-08-11 14:01||paulcquinn||Note Added: 0007260|
|2016-08-11 17:19||wmayer||Note Added: 0007263|
|2016-08-11 20:37||paulcquinn||Note Added: 0007264|
|2016-08-11 21:05||paulcquinn||Note Edited: 0007264||View Revisions|
|2016-08-12 08:21||wmayer||Note Added: 0007265|
|2016-08-12 11:34||wmayer||Changeset attached||=> FreeCAD Master master 006de1ab|
|2016-08-12 11:35||wmayer||Relationship added||duplicate of 0002245|
|2016-08-12 11:35||wmayer||Status||new => closed|
|2016-08-12 11:35||wmayer||Resolution||open => fixed|
|2016-08-12 11:35||wmayer||Fixed in Version||=> 0.17|