TerryYoung

As shown by the event included in this message, TFS Warehouse is getting an exception due to unexpectedly encountering the end of a steam while calculating code churn. It seems to happen on more than one sql script file. Is there a problem with having sql script files in TFS or is there something wrong with particular script files or is this a bug in TFS or ...

Event Type: Error
Event Source: TFS Warehouse
Event Category: None
Event ID: 3000
Date: 12/12/2006
Time: 2:21:39 AM
User: N/A
Computer: <TFS server>
Description:
TF53010: An unexpected condition has occurred in a Team Foundation component. The information contained here should be made available to your site administrative staff.
Technical Information (for the administrative staff):
Date (UTC): 12/12/2006 7:21:39 AM
Machine: <TFS server>
Application Domain: /LM/W3SVC/3/Root/Warehouse<cut>
Assembly: Microsoft.TeamFoundation.Warehouse, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a; v2.0.50727
Process Details:
Process Name: w3wp
Process Id: 344
Thread Id: 388
Account name: <tfsservice>

Detailed Message: Microsoft.TeamFoundation.VersionControl.Adapter: An unexpected exception occured while calculating code churn: Calculating differences. Previous: changeset 10170, item $/<cut>/CreateTables.sql, encoding 1200. Current: changeset 10197, item $/<cut>/CreateTables.sql, encoding 1200. , exception:
Exception Message: TF10010: Source control unexpectedly encountered the end of the stream: The character was incomplete at stream offset 99021. (type IOException)

Exception Stack Trace: at Microsoft.TeamFoundation.VersionControl.Common.UTF16CharacterEnumerator.ReadCharacter(Char& ch)
at Microsoft.TeamFoundation.VersionControl.Common.UTF16CharacterEnumerator.NextCharacter(Int32& hash, Int32& length, EndOfLineClassifications& endOfLine)
at Microsoft.TeamFoundation.VersionControl.Common.ParagraphTokenizer.NextToken()
at Microsoft.TeamFoundation.VersionControl.Common.LcsDiff.HashTokens(HashFileKind kind, Tokenizer tokenizer, DynamicTokenArray da)
at Microsoft.TeamFoundation.VersionControl.Common.LcsDiff.Diff(DiffSegmentOutputTypes types, DiffOptions options)
at Microsoft.TeamFoundation.VersionControl.Adapter.Hatteras.Diff(String previousName, Int32 previousEncoding, String currentName, Int32 currentEncoding)
at Microsoft.TeamFoundation.VersionControl.Adapter.Hatteras.calculateDifferences(Item previous, Item current)


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.



Re: Team Foundation Server - Reporting & Warehouse TFS Warehouse exception TF10010

Mauli Shah - MSFT

Hi Terry,

Happy New Year. I apologize for the delay in answering your question - many of us have been out on holiday.

I've seen this happen when the actual file encoding on the file and the encoding TFS thinks it has are different. Also, sometimes different character/encoding combinations trip up the diff engine.

I would appreciate if you could send the files to me, so that we can see what the problem is and what a workaround could be for you. mauli.shah@(donotspam)microsoft.com

Mauli





Re: Team Foundation Server - Reporting & Warehouse TFS Warehouse exception TF10010

TerryYoung

Hi Mauli,

As I mentioned in my e-mail to you, I can't provide you with the files due to IP issues. Is there more information I can gather for you to help diagnose the problem

Terry





Re: Team Foundation Server - Reporting & Warehouse TFS Warehouse exception TF10010

Mauli Shah - MSFT

Hi Terry,

I'm asking the people who own this functionality to provide more input into what would help to diagnose the issue. I will let you know what the reply is.

Thanks!

Mauli





Re: Team Foundation Server - Reporting & Warehouse TFS Warehouse exception TF10010

Mauli Shah - MSFT

Hey Terry,

Let's try to get the encoding that the Version Control thinks that file should be. From the error message we see that it is encoding 1200 in the system

  1. tf get $/<cut>/CreateTables.sql /version:10197
  2. copy CreateTables.sql to a new filename (say file2)
  3. tf add file2
  4. tf prop file2 -> note the encoding number
  5. tf undo file2

let me know the result.

mauli





Re: Team Foundation Server - Reporting & Warehouse TFS Warehouse exception TF10010

TerryYoung

Hi Mauli,

There is a problem getting the file for changeset 10197 as outlined in your step 1. Since that changeset a rename operation was carried out to remove one level of the directory structure. If the original path is specified for the file the response to the tf command is that all files are up to date. If the new path is specified then issuing the command just causes the file to be removed from the local workspace.

How do we get the file out of the TFS Version Control repository in this case

Terry





Re: Team Foundation Server - Reporting & Warehouse TFS Warehouse exception TF10010

Richard Berg MSFT

tf view [oldname];[oldChangeset#] > foo.sql should download the old version of the file into foo.sql.



Re: Team Foundation Server - Reporting & Warehouse TFS Warehouse exception TF10010

TerryYoung

Using 'tf view' instead of 'tf get' did download the file. However executing the 'tf add' and then the 'tf prop' using the downloaded file results in the type and file type properties being blank.

Executing 'tf prop' on version 10197 of the file on the server and versions of the file checked-in before and after indicates the file type for each of the files is 'utf-16'.

Terry