Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught TypeError: Cannot read property 'replaceChild' of null #510

Open
ChengmingLu opened this issue Aug 11, 2017 · 3 comments
Open

Uncaught TypeError: Cannot read property 'replaceChild' of null #510

ChengmingLu opened this issue Aug 11, 2017 · 3 comments

Comments

@ChengmingLu
Copy link

[Enter steps to reproduce:]

  1. Create AnyName.md, open in Atom
  2. Without quitting Atom, close the file and rename to anything with spaces
  3. Drag the renamed file into Atom
  4. Toggle Markdown Preview
  5. Close the file

Atom: 1.19.0 x64
Electron: 1.6.9
OS: Mac OS X 10.12.6
Thrown From: tabs package 0.106.2

Stack Trace

Uncaught TypeError: Cannot read property 'replaceChild' of null

At /Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:232

TypeError: Cannot read property 'replaceChild' of null
    at PaneAxis.module.exports.PaneAxis.reparentLastChild (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:232:24)
    at PaneAxis.module.exports.PaneAxis.removeChild (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:197:27)
    at /Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:240:30
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:25:20)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:141:34)
    at Pane.module.exports.Pane.destroy (/Applications/Atom.app/Contents/Resources/app/src/pane.js:931:28)
    at Pane.module.exports.Pane.removeItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:650:27)
    at Pane.module.exports.Pane.destroyItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:706:22)
    at TabBarView.module.exports.TabBarView.closeTab (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:340:32)
    at HTMLDivElement.TabView.didClickCloseIcon (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:228:25)

Commands

  3x -0:26.6.0 markdown-preview:toggle (input.hidden-input)

Non-Core Packages


@rsese
Copy link

rsese commented Aug 11, 2017

Thanks for the report! I wasn't able to reproduce with your steps - can you confirm if the error is reproducible in safe mode (atom --safe)?

Also, can you clarify this step?

  1. Without quitting Atom, close the file and rename to anything with spaces

I renamed the file outside of Atom (from the command line specifically), is that what you did too?

@ChengmingLu
Copy link
Author

To clarify step 2, I kept Atom open but closed the file, then I renamed the file from ReadMe.md to something like Read Me First.md and that's basically what step 2 means.

After that I dragged the renamed file to Atom to reopen it. Then I toggled Markdown Preview, nothing happened(preview did not show up). Finally I closed the file again and the error message showed up. Note that after the renamed file has been closed, Atom's title bar showed the filename before it was renamed.

Unfortunately like you said, even I could not reliably reproduce the issue with these steps myself. (Maybe I should not have treated these steps as "steps to reproduce", but "steps that originally caused the issue" rather)

@Ben3eeE
Copy link
Contributor

Ben3eeE commented Aug 11, 2017

@cluster626 Thanks for clarifying. That is really helpful 🙇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants