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.

Atom editor crashes with external change to network share #6974

Closed

Description

@Arcanemagus

It seems that Atom.io has issues with monitoring network shares on Windows. When an external change is made to the directory structure (new / deleted file) Atom's editor crashes.

OS: Windows 7 x64 Enterprise
Atom: 0.201.0

Running atom with the --safe option still exhibits this behavior.
No errors are logged to the console, although it is still responsive.

image

Clicking Reload on the dialog makes the editor work perfectly fine, until another change is made to the directory 😉.

A Process Monitor log of the application while crashing, as well as Atom's .dmp output can be found here:
https://drive.google.com/folderview?id=0BwNHIQX2XG-lfmNmY2s5aDdvY2RVblpCa2k4WjlqRDRXYTNrbzFOdXphb2cyYnZETl9XRW8&usp=sharing

Occasionally Atom will not crash, but when this happens it seems it is no longer monitoring the network share as changes are not shown in the tree and new files created within Atom do not even show up in the tree.

If there is any further debugging information or steps you would like me to take please let me know.

Activity

  1. patrickurban commented on Aug 27, 2015

    @patrickurban

    I have the same problem and I looked a little bit more into it, I hope this information helps (and is relevant):

    OS: Windows 7 x64 Enterprise
    Atom: 1.0.7

    Activating 'Pause On Caught Expression' catches an error while trying to save the file 'some.txt' in Z:\some\folder (Z:\ is a network share):

    : Error: EEXIST: file already exists, mkdir 'Z:\some\folder'
    code: "EEXIST"
    errno: -4075
    message: "EEXIST: file already exists, mkdir 'Z:\some\folder'"
    path: "Z:\some\folder"
    stack: (...)

    get stack: function () { [native code] }
    set stack: function () { [native code] }
    syscall: "mkdir"

    and the call stack at this point is:

    fs.mkdirSync (fs.js:791)
    sync (…us\node_mo…:55)
    fsPlus.writeFileSync (…s\lib\fs-…:278)
    module.exports.File.writeFileSync (…tcher\lib…:273)
    module.exports.File.writeFileWithPrivilegeEscalationSync (…tcher\lib…:371)
    module.exports.File.writeSync (…tcher\lib…:345)
    module.exports.TextBuffer.saveAs (…ffer\lib…:1011)
    module.exports.TextBuffer.save (…uffer\lib…:992)
    module.exports.TextEditor.save (…-editor.js:579)
    module.exports.Pane.saveItem (…rc\pane.js:539)
    module.exports.Pane.saveActiveItem (…rc\pane.js:522)
    module.exports.Workspace.saveActivePaneItem (…rkspace.js:609)
    atom.commands.add.core:save (…element.js:293)
    module.exports.CommandRegistry.handleCommandEvent (…egistry.js:241)
    (anonymous function) (…-registry.js:3)
    module.exports.KeymapManager.dispatchCommandEvent (…eymap\lib…:524)
    module.exports.KeymapManager.handleKeyboardEvent (…eymap\lib…:347)
    module.exports.WindowEventHandler.onKeydown (…handler.js:177)

    It seems like the error should be caught in the path-watcher module at writeFileWithPrivilegeEscalationSync but is not processed and therefore thrown again.

    Please let me know if you need any more information!

  2. irishxpride commented on Sep 3, 2015

    @irishxpride

    Having the same issue occurs with or without the --safe flag.

    OS: Windows 7 x64 Enterprise
    Atom: 1.0.11

    what information can I provide to assist?

  3. cliberatore commented on Sep 7, 2015

    @cliberatore

    I'm getting precisely the same thing on my work machine. Windows 7 x64 Enterprise, Atom 1.0.11. Editor crashes when saving to a mapped network drive.

  4. Arcanemagus commented on Sep 8, 2015

    @Arcanemagus
    ContributorAuthor

    @patrickurban @irishxpride @cliberatore Although the root cause is probably in the same area, this isn't an issue about saving files on a network share, but rather changes to the contents of the share external to Atom causing Atom to crash. (Like creating a new file in your file browser.)

    Since #8355 mentioned that there is different behaviour based on the server of the share (works on Windows and "Linux", crashes on OS X Samba share), I feel I should mention that this happens on a Dell Compellent backed share. I'm pretty sure I noticed this on my FreeNAS backed share at home as well, but can test again if needed.

    I have absolutely no experience with the core Atom code so I'm not even sure where to look to try to debug this further myself 😞.

  5. irishxpride commented on Sep 8, 2015

    @irishxpride

    I believe this may yet be related. Atom does not crash the first time I save a newly created file, only when i save changes to an existing file. I did not think to test this until your comment.

  6. patrickurban commented on Sep 14, 2015

    @patrickurban

    @Arcanemagus I think you are right. Atom doesn't actually crash on the caught expression (at least not immediately).
    I also found an interesting bit of information in the node.js documentation (more precisely in the documentation for the fs module):

    The fs.watch API is not 100% consistent across platforms, and is unavailable in some situations.
    (...)
    On Windows systems, this feature depends on ReadDirectoryChangesW.

    If the underlying functionality is not available for some reason, then fs.watch will not be able to function. For example, watching files or directories on network file systems (NFS, SMB, etc.) often doesn't work reliably or at all.

    node-pathwatcher seems to do similar things (see here)
    If that is the case, then this is probably hard to fix.

    There is a mention in node's fs api to use fs.watchfile instead of fs.watch, since it doesn't use platform-specific tools, but there seem to be some drawbacks as well and I would guess it would be hard to change anyway. 😞

  7. leftdevel commented on Dec 16, 2015

    @leftdevel

    Happening to me on Mac OSX (Yosemite) + vagrant box. I can't even open a file. No matter what, Atom will crash :(

  8. lafener commented on Dec 17, 2015

    @lafener

    Always crash when I try to open a file in the network share.

  9. Arcanemagus commented on Dec 17, 2015

    @Arcanemagus
    ContributorAuthor

    @leftdevel @lafener although the code causing the issues are probably related, it doesn't sound like you are seeing the same thing. This issue is about an external program editing a file on a network share that is already open in Atom, which causes it to crash on Windows.

    (Or at least used to, haven't tested this in a while.)

  10. stewhouston commented on Feb 5, 2016

    @stewhouston

    Happening to me while using a shared/mounted directory on a local linux VM. It crashes about once every 15 minutes, always when clicking or editing in the file tree.

  11. cloim commented on Feb 23, 2016

    @cloim

    Happening to me on Mac OS X (El Capitan) SMB + Windows 10 Network Drive Share. When I change OS X's folders or files, It's crash on windows. Reload Dialog is show up, But, It's not work sometimes. So, I just close Atom and relaunch.

  12. Arcanemagus commented on Feb 29, 2016

    @Arcanemagus
    ContributorAuthor

    @cloim What version of Atom are you using? I just tried to reproduce on v1.6.0-beta5 and was unable to.

  13. stewhouston commented on Feb 29, 2016

    @stewhouston

    Just wanted to chime in; not sure if there have been any patches released recently or something small has changed on my end, but the editor has been completely stable for the past few weeks. (Windows fs share on a Ubuntu VM.)

  14. 1 remaining item

  15. stelcheck commented on Mar 18, 2016

    @stelcheck

    Same for me, Windows 10 mounting an OS X shared samba. Additionally, I noticed that trying to delete files from the explorer would fail, which I assume must have something to do with the current issue.

  16. Makeshift commented on Apr 6, 2016

    @Makeshift

    Still an active problem for me running Win10 x64, atom 1.6.2 with a samba share from an ubuntu host. It most obviously crashes when I change network (and the share swaps into offline mode) but also seems to crash when Windows is trying to back up that location.

  17. giacomocarra commented on Apr 7, 2016

    @giacomocarra

    Same problem for me. I'm running Atom 1.6.2 on Windows10 and Yosemite OSX on the server. I use an ssh connection between client and server. When I change something in my file browser, Atom crashes and I have always to reload it. Then it works fine until I made a new change.

  18. barchstien commented on Apr 26, 2016

    @barchstien

    same for me Atom 1.7.2, often crashes, or does not load changes done outside Atom for network mounted folders. Loading very short documents takes also a long time
    Using Ubuntu 16.04, folder mounted is on a Ubuntu 14.04 machine

  19. pgouv commented on Sep 8, 2016

    @pgouv

    Using latest I cant even open . Before had issues with files not updating but I could work. Now nothing

  20. matjam commented on Feb 27, 2017

    @matjam

    1.14.3 still crashing. Windows 10 mounting OS X smb share.

  21. maxwellsmart84 commented on Mar 26, 2017

    @maxwellsmart84

    This is still happening to me as well - I am sharing the file on macOS 10.12.3 and accessing over SMB from Windows 10. I cannot even get Atom to start when loading this project.

  22. matjam commented on Apr 3, 2017

    @matjam

    The only workaround that works for me is to disable the git plugin in Atom. Seems to help.

  23. marthongt commented on Apr 14, 2017

    @marthongt

    kinda similar issue here
    Windows 10 Enterprise accessing files on Novell share with atom 1.16.0

    The odd part is that I can open a file amend it and if I try to save the changes with the shortcut (ctrl+s) than atom is crashing. But if I save the file by clicking on File > Save or even Save As... than it works.

    I do use additional atom packages and none them have been disabled
    sadly ctrl+s is muscle memory for me so it's more like an annoyance and not an issue

  24. stale commented on Apr 14, 2018

    @stale

    Thanks for your contribution!

    This issue has been automatically marked as stale because it has not had recent activity. Because the Atom team treats their issues as their backlog, stale issues are closed. If you would like this issue to remain open:

    1. Verify that you can still reproduce the issue in the latest version of Atom
    2. Comment that the issue is still reproducible and include:
      • What version of Atom you reproduced the issue on
      • What OS and version you reproduced the issue on
      • What steps you followed to reproduce the issue

    Issues that are labeled as triaged will not be automatically marked as stale.

  25. Arcanemagus commented on Apr 14, 2018

    @Arcanemagus
    ContributorAuthor

    Closing this issue as I can no longer reproduce this. If anyone is seeing similar behavior please file a new issue, and include which filesystem watcher you are using in Atom when filing the issue, thanks!

  26. lock commented on Oct 11, 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!

  27. locked as resolved and limited conversation to collaborators on Oct 11, 2018
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