Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Splitting/Closing panes results in crash #10903

Closed

Description

@j-moeller

Prerequisites

Description

Error:Pane has been destroyed
    at Pane.module.exports.Pane.activate (C:\Users\XXXXXX\Atom\resources\app.asar\src\pane.js:631:15)
    at Pane.module.exports.Pane.focus (C:\Users\XXXXXX\Atom\resources\app.asar\src\pane.js:207:21)
    at atom-pane.<anonymous> (C:\Users\XXXXXX\Atom\resources\app.asar\src\pane-element.js:50:23)

Steps to Reproduce

  1. Start with only one pane
  2. On the pane: Right click > Split Left
  3. On the right pane: Right click > Split Down
  4. On the left pane: Right click > Close Pane
  5. On the upper pane: Right click > Split Down
  6. On the lower pane: Right click > Close Pane

Expected behavior: [What you expected to happen]

  1. After step 5: There are supposed to be three horizontal panes
  2. After step 6: There are supposed to be two horizontal panes (the two upper ones)

Actual behavior: [What actually happened]

  1. After step 5: There are (still) only two panes
  2. After step 6: The pane is not closed properly (the tab bar remains or the "empty" background is shown)

Version

1.5.3 (atom-windows.zip) on Windows 7

Activity

  1. robinki commented on Feb 19, 2016

    @robinki

    I can confirm this error occurs on version 1.5.3 on Windows 7.

  2. arthur-e commented on Feb 25, 2016

    @arthur-e

    Reproduced on 1.5.3 on Ubuntu GNU/Linux, 14.04-3, 64-bit, in safe mode. Atom did not crash but the "Actual behavior" was the same.

  3. winstliu commented on Feb 25, 2016

    @winstliu
    Contributor

    I'm currently looking into this.

  4. self-assigned this
    on Feb 25, 2016
  5. winstliu commented on Feb 26, 2016

    @winstliu
    Contributor

    So after some investigation here's some info I discovered:
    The problems start occurring after closing the original pane, step 4. Any new panes (including left, right, top, whatever) you try to add do not show up, but they still are created, just not added to the DOM (you can verify this by logging atom.workspace.getPanes() in the dev tools console, then looking at the current element structure). Reloading Atom will cause the issue to correct itself. Closing both panes will cause the third hidden one to suddenly show up.

    Now all that's left to do is figure out why that's happening...

    Here's my repro steps.

    1. Start with one file in one pane.
    2. Split the file in any direction.
    3. Split any of the two file in a perpendicular direction to the other two panes (so if the first split was a horizontal one this one has to be vertical).
    4. Close the pane that only has one tab in it.
    5. Attempting to further split a pane in any direction in either of the two panes will not show the new pane.
    6. Close one of the panes through the Close Pane command.
    7. Note that the pane was not destroyed.
    8. Attempt to close the pane by closing the blank tab and observe this error.
  6. winstliu commented on Feb 26, 2016

    @winstliu
    Contributor

    More info:
    When in this setup, after closing the original pane (step 4), the subscriptions to pane-axis-element.coffee get disposed twice, compared to just once when in a parallel setup. What ends up happening is we seem to also dispose of the subscriptions of the two remaining panes instead of just the closed one, so that we miss the onDidAddChild callback and don't get to add the new split pane to the DOM.

    This could just be a red herring; I'm not confident that different subscriptions are being disposed each time. I'll continue looking into it tomorrow.

  7. winstliu commented on Feb 27, 2016

    @winstliu
    Contributor

    I can now confirm that the subscriptions are being disposed for both the destroyed pane and the remaining panes when this bug occurs. Since this only happens with the perpendicular pane structure my intuition tells me that there's a bug somewhere in replaceChild and friends.

  8. lock commented on Apr 10, 2018

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  9. locked and limited conversation to collaborators on Apr 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions