octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #62271] GUI crashes and clears function files


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #62271] GUI crashes and clears function files on closing (Windows)
Date: Mon, 2 May 2022 12:40:30 -0400 (EDT)

Follow-up Comment #11, bug #62271 (project octave):

whether or not there's a temp version depends on quite a few unknowns.  You
say windows was updating.  That may or may not matter. did anything else on
the system crash? or just the Octave GUI after the save?

looking at the patch made with the intention of preventing some of these data
loss events: http://hg.savannah.gnu.org/hgweb/octave/rev/2dc31151ca27

the file save method changed from a 'Qfile file' event (just blindly write the
file over the old one) to a QSaveFile event, which is supposed to save in
intermediate steps with a temporary file and checks, and to report an error
without overwriting if the intermediate steps failed for some reason. 

QSaveFile creates a temporary file and then executes a file.commit() to copy
the temp file over the active file. the update_window_title event appears to
happen after the file.commit. If you saw that tab name change, and if there
were no messages before the commit, then it would seem it thinks the save did
happen correctly before the crash. If so, the commit includes removing the
temporary file, and I'm not sure why you wound up with a 0 byte empty file.

If it changed the title, then also I'm guessing this was a new file and the
'previous version' would have been an empty file if that had ever actually
been saved? You said it's local, but are you saving to a Google Drive or One
Drive synced location? (trying to think of things other than the save process
that can cause odd file-version problems)

@ttl can confirm, but I believe for the released v7.1.0, the GUI uses your
system's temporary folder for all temporary files (assuming the tempfile isn't
just created right next to the one to save with a unique temp-name)

In octave what do you get for:
>> getenv('temp')

without diving further into how QSafefile works that would be the first place
I'd peek for an existing temporary file that might not have been cleared.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62271>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]