Skip to content

Complete data loss after SIGSEGV - overwritten recovery file #18044

Open
@axxel

Description

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

After hours of work on a pretty simple model with the 1.0 release on Linux, FC crashed with a SIGSEGV. That happened before and I thought I might have lost a couple of minutes since my last save. Restarting FC gave the following on the console:

FreeCAD 1.0.0, Libs: 1.0.0R39109 (Git)
(C) 2001-2024 FreeCAD contributors
FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.

Ignore recovery file  "/home/axel/.cache/FreeCAD/Cache/FreeCAD_Doc_5b799e8d-5c96-4109-9b9d-7b1098506e98_9ed579_617729/fc_recovery_file.fcstd"  because it is older than the project file "/home/axel/Downloads/DieFr\xC3\xA4se.FCStd" 

Fatal Error at file /home/axel/Downloads/DieFräse.FCStd, line 155, char 27
Invalid Document.xml: unexpected end of input
Fatal Error at file GuiDocument.xml, line 1, char 1
Exception message is: 
invalid document structure
Reading failed from embedded file: GuiDocument.xml (0 bytes, 2 bytes compressed)

So I ended up with an empty project and by the time I noticed what happened, the *.FCBak file as well as the recovery file from the cache have been overridden with the empty file as well. So all my work was gone. This is bad.

Independent of the crash itself, which might have happened when I pressed save or something else, I don't remember, I would think that dismissing the recovery from a backup file only based on the timestamp is not good and the decision has to be deferred until after the file has been successfully loaded. And if that did not work, then doing a recovery is the only sensible approach.

To reproduce this issues, simply open any project, do some work until a recovery file is written to the cache. Then kill the FC process and manually corrupt the project file, e.g. truncate it. Start FC again, open the corrupted file and see what happens.

Full version info

OS: Ubuntu 24.04.1 LTS (ubuntu:GNOME/ubuntu/xcb)
Architecture: x86_64
Version: 1.0.0.39109 (Git) Conda AppImage
Build type: Release
Branch: (HEAD detached at 1.0.0)
Hash: 2fcc5317fe3aee96ca73475986a577719fc78e20
Python 3.11.9, Qt 5.15.13, Coin 4.0.3, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Stylesheet/Theme/QtStyle: FreeCAD Dark.qss/FreeCAD Dark/Fusion
Installed mods: 
  * Defeaturing 1.2.2
  * A2plus 0.4.68

Subproject(s) affected?

None

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    BlockerIssue is a release blockerMod: CoreIssue or PR touches core sections (App, Gui, Base) of FreeCADOS: LinuxStatus: ConfirmedThe issue was confirmed by othersType: BugThis issue or PR is related to a bugType: CrashFor issues describing crashes or PRs fixing one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions