Unfortunately Geany has huge problems with built-in SFTP over Nautilus/Nemo. It hangs, freezes and/or suddenly closes. I can't really say why, since I even used `TCPKeepAlive` to keep the sessions alive, but this doesn't fix the problems.
Does Geany even support using it that way?
Essentially Geany does not know it is using anything over sftp, if just reads files, and the sftp has to be mounted so it appears as a file.
It therefore depends on the quality of the software that provides that facility, be it FUSE or some other mechanism. From the message given it would appear that rather more than 20k is being read. Perhaps the metadata (specifically file size) is being provided wrong and it is causing allocation of an insanely large buffer.
I believe it is the `gvfsd-sftp` backend from GVfs (Gnome Virtual File System) which seems to be the default for Nautilus/Nemo, I don't have FUSE installed:
``` office@office-linux:~$ uname -a Linux office-linux 6.8.0-40-generic #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2 x86_64 x86_64 x86_64 GNU/Linux ```
``` office@office-linux:~$ ps aux | grep sftp office 211755 0.0 0.0 398452 8640 ? Sl 09:04 0:00 /usr/libexec/gvfsd-sftp --spawner :1.9 /org/gtk/gvfs/exec_spaw/8 office 211766 0.0 0.0 26728 8480 pts/1 Ss+ 09:04 0:00 /usr/bin/ssh -oForwardX11 no -oForwardAgent no -oPermitLocalCommand no -oClearAllForwardings yes -oProtocol 2 -oNoHostAuthenticationForLocalhost yes -oControlMaster auto -oControlPath=/run/user/1000/gvfsd-sftp/%C -s server.example.com sftp office 211769 0.0 0.0 26336 7680 pts/2 Ss+ 09:04 0:00 /usr/bin/ssh -oForwardX11 no -oForwardAgent no -oPermitLocalCommand no -oClearAllForwardings yes -oProtocol 2 -oNoHostAuthenticationForLocalhost yes -oControlMaster auto -oControlPath=/run/user/1000/gvfsd-sftp/%C -s server.example.com sftp office 214503 0.0 0.0 19016 2720 pts/0 S+ 09:48 0:00 grep --color=auto sftp ```
Can Geany be hardened here to tell an error message? It must be either a bug of Geany or `gvfsd-sftp`.
I guess you are opening the file via Nautilis/Nemo, so you can't tell Geany to use filetype none. If you can open it with the Geany internal dialog there is a drop down that would allow you to set none, which should remove the calls to mio. Or rename the remote file to an extension like .nothing. Then see how big Geany thinks the file is after it has opened it.
What do you mean by filetype none? The file extension was `.php`.
Mio is part of the symbols uctags based symbols parser, so if the file is opened as filetype `none`, there will be no symbol parsing, thus removing the mio code path where it is running out of memory. If the file then opens without a crash it will be possible to see the size, and get a better idea where the problem may be.
github-comments@lists.geany.org