[Opensim-dev] Nasty exception in Scene.cs
Adam Frisby
adam at gwala.net
Tue Dec 11 08:06:13 UTC 2007
Modules & Plugins will need access to this.
Maybe we can make a self-locking property to replace it.
Rename Entities to m_entities, then make:
List<Entity> Entities {
get {
lock(m_entities) {
return m_entities;
}
}
}
Regards,
Adam
Sean Dague wrote:
> I got a nasty exception in Scene.cs during the Update() call as follows:
>
> [SCENE] [12-10 04:02:11] Failed with exception
> System.InvalidOperationException: out of sync
> at
> System.Collections.Generic.Dictionary`2+Enumerator[libsecondlife.LLUUID,OpenSim.Region.Environment.Scenes.EntityBase].VerifyState
> () [0x00000]
> at
> System.Collections.Generic.Dictionary`2+Enumerator[libsecondlife.LLUUID,OpenSim.Region.Environment.Scenes.EntityBase].CurrentSlot
> () [0x00000]
> at
> System.Collections.Generic.Dictionary`2+Enumerator[libsecondlife.LLUUID,OpenSim.Region.Environment.Scenes.EntityBase].get_Current
> () [0x00000]
> at
> System.Collections.Generic.Dictionary`2+ValueCollection+Enumerator[libsecondlife.LLUUID,OpenSim.Region.Environment.Scenes.EntityBase].get_Current
> () [0x00000]
> at
> System.Collections.Generic.Dictionary`2+ValueCollection[libsecondlife.LLUUID,OpenSim.Region.Environment.Scenes.EntityBase].CopyTo
> (OpenSim.Region.Environment.Scenes.EntityBase[] , Int32 ) [0x00000]
> at
> System.Collections.Generic.List`1[OpenSim.Region.Environment.Scenes.EntityBase].AddCollection
> (ICollection`1 ) [0x00000]
> at
> System.Collections.Generic.List`1[OpenSim.Region.Environment.Scenes.EntityBase]..ctor
> (IEnumerable`1 ) [0x00000]
> at OpenSim.Region.Environment.Scenes.InnerScene.UpdateEntities ()
> [0x00000]
> at OpenSim.Region.Environment.Scenes.Scene.Update () [0x00000]
>
> Upon further inspection, the issue here appears to be that we give
> public access to m_InnerScene.Entities, which is a dictionary, which is
> something that we need to be able to lock and iterate over inside the
> Scene. This problem can't be fixed with locks.
>
> Who needs direct access to that entities list outside of Scene? Is
> there some safer interface we can give them for what they really need?
>
> -Sean
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
More information about the Opensim-dev
mailing list