arthur00 / DSG

Distributed Scene Graph
0 stars 0 forks source link

Script creation and removal is asynchronous #1

Open arthur00 opened 11 years ago

arthur00 commented 11 years ago

ScriptInstance creates and removes scripts using the AsyncCommandManager. If scripts with same UUID are quickly removed and recreated (e.g. quark crossings), race conditions occur. One in particular is recurring, timers:

4975-8016-cc6dbcd60e6d) in object DeadObject in artSCR1. Unable to load script state file ScriptEngines/b99c51c7-f425-4369-9894-77e7614baf27/8e0bcf78-8e25-46fb-8aee-8c2fb229c29d.state. XML is <?xml version="1.0"?>defaultTruetimer22000000000019999999720. Exception An element with the same key already exists in the dictionary. at System.Collections.Generic.Dictionary`2[System.String,OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Timer+TimerInfo].Add (System.String key, OpenSim.Region.ScriptEngine.Shared.Api.Plugins.TimerInfo value) [0x00171] in /build/buildd/mono-2.10.8.1/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:452 at OpenSim.Region.ScriptEngine.Shared.Api.Plugins.Timer.CreateFromData (UInt32 localID, UUID itemID, UUID objectID, System.Object[] data) [0x0005f] in /share/opensim/bld/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs:185 at OpenSim.Region.ScriptEngine.Shared.Api.AsyncCommandManager.CreateFromData (IScriptEngine engine, UInt32 localID, UUID itemID, UUID hostID, System.Object[] data) [0x000df] in /share/opensim/bld/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs:429 at OpenSim.Region.ScriptEngine.Shared.Instance.ScriptInstance.Load (System.AppDomain dom, System.String assembly, StateSource stateSource) [0x00409] in /share/opensim/bld/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs:380