Atom stops responding when I try to close init.coffee


#1

I’m a new Atom user. I really haven’t done much hacking or customization. At some point, I did something that resulted in init.coffee being opened. I glanced at the file but decided I didn’t have the time right then to learn how to configure Atom. So, I tried to close init.coffee. Except that every time I try to close init.coffee, Atom stops responding and I have to force it to close. All other files close normally. This still happens after rebooting. And there are two tabs open for atom.coffee: one on the left, and one on the right. I can’t close either of them. (This might be just my inexperience with Atom, but I can’t figure out why I have two side-by-side editor panels to begin with.)

I’ve tried running atom --safe to no avail. I haven’t done much in the way of customization beyond having a quick glance through the settings.

Any ideas what might be causing this?

Atom 1.12.6 running on Windows 10.


#2

When you say you’ve tried running atom --safe “to no avail”, what does that mean? Does Atom not start? Does it not resolve the problem? Does it resolve the problem but only when you’re running in Safe Mode?


#3

Sorry for not being clear. I mean that Safe Mode has no effect on the problem. Atom stops responding in safe mode exactly as it does in normal mode.


#4

Should read: And there are two tabs open for init.coffee.

I’d fix it, but I can’t find an edit link.


#5

What do you have in your init.coffee?


#6

Only the default comments. Here’s the entire file:

# 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()}"

#7

Have you tried the steps in the Debugging section of the Atom Flight Manual? Specifically the section on Clearing Saved State?


#8

This solved my problem. However, I’m always nervous about problems that go away without actually being fixed, as the only way that the saved state could have gotten into what presumably was a corrupted state is if some bug corrupted it. I didn’t hand-edit any files. I may have changed a handful of GUI settings (I can’t remember). So presumably whatever bug caused the corruption is still lurking unsolved.

But, thanks to your help, I can close init.coffee without trouble now.


#9

If you can replicate how you managed to get into that corrupt state, that is the information that we need to fix the underlying bug. If you can figure that out, please do let us know :grinning:


#10

Hi there! I am also new to coding/ Atom and ran into this issue. The way I stumbled into this was as follows: I was trying to get rid of the line in the middle of the page referred to as “Wrap Guide” package and naively posted a line of code into the “Hack on the Init Script section,” because I thought that it might be the proper place:

.editor {
  .wrap-guide {
    visibility: hidden;
  }
}

The result was that multiple copies of init.coffee that opened up and wouldn’t close down. I guess this is only an example of having too much power to change things haha. I believe I solved it by finding every instance of the init.coffee and making sure I had gotten rid of the incorrectly placed line of code.

(I will now look into figuring out the actual proper place for said line of code).
Over and Out “Currently” Coding Noob


#11

We’re looking to see if we can reproduce this. So far, no luck. If you can share any more information on your configuration or environment, it could help :grinning: