Skip to content
This repository was archived by the owner on Aug 24, 2018. It is now read-only.
This repository was archived by the owner on Aug 24, 2018. It is now read-only.

Error thrown when attempting to split panes on about screen #30

Closed

Description

@Conduitry
  1. Open the About screen
  2. Run a "Pane: Split (direction) And Copy Active Item" command

Atom Version: 1.7.4
System: Microsoft Windows 8.1 Enterprise
Thrown From: Atom Core

Stack Trace

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

At ...\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 (...\Atom\resources\app.asar\src\item-registry.js:11:15)
    at PaneContainer.module.exports.PaneContainer.addedPaneItem (...\Atom\resources\app.asar\src\pane-container.js:387:25)
    at ...\Atom\resources\app.asar\src\pane-container.js:366:19
    at ...\Atom\resources\app.asar\src\pane-container.js:97:16
    at Function.module.exports.Emitter.simpleDispatch (...\Atom\resources\app.asar\node_modules\event-kit\lib\emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (...\Atom\resources\app.asar\node_modules\event-kit\lib\emitter.js:125:28)
    at PaneContainer.module.exports.PaneContainer.didAddPane (...\Atom\resources\app.asar\src\pane-container.js:306:27)
    at Pane.module.exports.Pane.setContainer (...\Atom\resources\app.asar\src\pane.js:125:26)
    at PaneAxis.module.exports.PaneAxis.addChild (...\Atom\resources\app.asar\src\pane-axis.js:144:13)
    at PaneAxis.module.exports.PaneAxis.insertChildAfter (...\Atom\resources\app.asar\src\pane-axis.js:216:19)
    at Pane.module.exports.Pane.split (...\Atom\resources\app.asar\src\pane.js:895:23)
    at Pane.module.exports.Pane.splitRight (...\Atom\resources\app.asar\src\pane.js:856:19)
    at atom-pane.commandRegistry.add.pane:split-right-and-copy-active-item (...\Atom\resources\app.asar\src\register-default-commands.js:247:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (...\Atom\resources\app.asar\src\command-registry.js:260:29)
    at ...\Atom\resources\app.asar\src\command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (...\Atom\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:580:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (...\Atom\resources\app.asar\node_modules\atom-keymap\lib\keymap-manager.js:388:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (...\Atom\resources\app.asar\src\window-event-handler.js:98:36)
    at HTMLDocument.<anonymous> (...\Atom\resources\app.asar\src\window-event-handler.js:3:61)

Activity

  1. winstliu commented on Jun 5, 2016

    @winstliu
    Contributor

    Confirmed on Windows 10 x64, Atom 1.9.0-dev-6991246.

  2. damieng commented on Aug 22, 2016

    @damieng
    Contributor

    Am not able to reproduce on master (1.11) on Windows 10.

  3. winstliu commented on Aug 23, 2016

    @winstliu
    Contributor

    Still happens to me on 1.11.0-dev-080f1d3.

  4. mnquintana commented on Aug 23, 2016

    @mnquintana
    Contributor

    Yeah, this is a weird one – this seems like an error the ItemRegistry should just silently handle, instead of putting the onus on API consumers to check whether an instance already exists in the workspace. 😕 Pretty much all of Atom's view packages are prone to this, although I think at least find-and-replace has a workaround.

  5. damieng commented on Aug 23, 2016

    @damieng
    Contributor

    I can't think of a scenario where two copies of About makes any sense. I'm more worried you can do this to settings-view and end up with two copies that immediately get out of sync as you make changes.

    I think it would make most sense for items to opt-in to the copy behavior if they have been written to support it correctly. I think by default we'd include our TextEditor and perhaps Image-View and Archive-View.

  6. maxbrunsfeld commented on Sep 23, 2017

    @maxbrunsfeld
    Contributor

    Fixed via atom/tabs#522.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions