Thursday, November 29, 2007

TSWA 2005 crashes (Attempted to read or write protected memory)

A while back when we started using Team System Web Access 2005 we bumped into a problem with the website crashing sometimes several times during a day displaying the following error:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
we where able to get around it by manually go in an recycle the application pool for TSWA (which temporarily solve the problem).

Clearly this was not a sufficient solution so after chatting about it with the good folks over in Redmond they where able to pinpoint the problem (this is as far as I know only a problem in TSWA 2005). To solve the problem you need to do the following:

Switch TSWA over to use shared WIT cache mode which can be done by adding the following entry in the web.config for TSWA:
<configuration>

<appSettings>
<add key="WorkItemTrackingCacheRoot" value="C:\FolderForCache" />
</appSettings>

</configuration>
After we added this entry we have experienced no problems with this.

Those pesky TestType doesn't exsists error messages

Recently I had some problems with publishing of the test results for our test runs performed with a tool called AutomatedQA TestComplete.

No matter what we did the only message we got back was:

Publish Failed. Test Type not installed on the server for test type: "TestComplete6.VSI.Tests.TestCompleteTest"
After a fair ammount of digging I finally found the solution and this applies to any custom test type used together with TFS (so I figured I'd share the information).

As you can read in the documentation regarding custom test types you not only have to install the test type on the machine i has to be available in the probe path for the web services as well.
Test type extension assemblies must be installed to two locations on the applicationtier computer:

To support the publishing Web service, install test type extension assemblies to this folder: Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Build\bin. This service publishes test results from Visual Studio to the application tier.

To support the data warehouse adapter, install test type assemblies to this folder: Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Warehouse\bin\Plugins. This adapter pushes test result data into the data warehouse for reporting.
This MSDN documentation section explains it all Packaging and Installing Test Type Extensions in Visual Studio Team System

And if you are considering writing your own custom test type be sure to read through this Creating Custom Test Types in Visual Studio Team System.

I didn't find all that much information around this when digging around the net but this article gives some pointers on writing custom test types as well Create a Custom Test Interface Provider for Team System

Wednesday, November 21, 2007

Come chat with the Team System product group - December 5th

It's time again for a chat with the Team System Product Group, make sure that you clear you calender on the 5th of december.

Join members of the Visual Studio Team System product group to discuss features available in Team Foundation Server, Team Suite, Architecture Edition, Development Edition, Database Edition, and Test Edition. In addition, discuss what's new for these editions for Visual Studio 2008.
Read more about it here.