0.11 Overwrites personal settings #8371

Closed
opened 2026-01-31 01:27:50 +00:00 by claunia · 9 comments
Owner

Originally created by @wolf99 on GitHub (May 20, 2020).

Environment

Windows build number: 1919 18363.836
Windows Terminal version (if applicable): 0.11.1333.0

Steps to reproduce

  1. Open WT, profile looks as expected
  2. Opened settings to edit (in vscode)
  3. Personal settings present as expected.
  4. Begin editing

Expected behavior

  1. Personal settings kept and saved, profile remains as before
    n. At point of my choosing (i.e. after backing up my personal settings), settings file is regenerated to suit current version.

Actual behavior

  1. Entire file suddenly rewritten without my interaction
  2. Complete loss of personal settings
  3. Profile reverted to stock

comment at top of file now reads as follows, somehow implying that WT is at newer version than 0.11.1333.0

// This file was initially generated by Windows Terminal 0.11.1333.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.

Just in case you may think I have updated to 1.0 and somehow read the version info incorrectly, here's a screenshot (1.0 is still marked as pending in the MS Store)

image

I had made a backup of settings at the time of update to 0.11, but that was some time ago and I haven't kept that as the update seemed to go OK

Originally created by @wolf99 on GitHub (May 20, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 1919 18363.836 Windows Terminal version (if applicable): 0.11.1333.0 ``` # Steps to reproduce 1. Open WT, profile looks as expected 2. Opened settings to edit (in vscode) 3. Personal settings present as expected. 4. Begin editing # Expected behavior 5. Personal settings kept and saved, profile remains as before n. At point of my choosing (i.e. after backing up my personal settings), settings file is regenerated to suit current version. # Actual behavior 5. Entire file suddenly rewritten without my interaction 6. Complete loss of personal settings 7. Profile reverted to stock comment at top of file now reads as follows, somehow implying that WT is at newer version than 0.11.1333.0 ``` // This file was initially generated by Windows Terminal 0.11.1333.0 // It should still be usable in newer versions, but newer versions might have additional // settings, help text, or changes that you will not see unless you clear this file // and let us generate a new one for you. ``` Just in case you may think I have updated to 1.0 and somehow read the version info incorrectly, here's a screenshot (1.0 is still marked as pending in the MS Store) ![image](https://user-images.githubusercontent.com/281700/82490436-26f00180-9adb-11ea-83bc-4da933262e7e.png) I had made a backup of settings at the time of update to 0.11, but that was some time ago and I haven't kept that as the update seemed to go OK
claunia added the Needs-TriageNeeds-Tag-FixNeeds-Attention labels 2026-01-31 01:27:50 +00:00
Author
Owner

@DHowett commented on GitHub (May 20, 2020):

This only ever happens if there's a time when the settings file is deleted or emptied. Is that just happening randomly for you? That seems like a really bad sign for your computer.

@DHowett commented on GitHub (May 20, 2020): This only ever happens if there's a time when the settings file is _deleted or emptied_. Is that just happening randomly for you? That seems like a _really bad sign_ for your computer.
Author
Owner

@DHowett commented on GitHub (May 20, 2020):

For what it's worth, this code hasn't changed in 8 months. Has anything changed in your setup?

@DHowett commented on GitHub (May 20, 2020): For what it's worth, this code hasn't changed in 8 months. Has anything changed in your setup?
Author
Owner

@wolf99 commented on GitHub (May 20, 2020):

Hi, haven't had any other changes to the machine, except just installed powertoys and winget.

@wolf99 commented on GitHub (May 20, 2020): Hi, haven't had any other changes to the machine, except just installed powertoys and winget.
Author
Owner

@wolf99 commented on GitHub (May 20, 2020):

Is there anywhere else the settings may have been held that I could retrieve them? (straw grasping engaged 😅 )

EDIT: just found them in a differently named file (profiles.json) on my desktop 😌

@wolf99 commented on GitHub (May 20, 2020): Is there anywhere else the settings may have been held that I could retrieve them? (straw grasping engaged 😅 ) EDIT: just found them in a differently named file (`profiles.json`) on my desktop 😌
Author
Owner

@DHowett commented on GitHub (May 20, 2020):

Really sorry that we apparently nuked your settings. 😦 I'm glad you found an older copy somewhere.

@DHowett commented on GitHub (May 20, 2020): Really sorry that we apparently nuked your settings. 😦 I'm glad you found an older copy somewhere.
Author
Owner

@wolf99 commented on GitHub (May 20, 2020):

No worries, all that ends well etc - teach me to back it up I guess!
Interested to know what the trigger to clear the settings is though, perhaps I can avoid anything similar in future. Is it only as mentioned above, when deleted or empty?

@wolf99 commented on GitHub (May 20, 2020): No worries, all that ends well etc - teach me to back it up I guess! Interested to know what the trigger to clear the settings is though, perhaps I can avoid anything similar in future. Is it _only_ as mentioned above, when deleted or empty?
Author
Owner

@DHowett commented on GitHub (May 20, 2020):

Yep! So, the full logic is:

  • Wait for file changes (using the kernel notify mechanism)
  • When there is a change, wait 50msec
  • Load the settings

Load goes somewhat like this:

  • Open the file
  • Was there a file?
  • There was no file: make a new one
  • Was the file empty?
  • It was empty: make a new one
  • Otherwise, go, parse.

Now, that 50msec timeout seems a little suspect here. We did it because sometimes, text editors write to the folder 3+ times (!) which would make terminal flicker like absolute crazy every time you saved.

Some text editors implement "save" as "delete, rename" or even just "save to temporary, rename over". I'm worried, though, if there's a time where Terminal can get in and notice that it's been deleted before it completes its operation...

@DHowett commented on GitHub (May 20, 2020): Yep! So, the full logic is: * Wait for file changes (using the kernel notify mechanism) * When there is a change, _wait 50msec_ * Load the settings Load goes somewhat like this: * Open the file * Was there a file? * There was no file: make a new one * Was the file empty? * It was empty: make a new one * Otherwise, go, parse. Now, that 50msec timeout seems a little suspect here. We did it because sometimes, text editors write to the folder 3+ times (!) which would make terminal flicker like absolute crazy every time you saved. Some text editors implement "save" as "delete, rename" or even just "save to temporary, rename over". I'm worried, though, if there's a time where Terminal can get in and notice that it's been deleted before it completes its operation...
Author
Owner

@wolf99 commented on GitHub (May 20, 2020):

Thanks for the explanation.

Oh no that would be concerning! I thought it was unrelated but at the time my machine was slowing down due to the MS antimalware executable hogging CPU.... perhaps it slowed it down enough that that 50 ms was exceeded or something.

@wolf99 commented on GitHub (May 20, 2020): Thanks for the explanation. Oh no that would be concerning! I thought it was unrelated but at the time my machine was slowing down due to the MS antimalware executable hogging CPU.... perhaps it slowed it down enough that that 50 ms was exceeded or something.
Author
Owner

@wolf99 commented on GitHub (May 22, 2020):

PS: Settings are now in version controlled repo 😅

@wolf99 commented on GitHub (May 22, 2020): PS: Settings are now in version controlled repo 😅
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8371