Octave (GUI): after Windows-10 standby + wake-up, saving an open m-file changes name to \<unnamed\> and loses its file connection

0

Octave 6.1.0 (GUI)

I had a data loss that was caused by this. But knowing about it now, it will not happen to me again:

After saving the active Octave file, leaving Octave editor and the file opened, then standby and wake-up, the file in the Octave editor window shows up normally on screen with all of its content:

enter image description here

If you now just save again, you can already see that the file will be renamed to "<unnamed>". Here I got a question when I wanted to close another test file that was named test2.m right before saving it:

enter image description here

You can work on it, execute selections. But saving warns that the file is not available ("<unbenannt>" = "<unnamed>"), and the file changes its symbol to the symbol that you always see when a file is not saved: a rounded arrow.

enter image description here

In my real life case, I did not secure the file content by copying it. Instead, I closed it, expecting a question asking me where to save it. But that question only pops up if you have already changed a little thing in the meantime. If you did not change anything after wake-up, just saved again, and then closed, it then is just closed without such a question. By this, I had not just lost the tiny last change that I had made after the latest saving, but the file had 0 KB and no content: the latest damaged saving had overwritten the original file, even though I could still see its content in the editor.

Here is a test case, checking whether this is reproducible: the file still shows up, here with 1 KB size:

enter image description here

If you open it in the Windows editor:

enter image description here

If you open it with a double-click, opening Octave:

The file xyz.m does not exist. Should it be created?

enter image description here

I checked this with a "test2.m" again, then I even got a general Octave error when trying to open the file:

The file or the directory is damaged or not readable. Run the debug program CHKDSK.

enter image description here

And now I did not even get out of it without force-closing everything in the task manager (and even that did not seem to suppress the error message that popped up again at every step you did; when I did something else outside task manager and Octave to prepare a shutdown, I could finally stop the message box from popping up again.

enter image description here

If you want to delete such a file:

1 cancelled process

Due to an unexpected error the file cannot be deleted. If the error continues you can search for it using the error code in the help files.

Error 0x80070570: the file or the directory is damaged and not readable.

enter image description here

The examples are reproducible. The files have between 0 and 1 KB size, I have marked the damaged ones after my work session as an example:

enter image description here

Wrapping up:

The typical Windows editor does not even need any saving before standby and it never loses connection to the file source. This seems to be an Octave problem only.

The risk of a loss is not that high since I would see the problem by the message asking where the file is. And few people will be in such a haste like me and just close the file that they have worked on for hours in such a moment. ;)

Losing Octave file content can be avoided by saving properly to a new file, or by copying its content to a new file. Then you need to restart the computer, else you cannot delete the damaged files (which is likely needed in Octave, since the functions have to be saved in separate files of the same function name).

I have not tried recovering raw file structures from the folder, but I guess you would also get back your code if you invested more time.


The question:

How can you use standby + wake up and go on without this lost file contact of the active Octave editor window's file?

windows-10
file-management
standby
octave
data-loss-prevention
asked on Super User Jan 4, 2021 by questionto42 • edited Jan 11, 2021 by questionto42

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0