Hi.
We are developing a Reactivision based game using the fiducials using C# Visual Studio 2008 Professional.
When we move a fiducial around quickly on the glass top, the program crashes/stops responding.
When we have a look at the debug screen area, there are 2 messages that keep getting repeated. The first message comes up any thing from 3 to 8 times then the second message a few times. This repeats itself till it stops working.
“A first chance exception of type ‘System.ArgumentException’ occurred in mscorlib.dll”
“An item of the same key has already been added”
Sample of the code used below.
public void addTuioObject(TuioObject o)
{
lock (oSync)
{
objectList.Add(o.getSessionID(), new reactible(o));
}
}
public void updateTuioObject(TuioObject o)
{
lock (oSync)
{
objectList[o.getSessionID()].update(o);
foreach (reactible r in objectList.Values)
{
r.updateRoLocation();
}
}
}
public void removeTuioObject(TuioObject o)
{
lock (oSync)
{
objectList.Remove(o.getSessionID());
}
}
Any ideas?
Thanks
Trev.
