Closed grahamperrin closed 2 years ago
Symptoms (not necessarily this bug) are reproducible:
Step (4) is unnatural, but enough to cause disappearance.
VS Code version: Code - OSS 1.56.2
Re: https://code.visualstudio.com/updates/ with 1.56.2 at April 2021 on the timeline, I sped through linked issues for more recent versions.
Just one issue caught my eye – 125970, involving avoidance of race conditions and multiple windows.
To the best of my knowledge: this issue 136409 does not involve multiple windows. Still, I wonder about race conditions.
@grahamperrin we do not restore sessions with unsaved files when a single file is opened, rather we ask you do open that workspace again where the unsaved files are in to continue working on them. This was a change we did once by accident and then couldn't change it back because users got a ton of windows opened at the same time.
If you have steps for data loss that is different, please let me know.
Btw you can configure this setting to always restore all windows, even when a single file is opened: window.restoreWindows: preserve
we do not restore sessions with unsaved files when a single file is opened
Here: unsaved editors are reopened, without interaction, when a single (saved) file is opened, with the following window.restoreWindows
preference, which I probably never changed:
So, have I become accustomed to buggy behaviour (unexpected opening)?
Then maybe I have misunderstood the issue, can you provide some step by step instructions of what you see and what you would expect?
@grahamperrin can you rebuild your OSS FreeBSD port from the current release (1.61.2) and still reproduce the issue?
can you rebuild your OSS FreeBSD port from the current release (1.61.2) …
Probably out of my depth, sorry.
… step by step instructions of what you see …
window.restoreWindows
all
(the default).log
filewindow.restoreWindows
preserve
.log
file… what you would expect? …
I'm no longer certain.
Today I discovered the Files: Auto Save
preference. I see https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save but can't tell whether this preference is intended to apply to an editor that has never been saved.
Auto save setting only applies to saved files, but you can configure files.hotExit: off
to get asked to save when closing.
Thank you.
So, I learnt to expect restoration of unsaved editors – the first set of five steps to reproduce under https://github.com/microsoft/vscode/issues/136409#issuecomment-962580436 however:
https://github.com/microsoft/vscode/issues/136409#issuecomment-960475659
we do not restore sessions with unsaved files when a single file is opened, …
– is it wrong for restoration to occur with those steps?
we ask you do open that workspace again where the unsaved files are in to continue working on them. …
Should a dialogue appear?
I never thought of the unsaved editors as being in a workspace. (Maybe I never used/saved a workspace. I should probably describe myself as a casual but frequent user of the application; not a developer.)
Our rule today is:
Without a clear suggestion what to change in this flow here or without a clear bug with this flow I am not sure how to proceed.
- if you had an empty workspace opened (no folder opened) and you leave it with dirty files, …
If dirty means never saved, then (yes) that's most often my use case.
we restore it …
Occasional disappearance (or non-restoration, I'm not sure which) was the rationale for me opening this issue.
https://github.com/microsoft/vscode/issues/136409#issuecomment-960547873
can you rebuild your OSS FreeBSD port from the current release (1.61.2) and still reproduce the issue?
https://github.com/tagattie/FreeBSD-VSCode/issues/35#issuecomment-980547075 1.62.3 is ported but not yet packaged for FreeBSD 14.0-CURRENT. I'll review in due course.
Thanks
Issue Type: Bug
With Code - OSS on FreeBSD, on at least three occasions I have lost all unsaved opened editors.
https://stackoverflow.com/q/69335518/38108 recalls a September incident. The most recent incident was this week.
For the two most recent incidents, I'm almost certain that losses were noticeable after a file was opened into Code - OSS by some other application.
It's possible/likely that Code - OSS was not running prior to opening of the file.
Also, it's possible that the computer was unusually busy at the times of the incidents.
VS Code version: Code - OSS 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-10-10T20:11:12.799Z) OS version: FreeBSD x64 14.0-CURRENT
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz (4 x 2893)| |GPU Status|2d_canvas: enabledgpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|2, 4, 4| |Memory (System)|15.88GB (0.33GB free)| |Process Argv|--no-sandbox --unity-launch --no-sandbox| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|/usr/local/share/xsessions/plasma| |XDG_CURRENT_DESKTOP|KDE| |XDG_SESSION_DESKTOP|KDE| |XDG_SESSION_TYPE|x11|
Extensions (20)
Extension|Author (truncated)|Version ---|---|--- better-comments|aar|2.1.0 msg|ajs|0.1.1 vscode-office|cwe|1.9.1 ini-for-vscode|Dav|0.0.4 reg|ion|1.0.3 pdf|k5h|4.2.3 wordcounter|Lud|0.0.1 vscode-language-pack-en-GB|MS-|1.54.1 vscode-ros|ms-|0.6.9 python|ms-|2021.5.926500501 vscode-pylance|ms-|2021.7.7 jupyter|ms-|2021.6.832593372 cpptools|ms-|1.5.1 languagetool|ray|1.0.1 rewrap|stk|1.14.0 zip-file-system|Tom|2.0.0 pdf|tom|1.1.0 reflow-paragraph|Tro|1.3.0 txt-syntax|xsh|0.2.0 vscode-aspell|zap|0.1.4Makefile and other files for the port to FreeBSD (editors/vscode) are at https://cgit.freebsd.org/ports/tree/editors/vscode.