Personal tools
You are here: Home Forum Use Very often can´t save or export files in Windows

Very often can´t save or export files in Windows

Up to Use

Very often can´t save or export files in Windows

Posted by Sergio Pluchinsky at June 03. 2019

Hi, this is something that is happening since Salome 8.2 and now with 9.3 in Windows 8/10 version (and three different computers), very often I cannot save .hdf files in any folder, the same for exporting to .step or .stl (luckily .unv meshes have no issues)

The error message are:

----------------------------------------------------------------

Can't save file "C:/zTemp/test.hdf".

Possible reasons:

— permission denied;

— unsuff‌icient disk space;

—  application error.

Try to use another file name.

----------------------------------------------------------------

 

I have tried:

Running Salome as admin

Changing the folder

Using folder whit no spaces or special character in name

Verified that I have more than 200 Gb of space

Sometimes, it allow to save the file, so I do it, work a litle, save again, again... and in one moment it tells me the same, that I can't save the file...that was saved before without problems.

 

Best regards

 

 

 

Attachments

Re: Very often can´t save or export files in Windows

Posted by Nabil Ghodbane at June 03. 2019

Hi,

I didn't manage to reproduce the reported issue .

If the issue occurs again with the latest release, you could dump the study as  a python script and send it.

Thanks. 

Re: Very often can´t save or export files in Windows

Posted by Sergio Pluchinsky at June 04. 2019

Thanks for the supports. Today I have the same issue, a file that was saved yesterday as Study2.hdf, today was not possible to save again, but after changing the name was able. Sometimes even changing the name or folder can be saved.

Attached:

Study2.hdf (original file, can't be saved)

Study3.hdf (as saved)

Study2.py (dump of Study2.hdf)

 

I'm using Salome 9.3 on Windows 8, but again this issues happen also in Windows 10 or old Salome 8.2

Attachments

Re: Very often can´t save or export files in Windows

Posted by Nabil Ghodbane at June 05. 2019

Thanks for sending the material. We could  reproduce the issue, even if the SALOME_TMP_DIR is consistently set.

We raised the issue to our development team and will get back to you soon.

Re: Very often can´t save or export files in Windows

Posted by Sergio Pluchinsky at June 05. 2019

Thanks for your support!. I'm having this issue since last year or more, is very frustrating not being able to save the model, and it happens on different computers with different Windows and Salome versions.

Regards

Re: Very often can´t save or export files in Windows

Posted by Nabil Ghodbane at June 07. 2019

Hi Sergio,

Study2.hdf is in READONLY mode. Was this done on purpose?

thanks,

Re: Very often can´t save or export files in Windows

Posted by Sergio Pluchinsky at June 07. 2019

Nabil, the file was created, and then saved, one or two times. After that I was unable to save it again. Have made no changes in the readonly state by myself in any moment, but this could be a workaround, changing it's state with the file explorer in cases it refuse to save it. Will try it as soon as it happen again.

Thanks

Re: Very often can´t save or export files in Windows

Posted by Sergio Pluchinsky at June 11. 2019

Can confirm that the readonly state changes (sometimes) during use of the file, and that causes that can't be saved. Whit the file opened, changing the status with the file explorer allow then to be saved.

 

Re: Very often can´t save or export files in Windows

Posted by spam killer at December 20. 2019

"We raised the issue to our development team and will get back to you soon."

Is there any progress regarding this issue? Is there a public accessible bug tracker or issue database available, where I can track this issue?

Today I installed Salome 9.4.0 and get the same error when I tried to save my study a second time.

Re: Very often can´t save or export files in Windows

Posted by Christophe Bourcier at December 20. 2019

Well, the issue has been invastigated but it has not been fixed. It seems to be related to a bug in Windows. Some other people are having similar issues with folders.

The hdf file is well written in the TMP sub-directory of SALOME, but it cannot be moved to the user's location since the file has became read-only (for an unknown reason).

We'll try to find a workaround, for instance, setting write access before saving the file:

attrib -r -s drive:\<path>\filename


Re: Very often can´t save or export files in Windows

Posted by spam killer at January 02. 2020

I investigated the issue myself. When I save the salome study, these things happen:

1) Salome_Session_Server.exe creates a temporary folder in "C:\users\<username>\AppData\Roaming", e.g. "76401" (folder name seems to be random)

2) Salome_Session_Server.exe writes somes files to this folder. At last the studyl file (*.hdf) is written. 

The Study file is created with "CreateFile" with dwFlagsAndAttributes's FILE_ATTRIBUTE_READONLY bit set to 1. So the hdf file becomes created readonly.

3) Later on the temporary HDF file is moved to the users location:

C:\WINDOWS\system32\cmd.exe /c move /Y "C:\Users\HarryP\AppData\Roaming\76401\Study1.hdf

 

" "P:/whereever/" 2>NUL

This works only the first time because the readonly flag is not removed after moving the study. When I save the study a second time, the move fails:  the existing old study P:/whereever/Study1.hdf" has still the readonly flag set.

--

@salome programmers: Pleaaaaase fix this..

--

BTW: folders has no "read only" flag. The read only checkbox in explorer properties belongs to files in this folder only. Normally there you see a black filled rectangle in this checkbox, which means "I don't know if there are file in this folder with the readonly flag set, because I didn't inspect".

 

Previously Christophe Bourcier wrote:

Well, the issue has been invastigated but it has not been fixed. It seems to be related to a bug in Windows. Some other people are having similar issues with folders.

The hdf file is well written in the TMP sub-directory of SALOME, but it cannot be moved to the user's location since the file has became read-only (for an unknown reason).

We'll try to find a workaround, for instance, setting write access before saving the file:

attrib -r -s drive:\<path>\filename

 

Re: Very often can´t save or export files in Windows

Posted by spam killer at January 02. 2020

I appended a log file from sysinternals Process Monitor if this helps.

There are two "CreateFile" calls I think from the HDF5 Library:

--- snip ---

15:04:20,7032111 SALOME_Session_Server.exe 11868 CreateFile C:\Users\HarryP\AppData\Roaming\5012\test1.hdf NAME NOT FOUND Desired Access: Generic Read/Write, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a

15:04:20,7033201 SALOME_Session_Server.exe 11868 CreateFile C:\Users\HarryP\AppData\Roaming\5012\test1.hdf SUCCESS Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: R, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created

--- snap ---
 
The first call one is Disposition=Open and seems to "test" something (existing file, already opened by someone else, locking, whatever). It returns NO_SUCCESS (the temporary file does not exists and cannot be opened).
 
The second one is Disposition=OverwriteIf and create the file with "Attributes: R"!
 
Attachments

Re: Very often can´t save or export files in Windows

Posted by spam killer at January 02. 2020

edit: 

The first call one is Disposition=Open and seems to "test" something (existing file, already opened by someone else, locking, whatever). It returns NAME_NOT_FOUND (the temporary file does not exists and cannot be opened).

 

 

Re: Very often can´t save or export files in Windows

Posted by Christophe Bourcier at January 06. 2020

Hi,

I don't reproduce this problem since the upgrade of Windows 10 from version 1709 to version 1809.

It works now in Salome 9.3.0 and 9.4.0 whereas I reproduced the issue on the same computer before the Windows upgrade.

Can you tell which version of Windows has your computer?

Christophe

Re: Very often can´t save or export files in Windows

Posted by spam killer at January 08. 2020

My windows version is "Windows 10 Version 1903 (OS Build 18362.535)"

Re: Very often can´t save or export files in Windows

Posted by Christophe Bourcier at January 13. 2020

Hi,

I confirm I reproduce the issue on version 1903 again.

Version 1809:

"08:46:18,3884085","SALOME_Session_Server.exe","560","CreateFile","C:\Users\tof\AppData\Roaming\55768\Study2.hdf","NAME NOT FOUND","Desired Access: Generic Read/Write, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a"

"08:46:18,3887333","SALOME_Session_Server.exe","560","CreateFile","C:\Users\tof\AppData\Roaming\55768\Study2.hdf","SUCCESS","Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created"

Version 1903:

"08:28:21,6160880","SALOME_Session_Server.exe","6020","CreateFile","C:\Users\tof\AppData\Roaming\45045\Study2.hdf","NAME NOT FOUND","Desired Access: Generic Read/Write, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a"

"08:28:21,6164007","SALOME_Session_Server.exe","6020","CreateFile","C:\Users\tof\AppData\Roaming\45045\Study2.hdf","SUCCESS","Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: R, ShareMode: Read, Write, AllocationSize: 0, OpenResult: Created"

Tested with the same Salome binaries.

I tried to change SALOME_TMP_DIR from %appdata% to C:\TEMP (in salome file in the top directory) but the error remains in another folder than AppData.

Re: Very often can´t save or export files in Windows

Posted by Christophe Bourcier at January 14. 2020

In Windows 10, version 1903, the problem is also related to hdf version.

In the h5py test in attachment, I create a hdf file (similarly to H5Fcreate in C in Salome Save hdf).

If we install h5py with pip:

call env_launch.sh

python -m pip install h5py

hdf5 1.10.5 is used and the file is created user writeable.

python test_h5.py
1.10.5
C:\Users\tof\AppData\Roaming\test.hdf
is user writeable

If we install h5py from h5py sources:

call env_launch.sh

cd h5py-2.10.0

python setup.py install

hdf5 1.10.3 is used and the file is created not user-writeable.

python test_h5.py
1.10.3
C:\Users\tof\AppData\Roaming\test.hdf
is not user writeable

hdf5-1.10.5 will be used for next Salome version (9.5.0 planned in May 2020), so the problem should be resolved.

Attachments

Re: Very often can´t save or export files in Windows

Posted by spam killer at January 14. 2020

This are good news. Thank you.

Powered by Ploneboard
Document Actions