[Opensim-dev] Nasty exception in Scene.cs

Sean Dague sean at dague.net
Mon Dec 10 21:28:19 UTC 2007


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

-- 
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071210/3d88ac75/attachment-0001.pgp>


More information about the Opensim-dev mailing list