diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs index dbb4eda73d..b0af4a6488 100644 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/RegionSyncModule.cs @@ -3909,7 +3909,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule OSDMap rootData = (OSDMap)data["RootPart"]; //Decode and copy to the list of PrimSyncInfo PrimSyncInfo primSyncInfo = m_primSyncInfoManager.DecodeFullSetPrimProperties(rootData); - SceneObjectPart root = primSyncInfo.PrimSyncInfoToSOP(); + SceneObjectPart root= primSyncInfo.PrimSyncInfoToSOP(); if (root != null) { @@ -3930,6 +3930,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule OSDMap partData = (OSDMap)otherPartsArray[i]; primSyncInfo = m_primSyncInfoManager.DecodeFullSetPrimProperties(partData); SceneObjectPart part = primSyncInfo.PrimSyncInfoToSOP(); + if(part!=null){ sog.AddPart(part); partsPrimSyncInfo.Add(part.UUID, primSyncInfo); @@ -5074,22 +5075,29 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule } else { - //Compare timestamp and update SyncInfo if necessary - updated = m_propertiesSyncInfo[property].CompareAndUpdateSyncInfoBySync(pSyncInfo, recvTS); - //If updated, update the property value in SOP - if (updated) + try { - //DSG DEBUG - /* - if (property == SceneObjectPartSyncProperties.Shape) + //Compare timestamp and update SyncInfo if necessary + updated = m_propertiesSyncInfo[property].CompareAndUpdateSyncInfoBySync(pSyncInfo, recvTS); + //If updated, update the property value in SOP + if (updated) { - DebugLog.DebugFormat("UpdatePropertiesBySync: updating Shape of {0}, {1}", part.Name, part.UUID); - } - * */ + //DSG DEBUG + /* + if (property == SceneObjectPartSyncProperties.Shape) + { + DebugLog.DebugFormat("UpdatePropertiesBySync: updating Shape of {0}, {1}", part.Name, part.UUID); + } + * */ - //UpdateSOPProperty(part, m_propertiesSyncInfo[property]); - SetSOPPropertyValue(part, property); - propertiesUpdated.Add(property); + //UpdateSOPProperty(part, m_propertiesSyncInfo[property]); + SetSOPPropertyValue(part, property); + propertiesUpdated.Add(property); + } + } + catch (Exception e) + { + DebugLog.ErrorFormat("Error in updating property {0}: {1}", property, e.Message); } } } @@ -5186,7 +5194,16 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule foreach (SceneObjectPartSyncProperties property in FullSetPrimProperties) { if (m_propertiesSyncInfo.ContainsKey(property)) - SetSOPPropertyValue(sop, property); + { + try + { + SetSOPPropertyValue(sop, property); + } + catch (Exception e) + { + DebugLog.ErrorFormat("Error in setting SOP property {0}: {1}", property, e.Message); + } + } else { //This might just be fine. For phantom objects, they don't have @@ -6706,7 +6723,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule case SceneObjectPartSyncProperties.AttachedAvatar: //part.AttachedAvatar = (UUID)pSyncInfo.LastUpdateValue; UUID attachedAvatar = (UUID)pSyncInfo.LastUpdateValue; - if (!part.AttachedAvatar.Equals(attachedAvatar)) + if (!part.AttachedAvatar.Equals(attachedAvatar) && part.ParentGroup !=null) { part.AttachedAvatar = attachedAvatar; ScenePresence avatar = part.ParentGroup.Scene.GetScenePresence(attachedAvatar); diff --git a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/ScriptEngineSyncModule.cs b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/ScriptEngineSyncModule.cs index a95c5899d9..a8326d4ab7 100755 --- a/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/ScriptEngineSyncModule.cs +++ b/OpenSim/Region/CoreModules/RegionSync/RegionSyncModule/SymmetricSync/ScriptEngineSyncModule.cs @@ -203,7 +203,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule //Inform script engine to save script states and stop scripts m_scene.EventManager.TriggerScriptEngineSyncStop(); //remove all objects - m_scene.DeleteAllSceneObjects(); + m_scene.DeleteAllSceneObjectsBySync(); } public void ScriptEngine_OnNewScript(UUID agentID, SceneObjectPart part, UUID itemID) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 374b298bc2..d8990fe363 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -706,7 +706,7 @@ namespace OpenSim.Region.Framework.Scenes } } - //Similar to DeleteSceneObject, except that this does not change LastUpdateActorID and LastUpdateTimeStamp + //Similar to DeleteSceneObject, except that this does not trigger SyncDeleteObject public void DeleteSceneObjectBySynchronization(SceneObjectGroup group) {