smashwilson / merge-conflicts

Resolve git merge conflicts in Atom
https://atom.io/packages/merge-conflicts
MIT License
432 stars 42 forks source link

Uncaught Error: Can't save destroyed buffer #268

Closed guilhermejcgois closed 7 years ago

guilhermejcgois commented 7 years ago

[Enter steps to reproduce:]

  1. Open a conflicted file, select one change
  2. Closes the atom tab without save the changes (leave the merge-conflicts dialog open)
  3. Come back to conflicted file (by conflicts panel)
  4. Do another changes (not required) and stage the file by the new dialog
  5. The previous dialog still showing, and if you hit stage, probably will get that error (and the dialog still showed)

Atom: 1.16.0 ia32 Electron: 1.3.13 OS: Microsoft Windows 10 Pro Thrown From: merge-conflicts package 1.4.4

Stack Trace

Uncaught Error: Can't save destroyed buffer

At C:\Users\Guilherme.Gois.IPORANGA\AppData\Local\atom\app-1.16.0\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:1064

Error: Can't save destroyed buffer
    at TextBuffer.module.exports.TextBuffer.saveAs (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1064:15)
    at TextBuffer.module.exports.TextBuffer.save (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1058:19)
    at TextEditor.module.exports.TextEditor.save (/app.asar/src/text-editor.js:920:26)
    at ResolverView.resolve (/packages/merge-conflicts/lib/view/resolver-view.coffee:60:29)
    at /packages/merge-conflicts/node_modules/space-pen/lib/space-pen.js:220:36)
    at HTMLButtonElement.dispatch (/packages/merge-conflicts/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/packages/merge-conflicts/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -0:39.3.0 core:undo (input.hidden-input)
  2x -0:32.7.0 linter:lint (atom-text-editor.editor.conflicted.is-focused)
  2x -0:27.5.0 core:select-left (input.hidden-input)
     -0:26.5.0 core:paste (input.hidden-input)
     -0:22.2.0 linter:lint (atom-text-editor.editor.conflicted)

Non-Core Packages

angular-2-typeScript-snippets 0.6.3 
atom-beautify 0.29.17 
atom-typescript 10.1.14 
editor-stats 0.17.0 
editorconfig 2.2.1 
file-icons 2.0.15 
linter 1.11.23 
linter-tslint 0.13.1 
merge-conflicts 1.4.4 
minimap 4.26.8 
guilhermejcgois commented 7 years ago

I think that the merge-conflicts dialog (if this isn't the name, sorry) needs to be auto-closed in that cases, by the way isn't explicited the file that will be staged...

smashwilson commented 7 years ago

:wave: Thanks for taking the time to file an issue here! Unfortunately, this repository is being deprecated, so I won't be getting to this one here.

This one should be taken care of by the new git and GitHub package for Atom. If you see something similar there, please file an issue to let us know. Thanks 🙇