Sublime Forum

Question about what might have caused the blanking of windows?


Some years ago I had this happen

Any idea what the cause might have been?

It’s possible I was editing files that were stored on a server, and had an issue with the network connection. e.g. a bad LAN cable.

So it’d have struggled to load the file.

Is it possible that could have played a role in that?

I’m wondering if anybody experienced anything similar before?

I think maybe what happened was the file hadn’t been saved to the server. And so then when restarting sublime is the file loaded from a sublime file of what unsaved data there is in the file, or is the file loaded from the server? (in which case that might be why sublime gave a blank, because it couldn’t access the file from the server?)

I want to get some idea of what happened so I can be more sure it won’t happen again.

I have used VS Code more recently but i’m still interested in sublime a bit… And am interested in this issue.




Sublime Text stores state information such as open windows and content of unsaved files in a JSON file called Session.sublime_session.

Linux: ~/.config/sublime-text/Local/Session.sublime_session
MacOS: ~/Library/Application Support/Sublime Text/Local/Session.sublime_session
Windows: %APPDATA%\Sublime Text\Local\Session.sublime_session

If ST crashes before/during saving has been completed or if not enough disk space is available it may currupt this file.

Many counter meassures have been implemented to prevent data losses and sublimehq devs have always been very interested in investigating and fixing bugs. Most recent fixed and hard to find bug caused session file to be cleared during ST updates.

All known issues have been resolved in recent ST4 builds. So it should be no point of concern anymore.



Off the top of my head the bugs related to session saving that have been fixed in recent times are:

  • Quickly quitting ST while it’s restoring the session would end up with unsaved files being lost
  • On Windows if the last window was closed while the update dialog was open it wouldn’t restore that window afterwards
  • ST would exit and drop unsaved files even if the session couldn’t be saved due to permissions, no available space, etc.
  • If the ST crashed or was forcibly closed by the OS while it was writing to the session file it could get corrupted.


I have experienced a similar problem once, very recently: I launched ST4 and my previous session showed up, except that various files where just blank (no contents, and a white background, instead of their usual scheme colour). I immediately realized that something was wrong, and in order to avoid loosing contents I closed all the blank files and when asked if I wanted to save the changes replied “No”, to avoid overwriting them with null contents.

I then shut down and relaunched ST, and when I opened again those files everything was fine, no contents lost. But I’m pretty sure that if I had replied to save changes I would have lost those contents.

Although this only happened once, I’ve always wondered what the reason was. Most likely the culprit is the OS (Windows) and it was due to some file-access restrictions — anything from a system update occurring in the background, up to the native anti-virus inspecting those files (or their cached versions) and interfering with their read access. But guessing what Windows is doing is always a long shot, since it’s less transparent than other OSs when it comes to such operations.

Anyhow, I replied just to confirm that I also experienced this, albeit only once.