Sublime Forum

Sublime caches old version - lost hours of coding

#1

Sometimes I open Sublime and I get an old version of my file. Twice already I lost several hours of coding
since I saved that old version on top of the newer edits. Is this a bug in sublime? I use the sftp plugin - can
this be related to a offline cache this plugin is generating?
Thank you for your time
ST2 Version 2.01 Build 2217 on Ubuntu 12.04
Linux cell-ds-20 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

0 Likes

#2

I believe that if you have unsaved changes when you close Sublime, then Sublime will cache the file and show you the unsaved changes when you reopen.

0 Likes

#3

Somehow related: Built-in FTP

Long story short:

[quote]The argument is “What if you mess something up?”
Answer: Fix it. Any argument that one could lose two weeks of work by editing this way is absurd. [/quote]

or, you could just use version control (wich is totally unprofessional) and avoid this kind of mess in the future.

0 Likes

#4

I’m not sure I understand - of course having some sort of backup or version control is essential for your projects, but that isn’t an excuse to not address a bug that causes data loss.

0 Likes

#5

@mwb1100: it’s really not a bug, it’s more like a feature :mrgreen:

Probably it’s a good idea to try to revert to a freshly installed state and see if this problem persist.

In 2 years since i use sublime i never had this issue (and i’m pretty sure i didn’t read anything similar on the forum), so it’s either a problem of workflow or plugins.

0 Likes

#6

Thank you all for your time.

I think it is related to this. I will provide more infos if it happends again. Maybe my workflow is flawed.

0 Likes

#7

This has happened to me twice already. I couldn’t figure out why my application was behaving like an older version until I realized that my code had reverted to the previous day’s code. When I hit ctrl-z I received a message saying “Undo Revert” on the status bar and my latest code was restored. I don’t know what caused my code to revert to the old saved version, but I don’t like this one bit. If I cant trust this with my code then I can’t use this.

I am running on Windows, Version 2.0.1 (build 2217)
Here are my installed packages
{
“installed_packages”:

	"BracketHighlighter",
	"JsFormat",
	"Package Control",
	"SideBarEnhancements",
	"SublimeCodeIntel",
	"SublimeLinter",
	"Theme - Soda"
]

}

I save my files all of the time. The last time I let my PC hibernate. I wonder if that has anything to do with it.

0 Likes

#8

Setting the preference “hot_exit” to false might help you…

0 Likes

#9

I just discovered I lost weeks, if not months, worth of work in all files open in Sublime Text 4 when restarting my MacBook Pro without first quitting/closing ST4. Confirmed after reviewing open files open in ST4, Project files not open in ST4, files under Git version control and files on the MacBook Pro’s Time Machine backup files.

I am extremely distraught, as I have been using ST since version 2 (paid), as it is much faster than every editor I have tried besides Vi or Vim.

Some files can be restored from the live server, but config files like Dockerfiles cannot.

Some details:
-files open in ST4 were definitely saved (compulsive CMD+S’er) but reverted to a version over a month old
-some files were under version control, but not committed (yes, commit early and often is a best practice, but please don’t use this reason to avoid the fact that ST4 erroneously restored an old version)
-attempted File > Revert, but not luck
-reviewed the cache files in ~/Library/Application\ Support/Sublime\ Text, especially in the Local directory, but could not find the missing/most recent data for the open files
-file/data loss seems to have occurred between file updates and the next Time Machine backup, so totally screwed
-macOS Big Sur version 11.7.10

Installed Packages:
-Django Syntax
-Dockerfile Syntax Highlighting
-Pretty JSON
-SCSS
-Terminus
-Vue Syntax Highlight
-nginx

I just don’t know if I can risk using Sublime Text anymore, as the computer could crash without the opportunity to manually Quit the application.

Any thoughts on file recovery, or addressing this bug?

Thanks in advance for any help anyone may be able to provide.

0 Likes

#10

This post was flagged by the community and is temporarily hidden.

0 Likes