Page 1 of 2

Calling standalone version from VisualStudio causes deadlock

Posted: Thu 16 Dec 2010 12:49
by azzwin
I'm using the latest version 2.50.9 with VS2008 (although I UNchecked the option to integrate it, in the installer - so I'm running it standalone only)

I use VS2008 with Sourcesafe 2005, and have setup CodeCompare as the diff tool in the Sourcesafe options... so when Sourcesafe compares two files it uses CodeCompare instead of its crappy diff viewer.

It works fine from Sourcesafe itself, but if I double-click on a file in the Pending Checkins window of VS2008, CodeCompare launches, shows both files, but then freezes. VS2008 is also frozen so the only way out of this deadlock is to end the CodeCompareGui process from Task Manager.

Can you replicate the issue? Happy to provide more details and beta test any fix... anything to avoid going back to the cesspit that is VSS diff :evil:

Thanks
Azz

Posted: Fri 17 Dec 2010 14:05
by Artem
Could you please answer some questions for bug reproducing. What type of files did you attempt to compare? Does the freezing occur when you try to open these files via windows explorer menu or dragging them to new comparison document?

Posted: Fri 17 Dec 2010 17:16
by azzwin
Artem wrote:Could you please answer some questions for bug reproducing. What type of files did you attempt to compare? Does the freezing occur when you try to open these files via windows explorer menu or dragging them to new comparison document?
I am comparing very basic C# files with extension ".cs". Comparing via Windows Explorer works, as well as dragging the files in. It even works from Sourcesafe's History dialog.

It's just Visual Studio's "pending checkins" window that causes a freeze.

Can I run it with a switch to enable logging or something?

Posted: Fri 17 Dec 2010 17:46
by Artem
Could you send us a screenshot with not responding application? May be we can see some additional aspects. Also please specify the command line parameters you have set in the SourceSafe options.

Posted: Mon 20 Dec 2010 09:31
by azzwin
Artem wrote:Could you send us a screenshot with not responding application? May be we can see some additional aspects. Also please specify the command line parameters you have set in the SourceSafe options.
Sorry, I can't send a screenshot from work.
The CodeCompare window opens, I can see both documents, but it's frozen.

The VSS parameters are:

Operation: File Difference
File Extension: .*
Command Line: C:\Program Files\CodeCompare\CodeCompareGui.exe %1 %2

Thanks.

Posted: Mon 20 Dec 2010 12:29
by Artem
Try using the following command line: "C:\Program Files\CodeCompare\CodeCompare.exe" /b /w %1 %2

Posted: Mon 20 Dec 2010 13:48
by azzwin
Artem wrote:Try to use the following command line: "C:\Program Files\CodeCompare\CodeCompare.exe" /b /w %1 %2
Amazing, that works perfectly. Thank you very much :D

Posted: Mon 20 Dec 2010 16:06
by azzwin
azzwin wrote:
Artem wrote:Try to use the following command line: "C:\Program Files\CodeCompare\CodeCompare.exe" /b /w %1 %2
Amazing, that works perfectly. Thank you very much :D
Oops spoke too soon...

It worked for that file but I've just done a diff on a different file, which again produced the freeze.

I'm not able to send you any screenshots or code files so I'm unsure how to be of any use to fix it other than to test any fix you might make.

What do you suggest?

Posted: Mon 20 Dec 2010 16:53
by Artem
Please answer a few more questions.
Can you open the About dialog box (Help->About in the main menu)?
How much is your processor loaded when CodeCompare stops responding?
Does the error reproduce if you end this task and compare this file again?

Posted: Mon 20 Dec 2010 18:08
by azzwin
Artem wrote:Please answer a few more questions.
Can you open the About dialog box (Help->About in the main menu)?
How much is your processor loaded when CodeCompare stops responding?
Does the error reproduce if you end this task and compare this file again?
In the About dialog it says 2.50.9, Include CodeCompare Pro Trial (0 of 30 days left).

According to Task Manager, when it's frozen, CodeCompare.exe and CodeCompareGUI.exe are both on 0% CPU. CodeCompare.exe uses 26MB and CodeCompareGUI.exe uses 84MB. They do not change at all.

I can always reproduce the freeze with a certain file (but not all files). FWIW it's a C# form :shock:

Posted: Wed 22 Dec 2010 12:55
by Artem
We would be very much obliged if you send us files on which the freeze problem is reproduced. The information will be used to fix the problem only, it won't be published or used for commercial purposes.

Posted: Thu 23 Dec 2010 09:21
by azzwin
Artem wrote:We would be very much obliged if you send us files on which the freeze problem is reproduced. The information will be used to fix the problem only, it won't be published or used for commercial purposes.
I'm afraid I can't do that, sorry :(
Do you have any way of logging which functions are called, so we can work out where it's failing?

Also I think it depends on the type of changes that have been made. Because now the file it used to hang on, does not hang anymore. So it's a bit confusing. Next time I encounter the issue I'll try to decipher what's causing it to sometimes hang and sometimes not.

Posted: Wed 29 Dec 2010 13:35
by azzwin
OK I have some more information after doing some testing. I created a brand new VSS database and a brand new VS2008 WinForms project. From VS2008 I added the project into Sourcesafe.

In VS2008 I set up the VSS settings to use CodeCompare as the diff viewer, like this:
"C:\Program Files\CodeCompare\CodeCompare.exe" /b /w %1 %2

I edited Program.cs (didn't matter how, you can add a line, remove all lines, or even leave it as it was originally) and saved it. Then double-click on Program.cs in the Pending Checkins window.
CodeCompare opens, the differences are visible, I can see the old and new files correctly, but it's just hanged.

Hopefully this is enough info now for you to reproduce this issue....?

Posted: Thu 30 Dec 2010 13:11
by Artem
We have tried to reproduce the problem in your way from the start. But we have no results. Try to create program.tmp in %temp% folder , choose in its context menu "Select Left", and after that select in menu of source program.cs "Compare with program.tmp". Does program freeze in this case?

Posted: Thu 30 Dec 2010 16:16
by azzwin
OK I tried that, and no it does not freeze in this case. The only time I've ever seen it freeze is from the Pending Checkins window.

It must be something to do with the communication with Visual Studio...?

What do you think I should try next? Is there any way you could give me an EXE that has some logging enabled, so I can let you know where it's hanging?