oggy / tab-switcher

Like a window switcher for your Atom tabs.
MIT License
23 stars 11 forks source link

Uncaught Error: The workspace can only contain one instance of item [object Object] #39

Closed Dagrut closed 8 years ago

Dagrut commented 8 years ago

Hello!

I just encountered a bug with this plugin. I have the option reorderTabs which is checked (by the way, GREAT IDEA!) which seems to be the cause of it. When I open the settings window (apple key + comma), it opens, but the same tab is still selected. If I ctrl+tab, it crashes while the settings are open, it crashes. If I close it (apple key + w), it may or may not crash too (I met both cases).

When unchecking reorderTabs, it does not crash anymore. For now, it only happened with the settings tab.

Below are informations auto-filled by atom bug report system :

Atom Version: 1.7.2 System: Mac OS X 10.11.4 Thrown From: tab-switcher package, v1.4.0

Stack Trace

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:387:25)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:372:28
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at Pane.module.exports.Pane.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:485:20)
    at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:428:14)
    at TabList.module.exports.TabList.select (/Users/max/.atom/packages/tab-switcher/lib/tab-list.coffee:155:17)
    at atom-workspace.disposable.add.atom.commands.add.tab-switcher:select (/Users/max/.atom/packages/tab-switcher/lib/tab-switcher.coffee:60:60)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:52.1.0 tab-switcher:select (ol.tab-switcher-tab-list)
     -0:51.5.0 tab-switcher:next (atom-text-editor.editor.is-focused)
     -0:51.5.0 tab-switcher:select (ol.tab-switcher-tab-list)
     -0:49.8.0 tab-switcher:next (atom-text-editor.editor.is-focused)
     -0:48.8.0 tab-switcher:select (ol.tab-switcher-tab-list)
     -0:48.2.0 tab-switcher:next (atom-text-editor.editor.is-focused)
     -0:48 tab-switcher:select (ol.tab-switcher-tab-list)
     -0:42.7.0 settings-view:open (atom-text-editor.editor.is-focused)
  3x -0:34.4.0 core:backspace (atom-text-editor#tab-switcher.fadeInDelay.editor.mini.is-focused)
     -0:33.2.0 core:confirm (atom-text-editor#tab-switcher.fadeInDelay.editor.mini.is-focused)
     -0:26.7.0 core:close (div.package-detail.panels-item)
     -0:07.3.0 settings-view:open (atom-text-editor.editor.is-focused)
     -0:06.4.0 tab-switcher:next (div.package-detail.panels-item)
     -0:06.3.0 tab-switcher:select (ol.tab-switcher-tab-list)
     -0:05.8.0 tab-switcher:next (atom-text-editor.editor.is-focused)
     -0:05.7.0 tab-switcher:select (ol.tab-switcher-tab-list)

Config

{
  "core": {},
  "tab-switcher": {
    "fadeInDelay": 1,
    "reorderTabs": true
  }
}

Installed Packages

# User
build, v0.59.0
single-click-open, v0.2.1
tab-switcher, v1.4.0
terminal-plus, v0.14.5

# Dev
No dev packages