bug in Workspace.Map()

Topics: Developer Forum
Aug 8, 2007 at 1:52 PM
Hi

As far as I can see there is a concurrency bug in Workspace.Map that can be triggered by the TFS PlugIn and cc.net. If you schedule two projects to force a build at the same time, workspace.Map() in GetSource() sometimes throws a MappingConflictException saying that the folder is mapped to another workspace (which is not true). I temporarily fixed this by catching this exception and logging the event to file.

Thanks for a valuable piece of software.
Aug 10, 2007 at 9:48 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Aug 10, 2007 at 9:49 AM
Thanks for reporting this, I'll go take a look.
Aug 10, 2007 at 10:30 AM
The two projects has to be in the same workspace naturally.
Aug 30, 2007 at 7:56 AM
If anyone has any idea on how to fix this, I'd love to hear it!
The problem is, when I run cc.net from the console, it's working fine. When using the Windows Service, it keeps giving me the error.
Currently I have a remote desktop session open on the build-machine with the console app running in it.
Aug 30, 2007 at 9:59 PM
What I did was just to add a try/catch around the workspace.Map() call, and compile the vsts plugin again. The exception is not a problem, because the workspace is naturally allready there, so the mapping is not necessary whenever the exception is thrown.

For fun I just logged a message to disk in the Catch block so that I could see how often it happens.






dvdstelt wrote:
If anyone has any idea on how to fix this, I'd love to hear it!
The problem is, when I run cc.net from the console, it's working fine. When using the Windows Service, it keeps giving me the error.
Currently I have a remote desktop session open on the build-machine with the console app running in it.