Skip to content

P4SimpleScc can lock up Visual Studio for a long period of time if the Perforce server is unresponsive. #9

@botman99

Description

@botman99

I ran into this issue today where Visual Studio locked up when I right clicked on a file. It was completely frozen and I had to kill it from Task Manager in Windows. I later found out that the Perforce server I was connected to was no longer responding. This is what caused P4SimpleScc to lock up Visual Studio (not getting a response back to a 'p4' command).

I ran Visual Studio again while the Perforce server was still not responding and decided to wait to see if Visual Studio ever came back from being locked up, and it did. I forgot that I had a 5 minute timeout on the 'p4' commands that P4SimpleScc uses, but clearly 5 minutes is way too long of a timeout period since almost all 'p4' commands used by P4SimpleScc should respond within a second or two.

The only command that may take a long time (10 or more seconds) would be when first starting up Visual Studio where you want the 'checked out' icon to be displayed, P4SimpleScc will use the 'p4 opened' command to return a list of files that are currently checked out. If you have thousands of files checked out, this could take several seconds depending on the speed of your Perforce server and the bandwidth of your internet connection (assuming that you are using a locally hosted Perforce server).

I should probably have the timeout for 'p4' commands be set by the type of command being used and maybe try to run commands that may take several seconds as a background task or thread to help prevent Visual Studio from locking up when the Perforce server is unavailable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions