Trevor Taylor

If I understand it correctly, line 239 in BlobTrackerCalibrate.cs does nothing:

Arbiter.Choice(

setImage.ResultPort,

delegate(EmptyValue success) { },

delegate(Exception e)

{

fault = Fault.FromException(e);

}

);

I think there is a yield return missing in front of the Arbiter.Choice. It's a pity that this can't be caught by the compiler somehow. It compiles clean, but the Choice is never executed. In this case it does not matter because the following code is only looking for a fault and then it returns.

Trevor



Re: Microsoft Robotics - Concurrency and Coordination Runtime (CCR) Small bug in BlobTrackerCalibrate.cs

George Chrysanthakopoulos

yes, this happens on occasion: people forget to yield or activate. Problem is that there is no bullet proof way to catch this at runtime or compile time, short of a modified language...

If added a finalizer that threw an exception when a Choice, Receive etc was garbage collected but never activated, it would hurt performance overall. So i avoided that (finalizers have cost)

g





Re: Microsoft Robotics - Concurrency and Coordination Runtime (CCR) Small bug in BlobTrackerCalibrate.cs

Trevor Taylor

Thanks George. This was the problem I mentioned to you at RoboCup. I had copied and pasted the code from BlobTrackerCalibrate and did not notice that it was not activating the Choice (which was supposed to get the Differential Drive state). Once I activated it, my code started working :-)

Please add this small bug to "to do list" for the next release.

Trevor