Closed adamellsworth closed 5 years ago
Can you reproduce this? I sadly am unable to. When I click ctrl, I get the right click menu, and cant drag the tab. When I use cmd, I cant drop it; when I use shift, it works fine. Some questions:
I'm trying to look through the code and figure out where this could go wrong.
It starts off when the tab is clicked. This is the bit at the bottom of the stack:
@on 'click', '.tab', ({target, which}) =>
tab = $(target).closest('.tab')[0]
if which is 1 and not target.classList.contains('close-icon')
@pane.activateItem(tab.item) # << ERROR!
@pane.focus()
false
Pane::activateItem
does nothingItemRegistry
. All panes in a pane container (i.e. a pair of splits) share an ItemRegistry
. So it seems that the first check is failing. How can this happen? Likely activateItem
is called on a pane that the item is not in. I can make this happen on the cmd line. But I am not seeing how this happens from the UI. Maybe the UI is getting out of sync with the model or something.
Hmm. After reloading the windows I get the response you get (menu). It could've been a fluke.
I can reproduce this error with the following sequence (there may be other sequences that also trigger this error, this is just the one that did it for me today)
FWIW, this just happened to me on the latest build (0.210.0) with tabs package 0.81.0.
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:374:25)
at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:362:26
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:326:20)
at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:297:14)
at tabs-tab.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-ul.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (/usr/share/atom/resources/app.asar/src/item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/usr/share/atom/resources/app.asar/src/pane-container.js:374:25)
at /usr/share/atom/resources/app.asar/src/pane-container.js:362:26
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.addItem (/usr/share/atom/resources/app.asar/src/pane.js:326:20)
at Pane.module.exports.Pane.activateItem (/usr/share/atom/resources/app.asar/src/pane.js:297:14)
at tabs-tab.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-ul.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
Just happened to me. OS X 10.10.4, Atom 1.0.2.
/Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:374:25)
at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:362:26
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:333:20)
at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:301:14)
at tabs-tab.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-ul.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
Atom Version: 1.0.2 System: Mac OS X 10.10.3 Thrown From: tabs package, v0.82.0
Uncaught Error: The workspace can only contain one instance of item [object Object]
At /Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:374:25)
at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:362:26
at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:333:20)
at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:301:14)
at tabs-tab.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-ul.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
3x -0:39.1.0 core:move-down (atom-text-editor.editor.is-focused)
-0:38.3.0 core:paste (atom-text-editor.editor.is-focused)
-0:37.1.0 core:select-down (atom-text-editor.editor.is-focused)
-0:36.6.0 core:backspace (atom-text-editor.editor.is-focused)
6x -0:36.1.0 core:move-up (atom-text-editor.editor.is-focused)
-0:34.7.0 core:select-down (atom-text-editor.editor.is-focused)
-0:34.3.0 core:backspace (atom-text-editor.editor.is-focused)
7x -0:33.6.0 core:move-up (atom-text-editor.editor.is-focused)
-0:32.3.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
-0:32.3.0 snippets:expand (atom-text-editor.editor.is-focused)
-0:32.3.0 editor:indent (atom-text-editor.editor.is-focused)
-0:24.1.0 autocomplete-plus:confirm (atom-text-editor.editor.is-focused.autocomplete-active)
-0:24.1.0 snippets:expand (atom-text-editor.editor.is-focused.autocomplete-active)
-0:16.2.0 core:copy (atom-text-editor.editor.is-focused)
2x -0:14.6.0 core:paste (atom-text-editor.editor.is-focused)
-0:10.6.0 core:save (atom-text-editor.editor.is-focused)
{
"core": {
"themes": [
"one-dark-ui",
"monokai"
]
},
"tabs": {
"usePreviewTabs": true
}
}
# User
compass, v0.9.1
emmet, v2.3.12
git-go, v1.0.1
monokai, v0.15.0
tree-view-git-status, v0.1.2
# Dev
No dev packages
Another..
Atom Version: 1.0.3 System: "Manjaro Linux" Thrown From: tabs package, v0.82.0
Uncaught Error: The workspace can only contain one instance of item [object Object]
At /usr/share/atom/resources/app.asar/src/item-registry.js:11
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (/usr/share/atom/resources/app.asar/src/item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/usr/share/atom/resources/app.asar/src/pane-container.js:351:25)
at /usr/share/atom/resources/app.asar/src/pane-container.js:339:26
at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.addItem (/usr/share/atom/resources/app.asar/src/pane.js:337:20)
at Pane.module.exports.Pane.activateItem (/usr/share/atom/resources/app.asar/src/pane.js:305:14)
at tabs-tab.<anonymous> (/usr/share/atom/resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-ul.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
3x -0:08.1.0 tree-view:reveal-active-file (atom-workspace.workspace.scrollbars-visible-always.theme-atom-dark-syntax.theme-atom-dark-ui)
{
"core": {
"disabledPackages": [
"linter-rubocop",
"rsense",
"select-line",
"auto-indent",
"restore-windows",
"symbols-view",
"json-schema",
"linter-tidy"
],
"excludeVcsIgnoredPaths": false,
"projectHome": "/home/anders/Projects",
"themes": [
"atom-dark-ui",
"atom-dark-syntax"
]
},
"tabs": {
"usePreviewTabs": true,
"enableVcsColoring": true
}
}
# User
angularjs, v0.3.0
atom-ctags, v4.1.4
autoclose-html, v0.18.0
autocomplete-modules, v1.0.0
autocomplete-paths, v1.0.2
color-picker, v2.0.11
compare-files, v0.6.2
css-snippets, v0.8.0
ctags-status, v1.3.3
custom-title, v1.0.1
docblockr, v0.7.3
editorconfig, v1.0.1
external-open, v0.6.0
file-icons, v1.6.2
filesize, v0.2.0
flex-tool-bar, v0.4.4
git-log, v0.4.1
go-plus, v3.4.3
highlight-selected, v0.10.1
language-css-plus, v0.3.0
language-groovy, v0.4.0
language-nginx, v0.5.4
language-rspec, v0.3.0
language-svg, v0.8.0
linter, v1.3.0
linter-clang, v3.0.0
linter-csslint, v0.0.14
linter-htmlhint, v0.0.17
linter-javac, v0.1.4
linter-jscs, v2.0.4
linter-jshint, v1.1.4
linter-jsonlint, v0.1.4
linter-less, v2.0.3
linter-ruby, v0.1.6
linter-scss-lint, v2.0.0
linter-xmllint, v0.0.7
local-history, v3.2.3
markdown-scroll-sync, v0.4.0
minimap, v4.12.1
minimap-bookmarks, v0.1.0
minimap-color-highlight, v4.1.4
minimap-find-and-replace, v4.2.0
minimap-git-diff, v4.1.7
minimap-highlight-selected, v4.3.0
minimap-selection, v4.3.0
pigments, v0.9.3
pretty-json, v0.4.1
project-manager, v1.15.11
regex-railroad-diagram, v0.8.3
rspec-snippets, v0.4.0
svg-preview, v0.6.1
symbols-tree-view, v0.9.3
sync-settings, v0.6.0
synced-sidebar, v0.4.0
tabclick, v0.1.0
tabs-to-spaces, v0.11.0
tool-bar, v0.1.8
tool-bar-main, v0.0.8
trailing-spaces, v0.3.2
zentabs, v0.8.6
# Dev
No dev packages
Atom Version: 1.0.8 System: Microsoft Windows 10 Home Thrown From: tabs package, v0.82.0
Uncaught Error: The workspace can only contain one instance of item [object Object]
At C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\src\item-registry.js:11
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\src\item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\src\pane-container.js:351:25)
at C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\src\pane-container.js:339:26
at Emitter.module.exports.Emitter.emit (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\node_modules\event-kit\lib\emitter.js:82:11)
at Pane.module.exports.Pane.addItem (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\src\pane.js:345:20)
at Pane.module.exports.Pane.activateItem (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\src\pane.js:313:14)
at tabs-tab.<anonymous> (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\node_modules\tabs\lib\tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\node_modules\jquery\dist\jquery.js:4435:9)
at space-pen-ul.elemData.handle (C:\Users\username\AppData\Local\atom\app-1.0.8\resources\app.asar\node_modules\jquery\dist\jquery.js:4121:28)
{
"core": {
"disabledPackages": [
"archive-view",
"autoflow",
"autosave",
"background-tips",
"encoding-selector",
"image-view",
"incompatible-packages",
"open-on-github",
"release-notes",
"spell-check",
"styleguide",
"welcome",
"wrap-guide",
"feedback"
],
"themes": [
"one-light-ui",
"fizzy"
]
},
"tabs": {
"usePreviewTabs": true
}
}
# User
file-icons, v1.6.9
fizzy, v0.16.0
language-javascript, v0.91.0
language-sourcepawn, v0.5.0
linter, v1.4.3
one-light-ui, v1.0.3
pdf-view, v0.23.0
travis-ci-status, v0.16.0
# Dev
No dev packages
Hey y'all!
I got this error too when I was editing my local instance of the GitHub help-docs site. I opened Atom from the terminal and tried to close open tabs of files I had worked on from a different branch. The last two open tabs were from a different branch where I had changed the file names and when I tried to close the first one I got this error: Uncaught Error: Emitter has been disposed #7720
When I tried to close the second tab I got this error: #97
@izuzak @benogle @github/docs
When I open atom from the terminal in a new branch shouldn't I automatically get a fresh version of these files? Or have the tabs update themselves or close? Or do I need to make sure I close all the files I've worked on from other branches? I keep accidentally committing changes from other branches and I think it might be because I am misusing Atom (didn't get these errors with Sublime somehow though).
In case the following info is helpful: Atom Version: 1.0.19 System: Mac OS X 10.10.4 Thrown From: tabs package
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/src/pane-container.js:351:25)
at /Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/src/pane-container.js:339:26
at Emitter.module.exports.Emitter.emit (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.addItem (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/src/pane.js:345:20)
at Pane.module.exports.Pane.activateItem (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/src/pane.js:313:14)
at tabs-tab.<anonymous> (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-ul.elemData.handle (/Users/jmarlena/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
Hey, @jmarlena :wave: :octocat:
I'm not quite sure I understand what you're doing or trying to do. Could I trouble you to write down the exact steps of what you did (list of Git commands and actions in Atom) which reproduce this problem for you or describe your workflow, and also explain in what way exactly Atom isn't behaving as you expected when you perform some of those actions or run Git commands? Being as precise as possible would be helpful. Thanks! :purple_heart:
There are two errors here strung together. The second error is pasted in after the end of the bug report and the reproduction steps are immediately following these.
Atom Version: 1.0.19 System: Mac OS X 10.10.5 Thrown From: tabs package, v0.84.0
Uncaught Error: The workspace can only contain one instance of item [object Object]
At /Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11
Error: The workspace can only contain one instance of item [object Object]
at ItemRegistry.module.exports.ItemRegistry.addItem (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/pane-container.js:351:25)
at /Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/pane-container.js:339:26
at Emitter.module.exports.Emitter.emit (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
at Pane.module.exports.Pane.addItem (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/pane.js:345:20)
at Pane.module.exports.Pane.activateItem (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/pane.js:313:14)
at tabs-tab.<anonymous> (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
at space-pen-ul.jQuery.event.dispatch (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
at space-pen-ul.elemData.handle (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)
{
"core": {}
}
# User
No installed packages
# Dev
No dev packages
Here is the second error
Atom Version: 1.0.19 System: Mac OS X 10.10.5 Thrown From: Atom Core
Uncaught Error: Emitter has been disposed
At /Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:34
Error: Emitter has been disposed
at Emitter.module.exports.Emitter.on (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:34:15)
at GutterContainer.module.exports.GutterContainer.onDidAddGutter (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/gutter-container.js:81:27)
at TextEditor.module.exports.TextEditor.onDidAddGutter (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor.js:514:35)
at TextEditorPresenter.module.exports.TextEditorPresenter.observeModel (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-presenter.js:251:39)
at new TextEditorPresenter (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-presenter.js:50:12)
at new TextEditorComponent (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:106:24)
at atom-text-editor.TextEditorElement.mountComponent (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:178:24)
at atom-text-editor.TextEditorElement.attachedCallback (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/text-editor-element.js:96:14)
at atom-pane.PaneElement.activeItemChanged (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/src/pane-element.js:150:24)
at Emitter.module.exports.Emitter.emit (/Users/marcopariente-cohen/Downloads/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
2x -0:08.7.0 pane:show-next-item (atom-text-editor.editor.is-focused)
{
"core": {},
"editor": {
"invisibles": {},
"fontSize": 15
}
}
# User
No installed packages
# Dev
No dev packages
No reports after 2015.
Uncaught Error: The workspace can only contain one instance of item [object Object]
Atom Version: 0.157.0 System: Mac OS X 10.10.1 Thrown From: tabs package, v0.57.0
Steps To Reproduce
Uncaught TypeError: Cannot read property 'getUri' of undefined
Stack Trace
/cc @atom/core