autosave file is not opened after crash but removed silently

Bug #1820433 reported by michalstec
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
High
Seth Hillbrand

Bug Description

KiCad used to ask user if he wants to recover files from autosave file but currently it doesn't work this way. Instead the autosave is silently removed. I think that the function which did that is the "CheckForAutoSaveFile" (it contains the question "Well this is potentially embarrassing [...]". Is it supposed to work? It doesn't work for me neither on windows nor linux.

Also it seems to me that default autosave intervals are random. I installed new stable KiCad on two computers with windows and the values were -27 minutes on one and some thousands of minutes the second one.

Application: kicad
Version: 5.1.0-unknown-00a9b66~82~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-46-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Seth Hillbrand (sethh) wrote :

Well, this is embarrassing. It appears that this function is not working correctly. It is _only_ called when loading pcbnew files (should also be called for eeschema) AND it uses the eeschema autosave prefix instead of the pcbnew prefix.

So I'll propose two actions here:
1) Unify the autosave prefix strings as there doesn't appear to be a reason for them to be different
2) Add this function to eeschema.

Objections?

Changed in kicad:
importance: Undecided → High
milestone: none → 5.1.1
status: New → Triaged
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I'm pretty sure this used to work just fine. It looks like someone did some refactoring and refactored CheckForAutoSaveFile() right out of the schematic editor. @Seth, I'm not sure why you need to perform step 1 as CheckForAutoSaveFile() uses the same prefix (_saved_) unless there is a different prefix used in one of the derived objects when saving the auto save file. I have no objections to the proposed changes.

Revision history for this message
Seth Hillbrand (sethh) wrote :

The pcbnew prefix is currently "_autosaved_". Step 1 is to make all autosave prefixes the same in the code

Seth Hillbrand (sethh)
Changed in kicad:
assignee: nobody → Seth Hillbrand (sethh)
status: Triaged → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 078320e2fb25f0c90d24648a3822da437349ebae
https://git.launchpad.net/kicad/patch/?id=078320e2fb25f0c90d24648a3822da437349ebae

Changed in kicad:
status: In Progress → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.