Atom crashed and my source file ended up blank


#21

This happened to me and I lost a text note written for 3 month.


#22

We’re taking this very seriously. Finding and fixing this is a high priority for us. We’ve been trying to reproduce this to no avail. We would like to try and replicate your environment. For that we’ll need:

  1. What OS and version of the OS you’re running
  2. Which version of Atom you have installed
  3. A list of all the packages you have installed along with their versions (you can get this easily with apm list)
  4. Your entire config.cson
  5. Your init.coffee
  6. Anything else you can think of that is relevant

We want to get to the bottom of this, so any help you can give us to replicate the problem would be sincerely appreciated!


#23

This just happened to me, too. I lost about half a day’s work. I’ve lost that much work a couple of times because of a mistake that I made, but NEVER because my editor lost its mind. For perspective, I’ve been coding since 1985, and used a LOT of different editors in that time. I can’t recall the last time I used an editor that didn’t provide an automatic backup by default, but I’m sure it’s been at least twenty years, if not more. And I don’t think it was excusable even then.

I’ve been using Atom for about a month, and I really like it, but this was a deal-breaker for me.
To anyone suggesting git as a solution: Don’t be silly. Of course, any sane devs are using git or hg or some other VCS on everything, and making commits reasonably frequently. However, I don’t make meaningless commits every half hour out of fear that my tools will misbehave. I’m sure there are people that do this, but I haven’t met any. That’s certainly not the norm.

I wasn’t expecting anything like IntelliJ’s local history, but emacs has created an automatic file backup for at least the last 30 years. That should really be the bare minimum default behavior for any editor (and it is, in the many other editors I’ve used). If this isn’t the default behavior in Atom, it should have a huge warning in its start up screen that says: β€œWARNING: Atom may randomly delete your code! Please ensure that you keep regular backups constantly” Admittedly, that will scare some people off, but you’ll probably lose more users if their code gets deleted randomly. You lost me for sure.

I was using Atom 1.7.3 - working on a python file. I was using a handful of packages, including MagicPython and python-yapf.

That’s as detailed a bug report as I can give. I’ve already deleted my Atom config, and I’m not very motivated to restore it from a backup and put in the effort for an editor I’m not going to use any more. I just don’t have confidence in the dev team. I’m sure there are reasons why auto-backup isn’t the default, but I have trouble imagining that this was a good decision. For me, Atom doesn’t do the job so much better than the alternatives that I want to keep using it, wondering what other surprises await me.

Please understand that none if this is meant with any hostility or malice - If it seems harsh, please forgive me. I intend no insult. Personally, I always want to know why I’ve lost a user, so this is just meant as my perspective on the importance of providing at least one default automatic backup for every edited file. I hope my feedback is useful.


#24

I find my problem is caused by the atom-beautify package. It only happens when I save the HTML code at the second time and the file has been tracked by git. After disabling atom-beautify, Atom no longer crashes on OS X 10.11.5. This cause is probably different from others.


#25

I just had this happen to me, it was a SCSS File. I clicked save and went to view my browser… Styles broken, I go back to Atom and it has a notice that it has crashed and if I want to reload or close it …

File gone, overwritten by nothing…

This is 100% unacceptable, fortunately in my case it was a tiny file I can redo but this shouldn’t be an issue at all. It is getting harder and harder to take Atom seriously as a competent text editor.


#26

This hasn’t happened to me since the backup option you gave (I know it shouldn’t be related), but I find it weird that it’s not enabled by default…

In any case, this problem happened for me on both Ubuntu 15 and Windows 10 and it has happened with several recent versions of Atom, but not the most recent (and I have the option turned on). I can also tell that this issue has happened on a pretty standard installation. I’m hopeful this configuration option will help me in the future and if not, I’ll report back to you with more details.


#27

This just happened to me too, with version 1.8.0. I was connected to a cluster where my file was saved, the connection was lost and Atom froze, when I opened it again my file was blank. This is unacceptable, I won’t be using Atom any more.


#28

I had the problem with SublimeText 2 in the past, when the disk is full i ended up with 0 KB files.

Yesterday again my disk was full (may employer bought a laptop with only 100 GB SSD) but i didn’t have the problem with Atom. :slight_smile:

Now Atom (1.8.0) crashed. 6 local files open, 2 unsaved. The saved ones are OK but the unsaved are lost. That should not happen. I will try out the local-history plugin.

A bugreport with this informations would not be very helpful.

Do you know if a crash report is written somewhere (OS X)?


#29

Check Console.app.


#30

Yes, there is a crash report. Thanks!

ReportCrash[30557]: Saved crash report for Atom Helper[10854] version 1.8.0 (1.8.0) to /Users/davidak/Library/Logs/DiagnosticReports/***


#31

Just happened to me too!
First, the width of the page began jerking back and forth a few pixels, causing the long document I was writing to constantly reflow the text and run slowly. It seemed like there was something wrong with the Minimap plugin since if the minimap was not there, the editor window would have nothing to expand into / shrink from. So I turned off Minimap. Not sure if this was anything to do with what followed.

Around ten minutes later, while I was typing, the editor froze followed by my cursor and entire Windows machine and I had to force shutdown via the power button. Atom has done this before, but I always save frequently so I thought it would be fine. This time, however, I opened Atom and saw the entire file for a split second - after which it was all replaced by blanks. Then, being careful not to save, I opened the file in another text editor. The file’s contents on disk had been completely blanked.

Really bizarre, and extremely frustrating. Had to rewrite the entire thing from memory, in a different text editor of course.

In my experience these sorts of crashes always happen right in the middle of typing a word. Unfortunately that’s all the context I can give. This was the first time it actually modified the file on disk instead of just losing the unsaved work.


#32

Hi @jdjakub, can you please answer @lee-dohm’s questions available here? Thanks!

Also, I would suggest that you update to the newly-released Atom 1.9.0. That version contains a new feature that should prevent these kinds of scenarios from happening again. In the event that Atom cannot automatically recover your files, they should be available at %USERPROFILE%\.atom\recovery.


#33

Windows 8 x64
Atom v1.6.1
Happens to me too, I’ve lost hour of work with text file. Maybe this issue is out-of-date for the latest version, but, unfortunately, editor doesn’t suggests me any updates to the new version


#34

The current version is 1.9.8. You may have to update manually.


#35

What OS and version of the OS you’re running
Ubuntu 16.04 LTS
Which version of Atom you have installed
1.9.9
A list of all the packages you have installed along with their versions (you can get this easily with apm list)
Built-in Atom Packages (89)
β”œβ”€β”€ about@1.5.2
β”œβ”€β”€ archive-view@0.61.1
β”œβ”€β”€ atom-dark-syntax@0.27.0
β”œβ”€β”€ atom-dark-ui@0.51.0
β”œβ”€β”€ atom-light-syntax@0.28.0
β”œβ”€β”€ atom-light-ui@0.43.0
β”œβ”€β”€ autocomplete-atom-api@0.10.0
β”œβ”€β”€ autocomplete-css@0.11.1
β”œβ”€β”€ autocomplete-html@0.7.2
β”œβ”€β”€ autocomplete-plus@2.31.0
β”œβ”€β”€ autocomplete-snippets@1.11.0
β”œβ”€β”€ autoflow@0.27.0
β”œβ”€β”€ autosave@0.23.1
β”œβ”€β”€ background-tips@0.26.0
β”œβ”€β”€ base16-tomorrow-dark-theme@1.1.0
β”œβ”€β”€ base16-tomorrow-light-theme@1.1.1
β”œβ”€β”€ bookmarks@0.41.0
β”œβ”€β”€ bracket-matcher@0.82.1
β”œβ”€β”€ command-palette@0.38.0
β”œβ”€β”€ deprecation-cop@0.54.1
β”œβ”€β”€ dev-live-reload@0.47.0
β”œβ”€β”€ encoding-selector@0.22.0
β”œβ”€β”€ exception-reporting@0.39.0
β”œβ”€β”€ find-and-replace@0.198.0
β”œβ”€β”€ fuzzy-finder@1.3.0
β”œβ”€β”€ git-diff@1.1.0
β”œβ”€β”€ go-to-line@0.31.0
β”œβ”€β”€ grammar-selector@0.48.1
β”œβ”€β”€ image-view@0.58.0
β”œβ”€β”€ incompatible-packages@0.26.1
β”œβ”€β”€ keybinding-resolver@0.35.0
β”œβ”€β”€ language-c@0.52.1
β”œβ”€β”€ language-clojure@0.21.0
β”œβ”€β”€ language-coffee-script@0.47.0
β”œβ”€β”€ language-csharp@0.12.1
β”œβ”€β”€ language-css@0.36.2
β”œβ”€β”€ language-gfm@0.86.0
β”œβ”€β”€ language-git@0.13.0
β”œβ”€β”€ language-go@0.42.0
β”œβ”€β”€ language-html@0.44.1
β”œβ”€β”€ language-hyperlink@0.16.0
β”œβ”€β”€ language-java@0.22.0
β”œβ”€β”€ language-javascript@0.119.0
β”œβ”€β”€ language-json@0.18.0
β”œβ”€β”€ language-less@0.29.3
β”œβ”€β”€ language-make@0.22.2
β”œβ”€β”€ language-mustache@0.13.0
β”œβ”€β”€ language-objective-c@0.15.1
β”œβ”€β”€ language-perl@0.35.0
β”œβ”€β”€ language-php@0.37.0
β”œβ”€β”€ language-property-list@0.8.0
β”œβ”€β”€ language-python@0.45.0
β”œβ”€β”€ language-ruby@0.68.5
β”œβ”€β”€ language-ruby-on-rails@0.25.0
β”œβ”€β”€ language-sass@0.52.0
β”œβ”€β”€ language-shellscript@0.22.3
β”œβ”€β”€ language-source@0.9.0
β”œβ”€β”€ language-sql@0.21.1
β”œβ”€β”€ language-text@0.7.1
β”œβ”€β”€ language-todo@0.28.0
β”œβ”€β”€ language-toml@0.18.0
β”œβ”€β”€ language-xml@0.34.8
β”œβ”€β”€ language-yaml@0.26.0
β”œβ”€β”€ line-ending-selector@0.5.0
β”œβ”€β”€ link@0.31.1
β”œβ”€β”€ markdown-preview@0.158.1
β”œβ”€β”€ metrics@0.53.1
β”œβ”€β”€ notifications@0.64.1
β”œβ”€β”€ one-dark-syntax@1.2.0
β”œβ”€β”€ one-dark-ui@1.3.2
β”œβ”€β”€ one-light-syntax@1.2.0
β”œβ”€β”€ one-light-ui@1.3.2
β”œβ”€β”€ open-on-github@1.2.0
β”œβ”€β”€ package-generator@1.0.0
β”œβ”€β”€ settings-view@0.238.2
β”œβ”€β”€ snippets@1.0.2
β”œβ”€β”€ solarized-dark-syntax@1.0.2
β”œβ”€β”€ solarized-light-syntax@1.0.2
β”œβ”€β”€ spell-check@0.67.1
β”œβ”€β”€ status-bar@1.4.1
β”œβ”€β”€ styleguide@0.47.1
β”œβ”€β”€ symbols-view@0.113.0
β”œβ”€β”€ tabs@0.98.1
β”œβ”€β”€ timecop@0.33.1
β”œβ”€β”€ tree-view@0.208.0
β”œβ”€β”€ update-package-dependencies@0.10.0
β”œβ”€β”€ welcome@0.34.0
β”œβ”€β”€ whitespace@0.32.2
└── wrap-guide@0.38.1

  Community Packages (0) /home/lingt/.atom/packages
  └── (empty)

  └── (empty)

Your entire config.cson
"*":
core: {}
β€œexception-reporting”:
userId: "d0a09362-ebb9-f394-c06f-80e809e081a4"
welcome:
showOnStartup: false

Your init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
# console.log "Saved! #{editor.getPath()}"
Anything else you can think of that is relevant

  1. Was working on a markdown file, saving frequently for about a week
  2. Atom became non-responsive, I killed the application manually
  3. After restarting Atom, the markdown file was blank in Atom
  4. The file is now 0 bytes on the local filesystem
  5. The ~/.atom/recovery directory is empty

I hope this report helps, because I really like the features of this editor.
That being said, this bug report has been open for almost 1.5 years and apparently the option to fix this issue is disabled by default in the settings? You have got to be kidding me. I’m uninstalling this editor and never coming back.
Any editor that destroys files in this manner is worse than useless.


#36

It happened with me today (13/09/2016), I’m using atom version 1.10.2 using Arch Linux. I almost had a heart attack, my file becomes a blank file (0kb) where it had more than 2000 lines of code (pure C) of my undergraduate work. Thank god I’m working with Dropbox syncing my files and I was able to recover my last saved file. Atom team you surely should revise this bug, it’s really a scary one.


#37

We are doing everything we can to track down everything that can cause this. We take every report of this very seriously. In v1.9 we released an even more extensive file recovery system to at least prevent the loss of data. Any information you can give us to help us track this down would be greatly appreciated.


#38

What OS and version of the OS you’re running:
Manjaro 16.08.1 Xfce Stable Repository

Which version of Atom you have installed:
1.10.2 today, but yesterday I was using version 1.9.9-2. I updated to this new version today:

# pacman log
$ cat /var/log/pacman.log | grep -iE '2016-09-13.*atom'
[2016-09-13 09:38] [ALPM] upgraded atom (1.9.9-2 -> 1.10.2-2)

I just saw the error today morning, but probably it happened yesterday when I was using the older version.

A list of all the packages you have installed along with their versions (you can get this easily with apm list):

$ apm list
Built-in Atom Packages (90)
β”œβ”€β”€ about@1.5.3
β”œβ”€β”€ archive-view@0.61.1
β”œβ”€β”€ atom-dark-syntax@0.27.0
β”œβ”€β”€ atom-dark-ui@0.52.0
β”œβ”€β”€ atom-grammar-test@0.6.0
β”œβ”€β”€ atom-light-syntax@0.28.0
β”œβ”€β”€ atom-light-ui@0.44.0
β”œβ”€β”€ autocomplete-atom-api@0.10.0
β”œβ”€β”€ autocomplete-css@0.11.2
β”œβ”€β”€ autocomplete-html@0.7.2
β”œβ”€β”€ autocomplete-plus@2.31.1
β”œβ”€β”€ autocomplete-snippets@1.11.0
β”œβ”€β”€ autoflow@0.27.0
β”œβ”€β”€ autosave@0.23.1
β”œβ”€β”€ background-tips@0.26.1
β”œβ”€β”€ base16-tomorrow-dark-theme@1.1.0
β”œβ”€β”€ base16-tomorrow-light-theme@1.1.1
β”œβ”€β”€ bookmarks@0.41.0
β”œβ”€β”€ bracket-matcher@0.82.1
β”œβ”€β”€ command-palette@0.38.0
β”œβ”€β”€ deprecation-cop@0.54.1
β”œβ”€β”€ dev-live-reload@0.47.0
β”œβ”€β”€ encoding-selector@0.22.0
β”œβ”€β”€ exception-reporting@0.39.0
β”œβ”€β”€ find-and-replace@0.201.0
β”œβ”€β”€ fuzzy-finder@1.3.0
β”œβ”€β”€ git-diff@1.1.0
β”œβ”€β”€ go-to-line@0.31.0
β”œβ”€β”€ grammar-selector@0.48.1
β”œβ”€β”€ image-view@0.58.2
β”œβ”€β”€ incompatible-packages@0.26.1
β”œβ”€β”€ keybinding-resolver@0.35.0
β”œβ”€β”€ language-c@0.52.1
β”œβ”€β”€ language-clojure@0.21.0
β”œβ”€β”€ language-coffee-script@0.47.2
β”œβ”€β”€ language-csharp@0.12.1
β”œβ”€β”€ language-css@0.37.1
β”œβ”€β”€ language-gfm@0.88.0
β”œβ”€β”€ language-git@0.15.0
β”œβ”€β”€ language-go@0.42.1
β”œβ”€β”€ language-html@0.45.1
β”œβ”€β”€ language-hyperlink@0.16.0
β”œβ”€β”€ language-java@0.23.0
β”œβ”€β”€ language-javascript@0.119.0
β”œβ”€β”€ language-json@0.18.2
β”œβ”€β”€ language-less@0.29.5
β”œβ”€β”€ language-make@0.22.2
β”œβ”€β”€ language-mustache@0.13.0
β”œβ”€β”€ language-objective-c@0.15.1
β”œβ”€β”€ language-perl@0.35.0
β”œβ”€β”€ language-php@0.37.2
β”œβ”€β”€ language-property-list@0.8.0
β”œβ”€β”€ language-python@0.45.0
β”œβ”€β”€ language-ruby@0.69.0
β”œβ”€β”€ language-ruby-on-rails@0.25.0
β”œβ”€β”€ language-sass@0.56.0
β”œβ”€β”€ language-shellscript@0.22.4
β”œβ”€β”€ language-source@0.9.0
β”œβ”€β”€ language-sql@0.23.0
β”œβ”€β”€ language-text@0.7.1
β”œβ”€β”€ language-todo@0.28.0
β”œβ”€β”€ language-toml@0.18.0
β”œβ”€β”€ language-xml@0.34.9
β”œβ”€β”€ language-yaml@0.26.0
β”œβ”€β”€ line-ending-selector@0.5.0
β”œβ”€β”€ link@0.31.1
β”œβ”€β”€ markdown-preview@0.158.0
β”œβ”€β”€ metrics@0.53.1
β”œβ”€β”€ notifications@0.65.0
β”œβ”€β”€ one-dark-syntax@1.3.0
β”œβ”€β”€ one-dark-ui@1.5.0
β”œβ”€β”€ one-light-syntax@1.3.0
β”œβ”€β”€ one-light-ui@1.5.0
β”œβ”€β”€ open-on-github@1.2.0
β”œβ”€β”€ package-generator@1.0.0
β”œβ”€β”€ settings-view@0.242.2
β”œβ”€β”€ snippets@1.0.2
β”œβ”€β”€ solarized-dark-syntax@1.0.2
β”œβ”€β”€ solarized-light-syntax@1.0.2
β”œβ”€β”€ spell-check@0.67.1
β”œβ”€β”€ status-bar@1.4.1
β”œβ”€β”€ styleguide@0.47.0
β”œβ”€β”€ symbols-view@0.113.0
β”œβ”€β”€ tabs@0.100.2
β”œβ”€β”€ timecop@0.33.2
β”œβ”€β”€ tree-view@0.208.2
β”œβ”€β”€ update-package-dependencies@0.10.0
β”œβ”€β”€ welcome@0.34.0
β”œβ”€β”€ whitespace@0.33.0
└── wrap-guide@0.38.1

Community Packages (0) /home/chmercesmoreira/.atom/packages
└── (empty)

└── (empty)

Your entire config.cson:

$ cat /home/chmercesmoreira/.atom/config.cson
"*":
  editor:
    backUpBeforeSaving: true
  "exception-reporting":
    userId: "6a94c4f6-9478-0891-a56a-ef49b96033e3"
  "one-dark-ui":
    tabSizing: "Even"
  welcome:
    showOnStartup: false

Your init.coffee:

$ cat /home/chmercesmoreira/.atom/init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
#   editor.onDidSave ->
#     console.log "Saved! #{editor.getPath()}"

Anything else you can think of that is relevant:
Probably the problem occurred yesterday because of a system crash while the program was opened.

@ edit
I just saw it now, the config.cson file is pointing out that I’m using the editor backUpBeforeSaving option as true, but I activated this option just today after read people mentioning this option in previous messages. I was not using this option yesterday when the problem occurred.


#39

Thanks very much for all this information!

One clarifying question, Atom doesn’t use version numbers like you mention, example 1.9.9-2 specifically the -2 part. Are you installing Atom from a package manager? If so, could you include the output from atom --version and apm --version? We have had problems in the past of some package managers building altered Atom distributions without disclosing this to end users that have caused serious instabilities.


#40
$ atom --version
Atom    : 1.10.2
Electron: 1.3.5
Chrome  : 52.0.2743.82
Node    : 6.3.0
$ apm --version
apm  1.12.7
npm  3.10.7
node 6.5.0
python 3.5.2
git 2.9.3

This -2 suffix at the end is related to how Arch packaging standards works.

Package releases are specific to Arch Linux packages. These allow users to differentiate between newer and older package builds. When a new package version is first released, the release count starts at 1. Then as fixes and optimizations are made, the package will be re-released to the Arch Linux public and the release number will increment. When a new version comes out, the release count resets to 1. Package release tags follow the same naming restrictions as version tags.

You can see all the history of versions available for Atom on Arch Linux here: https://git.archlinux.org/svntogit/community.git/log/trunk?h=packages/atom