sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
810 stars 39 forks source link

Looking for an old network connection that has been removed #6475

Open EpsOmega opened 1 month ago

EpsOmega commented 1 month ago

Description of the bug

Hello,

So if I am saving files via a VPN and then the VPN connection closes ( I close it or the lease expired ) if I still have the document open and I want to save it locally I have to wait maybe 3 mins or more.

Steps to reproduce

  1. Have a document open and save it to a network drive that is located at a remote location with the connection being a VPN connection.
  2. End the VPN session on purpose.
  3. Continue making changes to the document and then I want to save it locally for later when I reconnect to the VPN.
  4. At this point Sublime is waiting for a VPN connection that was ended, and it takes a long time to figure out the connection is gone.

Expected behavior

Sublime checks for the connection to the drive and after a few seconds, says, "I can't find the VPN drive, do you wish to save it locally? Yes or No keep waiting.

I choose Yes save it locally and I am done.

Actual behavior

I get the spinner going on for at least 3 minutes and have to wait.

Sublime Text build number

Latest version as of 9/6/2024

Operating system & version

Win 11

(Linux) Desktop environment and/or window manager

No response

Additional information

No response

OpenGL context information

No response

BenjaminSchaaf commented 1 month ago

To clarify, where is the spinner happening? Is it inside the save file dialog?

EpsOmega commented 1 month ago

Hello,

I believe that I no longer have a VPN connection so I either try and simply close the file or I go to file and then save as and then that's where the problem starts. It says if sublime is looking for the path for where the file used to be. But like I said, I closed that VPN connection so the spinner simply keeps going for maybe a few minutes until it figures out. The network connection no longer exists for me. This happens quite a bit. The only way to prevent it is once I close the VPN connection is to basically exit out of sublime and if I want to load the file after from my local drive I can do so with no problem, but it wouldn't be the same version. But I'm simply stating that if you close the VPN connection, it's probably best to close the file also.

Sent for my phone. Please excuse any typos.

Thanks, Jim

On Sat, Sep 7, 2024, 9:38 PM Benjamin Schaaf @.***> wrote:

To clarify, where is the spinner happening? Is it inside the save file dialog?

— Reply to this email directly, view it on GitHub https://github.com/sublimehq/sublime_text/issues/6475#issuecomment-2336507892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN2NC3WZQAHTYAVDYAAS6LZVOTAJAVCNFSM6AAAAABN2DTNY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGUYDOOBZGI . You are receiving this because you authored the thread.Message ID: @.***>

EpsOmega commented 1 month ago

Benjamin, I thought I figured out a way you can replicate the problem without having a VPN connection. So if you have say a USB drive so it'd be an SSD with a cable plugged into a USB port. From there, save a file to the SSD drive and then disconnect the drive while sublime is still open with the file and then do something with the file attempt to save it back to your hard drive. I'm pretty sure you're going to get the same spinner because the applications looking for the existing path which no longer exists, so I think this would be an easier way to try and configure a VPN connection.

Jim Sent using my phone. Please excuse typos.

On Sat, Sep 7, 2024, 9:38 PM Benjamin Schaaf @.***> wrote:

To clarify, where is the spinner happening? Is it inside the save file dialog?

— Reply to this email directly, view it on GitHub https://github.com/sublimehq/sublime_text/issues/6475#issuecomment-2336507892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN2NC3WZQAHTYAVDYAAS6LZVOTAJAVCNFSM6AAAAABN2DTNY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGUYDOOBZGI . You are receiving this because you authored the thread.Message ID: @.***>

deathaxe commented 1 month ago

If an application accesses a file path, underlying OS starts taking action to provide requested information. Even a simple "do you still exist" request may trigger a network re-connection operation. The timeout is specified on OS level.

Depending on mechanisms network resources are mounted, it may be impossible for an application to detect them as such. Thus strategies to avoid such situations may be limited.

If for instance the OS native open/save dialog starts causing a hang, it's clearly an issue on OS level. I already often saw it hanging completely while waking up hard disks. That may also happen on network shares, while it tries to re-establish connections.

Normal TCP connections timeout in 10 or 30s normally. That's the time an application doesn't get any respond and has to wait.