jasongilman / proto-repl

A Clojure Development Environment package for the Atom editor
https://atom.io/packages/proto-repl
MIT License
563 stars 50 forks source link

Proto REPL prevents Atom from starting if Atom was last closed with multiple REPL tabs #255

Open WalterGR opened 7 years ago

WalterGR commented 7 years ago

Using:

This may be related to #254 - "Restarting Atom in a Lein project dir when a REPL tab is open causes strange behavior".

Repro steps:

The initial repro steps are the same as in #254.

  1. Start Atom in a Leiningen project directory using atom .
  2. Open a REPL using the Proto REPL: Toggle command.
  3. Exit Atom.
  4. Start Atom again as in step 1.
  5. (As described in #254, the tab that was previously titled "Proto-REPL" is now titled "Console". Additionally, the REPL session history is gone.)
  6. Open a REPL again as in step 2.
  7. (As described in #254, a new pane is opened with a "Proto-REPL" tab. The pane with the "Console" tab remains - and the REPL is loaded into it rather than the new "Proto-REPL" tab.)
  8. The above repro steps are the same as in #254. New steps follow.
  9. Exit Atom.
  10. Start Atom again as in step 1.

Expected:

Atom starts properly.

Actual:

Atom starts. The title of the Atom window is fine. The body of the Atom window is the proper dark grey color. (The color may depend on the theme...) But nothing else happens. No panes are restored. The body of the window is never populated.

Exit Atom.

Start Atom again as in step 1. Same failed launch behavior. Exit Atom.

Start it again using Spotlight. Same failed launch behavior. Exit Atom.

Start it again in a different directory using atom . . Atom launches properly. Exit Atom.

Return to the directory from which Atom was started in step 1. Start it again as in step 1. Same failed launch behavior as above.

So it would seem that the repro steps corrupt the Atom project for that directory in some way.

Once that corruption happens, one of the following are required to successfully start Atom in that project directory:

Based on my testing, the corruption happens only when both the "Console" tab and "Proto-REPL" tab are open when Atom was closed. Exiting Atom and starting it again with only one of those tabs open does not lead to corruption.

WalterGR commented 7 years ago

Potential data loss:

If there are unsaved changes to one or more files when Atom is exited in step 9, starting Atom using --clear-window-state will result in those unsaved changes being lost.

(Based on my brief testing, starting Atom with --safe does not seem to result in data loss.)