Data loss on close

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
kisolre
Posts: 3160
Joined: Wed Nov 21, 2018 1:13 pm

Data loss on close

Postby kisolre » Fri Feb 26, 2021 7:54 pm

Create an empty folder.
Create new FreeCAD file, draw something, write file in that folder.
Draw some more - file is modified.
Rename the folder.
Try to close the file - "Unsaved document" prompt pops up. Confirm save - Exception is thrown, file is closed, latest modifications are lost.

Code: Select all

22:47:54  <Exception> Failed to open file: FileRenameTest.FCStd.7c5fee36-959d-456d-bcdb-7d2ba8c254ad
OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24219 (Git)
Build type: Release
Branch: master
Hash: 8c26baebab320b8c1c3279bc8eb34a1eb6c7a363
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Bulgarian/Bulgaria (bg_BG)

I will probably not have Internet to continue the thread.
chrisb
Posts: 34448
Joined: Tue Mar 17, 2015 9:14 am

Re: Data loss on close

Postby chrisb » Fri Feb 26, 2021 11:05 pm

We have seen something similar with write protected files.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Posts: 3160
Joined: Wed Nov 21, 2018 1:13 pm

Re: Data loss on close

Postby kisolre » Sun Feb 28, 2021 6:30 am

chrisb wrote: Fri Feb 26, 2021 11:05 pm We have seen something similar with write protected files.
And this is clearly not expected behavior. FreeCAD should prompt to save to a new file name or issue a warning and not close the file, or anything that will not cause the user to loose his unsaved changes.
wmayer
Site Admin
Posts: 17301
Joined: Thu Feb 19, 2009 10:32 am

Re: Data loss on close

Postby wmayer » Sun Feb 28, 2021 7:16 am

The issue is related to issue #0004098