Sublime Forum

Data corruption: Unsaved files' content missing

#1

Hi, not sure if it happend just now, but I have just noticed it.

I am installing new fonts and troubleshooting why they don’t work in VSCode, so I opened Sublime Text 3 and to my horror I found that all tabs are empty! :grimacing::scream:

Interestingly, the name of the tab still keeps the name after the first line of the previous text.

Please help me restore the files.

0 Likes

#2

What version of Sublime Text are you using?

0 Likes

#3

does ctrl+z help?

0 Likes

#4

No, ctrl+z doesn’t help. And when I try writing in that tab, it will instantly change the title, subsequent ctrl+z doesn’t bring the previous title back, nor the content and it changes to “untitled”. Saving the file replaces the title with filename, so it is again lost and the file is empty.

Version 3.2.1, Build 3207.

I didn’t feel the need to update as I only use it as text editor instead of notepad.exe these days, to store my notes, especially for its capability to:

  • remember text after a sudden system crash
  • tab support
  • advanced editor capabilities
  • speed

But this doesn’t change the fact that something has corrupted the data and I am seeking a way to resolve this.

Where are the working unsaved files stored? Is there possibly a backup of this temporary storage file?

0 Likes

#5

For ST 4, unsaved buffer is stored in the session file. I would guess this is the same for ST 3. You can find the session file at %AppData%\Sublime Text\Local\Session.sublime_session. If the file doesn’t contains what you want, then :bomb:

It seems not that URGENT since you reply after 13 days :upside_down_face:

2 Likes

#6

There may be some backup session files as well which could be worth looking at. Do note that ST4 has a number of fixed and improvements related to data retention.

0 Likes

#7

@bschaaf Thanks for pointing that out.

@jfcherng Time flows differently for me, but believe me, this still feels urgent for me. I looked in the folder, I found the .sublime_session files, but the content was not there. Here is an example

				{
					"contents": "",
					"settings":
					{
						"buffer_size": 0,
						"line_ending": "Windows",
						"name": "[...$0.querySelectorAll('a')].map(a => {"
					}
				},
						{
							"buffer": 12,
							"semi_transient": false,
							"settings":
							{
								"buffer_size": 0,
								"regions":
								{
								},
								"selection":
								[
									[
										0,
										0
									]
								],
								"settings":
								{
									"auto_name": "[...$0.querySelectorAll('a')].map(a => {",
									"default_dir": "C:\\Users\\Qwerty\\Downloads\\x",
									"syntax": "Packages/Text/Plain text.tmLanguage"
								},
								"translation.x": 0.0,
								"translation.y": 0.0,
								"zoom_level": 1.0
							},
							"stack_index": 2,
							"type": "text"
						},

That Downloads\x folder doesn’t exist.


I tried to look through all other directories, but nothing tangible. Seems I am out of luck. Welp :dizzy_face:

Maybe I will start actually saving those files. damn


I wonder, can ST3 be configured to store session backups?

0 Likes

#8

Nope. If you don’t want to update to ST4 the two high-profile data-loss bugs to avoid are:

  • Closing ST before it’s loaded all unsaved files from the session (ie. a few seconds after starting)
  • Closing ST with the update dialog open
0 Likes