SimClient: Added Try/Catch over block of code which is triggering an exception that should not be triggerable. (Duplicate key after dictionary is locked, checked for key, then added) [!?!?]

AvatarUpdate: Added check for if the physics actor is null before attempting to access it.
0.1-prestable
Adam Frisby 2007-04-22 17:31:51 +00:00
parent 60047aa5a6
commit 869b39c451
2 changed files with 17 additions and 1 deletions

View File

@ -731,7 +731,17 @@ namespace OpenSim
{ {
if (!NeedAck.ContainsKey(Pack.Header.Sequence)) if (!NeedAck.ContainsKey(Pack.Header.Sequence))
{ {
NeedAck.Add(Pack.Header.Sequence, Pack); try
{
NeedAck.Add(Pack.Header.Sequence, Pack);
}
catch (Exception e)
{
// Ignore
// Seems to throw a exception here occasionally
// of 'duplicate key' despite being locked.
// !?!?!?
}
} }
else else
{ {

View File

@ -10,6 +10,12 @@ namespace OpenSim.world
{ {
public override void update() public override void update()
{ {
if (this._physActor == null)
{
//HACKHACK: Note to work out why this entity does not have a physics actor
// and prehaps create one.
return;
}
libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z); libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
if (this.updateflag) if (this.updateflag)
{ {