Uncaught Error: Can't save destroyed buffer
Opened this issue · 10 comments
[Enter steps to reproduce:]
- ...
- ...
Atom: 1.14.0 x64
Electron: 1.3.13
OS: Mac OS X 10.12.2
Thrown From: autosave package 0.24.0
Stack Trace
Uncaught Error: Can't save destroyed buffer
At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:1045
Error: Can't save destroyed buffer
at TextBuffer.module.exports.TextBuffer.saveAs (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1055:15)
at TextBuffer.module.exports.TextBuffer.save (/app.asar/node_modules/text-buffer/lib/text-buffer.js:1049:19)
at TextEditor.module.exports.TextEditor.save (/app.asar/src/text-editor.js:890:26)
at Pane.module.exports.Pane.saveItem (/app.asar/src/pane.js:753:18)
at Pane.saveItem (/app.asar/src/pane.js:3:59)
at Object.autosavePaneItem (/app.asar/node_modules/autosave/lib/autosave.js:71:21)
at Object.autosaveAllPaneItems (/app.asar/node_modules/autosave/lib/autosave.js:82:27)
at /app.asar/node_modules/autosave/lib/autosave.js:29:26
Commands
-2:29.2.0 core:backspace (input.hidden-input)
-1:39.6.0 editor:toggle-line-comments (input.hidden-input)
-1:39.3.0 core:save (input.hidden-input)
-1:10 core:move-down (input.hidden-input)
-1:08.9.0 core:move-up (input.hidden-input)
2x -1:05.1.0 core:undo (input.hidden-input)
-0:58.7.0 core:save (input.hidden-input)
-0:44.2.0 core:copy (input.hidden-input)
-0:44 find-and-replace:show (input.hidden-input)
-0:43.8.0 core:paste (input.hidden-input)
-0:40.6.0 core:copy (input.hidden-input)
-0:40.3.0 find-and-replace:show (input.hidden-input)
-0:40.1.0 core:paste (input.hidden-input)
-0:39.2.0 core:undo (input.hidden-input)
2x -0:36.8.0 core:copy (input.hidden-input)
-0:30.4.0 find-and-replace:show (input.hidden-input)
Non-Core Packages
aesthetic-ui 2.0.0
atom-beautify 0.29.17
atom-pair 2.0.10
genesis-syntax 1.0.9
genesis-ui 0.5.0
git-blame 0.4.11
git-plus 7.2.2
linter 1.11.21
linter-eslint 8.1.0
linter-scss-lint 3.0.4
minimap 4.26.8
monokai-seti 0.7.0
platformio-ide-terminal 2.2.2
redmond-syntax 1.0.2
seti-syntax 1.0.1
seti-ui 1.6.0
tab-limit 0.2.1
terminal-plus 0.14.5
could reproduce in atom 1.16.0-beta0
closing open files (opened in previous session of project) right after editor launch does throw this issue for me
- open project
- open some files
- leave files opened
- close all atom instances
- launch atom
- close files you opened in previous session
I have this same issue. But its in combination with Scratch package: https://github.com/destradax/scratch
Steps to reproduce:
- Install Scratch atom package
- Toggle scratch on, put some text in there
- Toggle scratch off
You should see the error
Hmmm, still not able to reproduce with your steps @ozo2003 - do you see the error in safe mode? Also, if you haven't yet updated to 1.16.0 stable, can you do that as well?
@tnypxl - thanks, I'm able to reproduce with those steps (though I additionally have to choose Save when prompted to save changes or not after your step 3).
Stack Trace
Uncaught Error: Can't save destroyed buffer
At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:1045
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 Pane.module.exports.Pane.saveItem (/app.asar/src/pane.js:753:18)
at Pane.saveItem (/app.asar/src/pane.js:3:59)
at Object.autosavePaneItem (/app.asar/node_modules/autosave/lib/autosave.js:71:21)
at /app.asar/node_modules/autosave/lib/autosave.js:32:28
at /app.asar/src/pane-element.js:152:25)
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:141:28)
at Pane.module.exports.Pane.setActiveItem (/app.asar/src/pane.js:300:22)
at Pane.module.exports.Pane.activateItemAtIndex (/app.asar/src/pane.js:435:19)
at Pane.module.exports.Pane.activatePreviousItem (/app.asar/src/pane.js:400:21)
at Pane.module.exports.Pane.removeItem (/app.asar/src/pane.js:585:16)
at /app.asar/src/pane.js:483:26
at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:141:28)
at TextEditor.module.exports.TextEditor.destroyed (/app.asar/src/text-editor.js:579:20)
at TextEditor.module.exports.Model.destroy (/app.asar/src/model.js:31:58)
at Object.closeScratchEditor (/packages/scratch/lib/scratch.js:96:17)
at Object.toggleScratch (/packages/scratch/lib/scratch.js:69:9)
at /packages/scratch/lib/scratch.js:36:33)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
at /app.asar/src/command-registry.js:3:59
at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:599:16)
at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:390:22)
at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/app.asar/src/window-event-handler.js:106:36)
at /app.asar/src/window-event-handler.js:3:59)
Commands
-2:46.3.0 settings-view:open (input.hidden-input)
-2:37.1.0 core:confirm (input.hidden-input)
-2:13.5.0 pane:show-item-1 (div.package-detail.panels-item)
-2:07.6.0 command-palette:toggle (input.hidden-input)
-2:02.5.0 editor:consolidate-selections (input.hidden-input)
-2:02.5.0 core:cancel (input.hidden-input)
4x -1:59 scratch:toggle (input.hidden-input)
Not sure if that would be more of a https://github.com/destradax/scratch issue but I'll triage as a bug for now.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.