bluethundr

We have user who is having trouble with Visual Source Safe version 6.0. Most of his files are able to be checked out without a problem. But when he opens a certain few of those files he gets corrupt document errors.

What makes this strange is that other users from other workstations can open those "problematic" files and check them in without a problem. The problems seem to be local to this one user's installation of VSS.

He sees two dialog boxes. One says "The document is corrupt and cannot be opened. To try and repair it, use the Open and Repair command in the Open dialog (File menu) and select Extract Data when prompted."

The second says "Errors were detected in 'Groups_Disbanded.xls', but Microsoft Excel was able to open the file by making the repairs listed below. Save the file to make these repairs permanent.

Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted."

That is the exact wording of the two dialog boxes. The files do open in Excel, but the formatting is all blown to smithereens and unusable. Why would one user have this problem with particular files, but others not How can we solve this issue

Thanks!




Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

Alin Constantin - MSFT

You probably want to isolate first the problem and see if this is a VSS problem or an Excel problem.

I understand you have 2 machines, one where the files can be opened without problem when checking them out from the VSS database, and one where they cannot.

I'd use VSS'Get command to get first local copies of the files on both machines. Use WindowsExplorer and look at the files. Are they identical in size

Use "fc /b" command line and compare the files on 2 machines. Are they identical or not

If they are identical - this is an Excel problem. If they are not, looks like a VSS problem.

If this is a VSS problem, here is something to look for: Do both users have same version of VSS Same locales in the OS Are there any differences in their ss.ini files that could cause this (e.g. one user treating the xls files as text so they get corrupted when VSS retries them (CR characters replaced with CR-LF )).





Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

bluethundr1

Thanks for your help. We actually have a small network of machines, with about 8 users who are able to access these documents but one who is not.

I have little experience with VSS, and no experience with VSS command line, so please bear with me.

I was able to figure out how to issue a VSS Get command, by navigating to the VSS directory via command line and issuing the command : ss GET *.* (before trying to figure out the path, I wanted to see if this would work.)

I don't seem to be able to authenticate. I am able to log into the VSS gui as the user who is having the trouble. His name is "Larry" and there is no password. But when I issue the command line it prompts me for a username and password. I try using those same credentials again, but I get the error message 'User "Larry" not found'.

I don't know why I am able to log into the gui using those credentials, but not the command line.






Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

Alin Constantin - MSFT

A couple of reasons this may happen:

- you may be accessing a different database. VSS6 command line accesses by default the database in ..\data folder if I remmeber correctly, which is a local database installed by default when you install VSS. From UI you may be connecting to a different database. Make sure you set SSDIR environment variable pointing to the right database

- try setting the username with SSUSER environment variable http://msdn2.microsoft.com/en-us/library/ms181062(VS.80).aspx or by specifing the username and password in command line with -Yuser http://msdn2.microsoft.com/en-us/library/edy95zhk(VS.80).aspx

- the user may not have empty password. The database may be configured to allow automatic logon when the Windows username matches the VSS username without prompting for password, but when running ss.exe from command line you may be actually running it from a different Windows account than you run the ssexp.exe (UI). Try resetting the password for the user or use the same Windows account.

Alin





Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

bluethundr1

Thanks again for the help, Alin. I was able to get his and my local vss command line setup so that we could login to the remote server and execute the ss GET command to retrieve the file.

I retrieved the same files that were problematic in the interface through the command line. The ones that were previously problematic opened without a hitch when retrieved through the GET command! This work-around would not work for the user, however, because he is non-technical. He needs to be able to retrieve the files through the interface.

When I opened the file through the VSS 6 interface, on multiple tries I got multiple results. This time, I either got a message saying 'Invalid Handle' or 'Could not retrieve file'. Those were dialog boxes that opened up in the middle of the screen.

However, one thing is consistent. I dialog balloon that pops up in the tool bar that reads "Windows -Delayed Write Failed

Windows was unable to save all the data for the file \\upocfs01\vss_repository\temp\sst32.tmp. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elsewhere"

It looks like some temp file is getting in the way of opening up the main file.

Thanks again, for your help!
Tim






Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

bluethundr1

Oh, and one thing I forgot. I assume you meant to perform an 'fc' command comparing the file that was retrieved via the ss GET command and the file as it was retrieved via the interface. As mentioned previously, I wasn't able to get the file through the interface at all this time. Previous times, I was able to get the files, but they were corrupt and unusable.




Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

Alin Constantin - MSFT

"Invalid handle" error messages are most often a sign of an unreliable network connection.

If you have VSS 6.0 older than 6.0c or 6.0d I'd advise you to upgrade for free to one of these (I seem to remember in VSS 6.0b timeframe there were some bugs fixed that could also cause this message to appear).

Then, check your network hardware. Often a bad network card or bad network driver can cause the connections to be dropped, Windows to write those "delay write failed" messages, and all handles opened by VSS to become invalid (hence VSS will report the error on next operation).

If you're running an antivirus try turning it off temporarily (both on upocfs01 machine and on the client) and see if it helps.

Lastly, if temp files are the only ones with problem try setting the Temp folder to a local folder (e.g. C:\Temp) instead of using the default Temp subfolder in the database (\\upocfs01\vss_repository\temp\). This can be done in SSExplorer, Tools/Options/General/FolderForTemporaryFiles, which will write a per-user-per-machine setting in the ss.ini file of the currently logged on VSS user. That way you won't have to go over the network to write temporary files, and the scc operations will be faster, too.

Alin





Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

Alin Constantin - MSFT

Because of the corrupted files for only one user I'm more inclined to think of a bad network card/driver on that one user's machine... If you have a spare one available try changing it and see if it helps.



Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

bluethundr1

I forgot to mention that this time around I was not able to retrieve the files at all via the interface, whereas before I was. So a compare using fc /b between the file as retrieved via the interface and the file as retrieved via the command line was not possible. The results are inconsistent. Sometimes I am able to open a garbled version of the file, and other times I am not.




Re: Visual Studio Source Control and SourceSafe VSS files corrupt for only one user

bluethundr1

Success! Alin, that was the answer! Swapping out the nic card worked. You're the best!