Added a few "try, catch" phrases to help catch errors when sync'ing new objects or updating prim properties.
parent
f5e648f54a
commit
75c97acab8
|
@ -3909,7 +3909,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
OSDMap rootData = (OSDMap)data["RootPart"];
|
OSDMap rootData = (OSDMap)data["RootPart"];
|
||||||
//Decode and copy to the list of PrimSyncInfo
|
//Decode and copy to the list of PrimSyncInfo
|
||||||
PrimSyncInfo primSyncInfo = m_primSyncInfoManager.DecodeFullSetPrimProperties(rootData);
|
PrimSyncInfo primSyncInfo = m_primSyncInfoManager.DecodeFullSetPrimProperties(rootData);
|
||||||
SceneObjectPart root = primSyncInfo.PrimSyncInfoToSOP();
|
SceneObjectPart root= primSyncInfo.PrimSyncInfoToSOP();
|
||||||
|
|
||||||
if (root != null)
|
if (root != null)
|
||||||
{
|
{
|
||||||
|
@ -3930,6 +3930,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
OSDMap partData = (OSDMap)otherPartsArray[i];
|
OSDMap partData = (OSDMap)otherPartsArray[i];
|
||||||
primSyncInfo = m_primSyncInfoManager.DecodeFullSetPrimProperties(partData);
|
primSyncInfo = m_primSyncInfoManager.DecodeFullSetPrimProperties(partData);
|
||||||
SceneObjectPart part = primSyncInfo.PrimSyncInfoToSOP();
|
SceneObjectPart part = primSyncInfo.PrimSyncInfoToSOP();
|
||||||
|
|
||||||
if(part!=null){
|
if(part!=null){
|
||||||
sog.AddPart(part);
|
sog.AddPart(part);
|
||||||
partsPrimSyncInfo.Add(part.UUID, primSyncInfo);
|
partsPrimSyncInfo.Add(part.UUID, primSyncInfo);
|
||||||
|
@ -5074,22 +5075,29 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Compare timestamp and update SyncInfo if necessary
|
try
|
||||||
updated = m_propertiesSyncInfo[property].CompareAndUpdateSyncInfoBySync(pSyncInfo, recvTS);
|
|
||||||
//If updated, update the property value in SOP
|
|
||||||
if (updated)
|
|
||||||
{
|
{
|
||||||
//DSG DEBUG
|
//Compare timestamp and update SyncInfo if necessary
|
||||||
/*
|
updated = m_propertiesSyncInfo[property].CompareAndUpdateSyncInfoBySync(pSyncInfo, recvTS);
|
||||||
if (property == SceneObjectPartSyncProperties.Shape)
|
//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]);
|
//UpdateSOPProperty(part, m_propertiesSyncInfo[property]);
|
||||||
SetSOPPropertyValue(part, property);
|
SetSOPPropertyValue(part, property);
|
||||||
propertiesUpdated.Add(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)
|
foreach (SceneObjectPartSyncProperties property in FullSetPrimProperties)
|
||||||
{
|
{
|
||||||
if (m_propertiesSyncInfo.ContainsKey(property))
|
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
|
else
|
||||||
{
|
{
|
||||||
//This might just be fine. For phantom objects, they don't have
|
//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:
|
case SceneObjectPartSyncProperties.AttachedAvatar:
|
||||||
//part.AttachedAvatar = (UUID)pSyncInfo.LastUpdateValue;
|
//part.AttachedAvatar = (UUID)pSyncInfo.LastUpdateValue;
|
||||||
UUID 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;
|
part.AttachedAvatar = attachedAvatar;
|
||||||
ScenePresence avatar = part.ParentGroup.Scene.GetScenePresence(attachedAvatar);
|
ScenePresence avatar = part.ParentGroup.Scene.GetScenePresence(attachedAvatar);
|
||||||
|
|
|
@ -203,7 +203,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
|
||||||
//Inform script engine to save script states and stop scripts
|
//Inform script engine to save script states and stop scripts
|
||||||
m_scene.EventManager.TriggerScriptEngineSyncStop();
|
m_scene.EventManager.TriggerScriptEngineSyncStop();
|
||||||
//remove all objects
|
//remove all objects
|
||||||
m_scene.DeleteAllSceneObjects();
|
m_scene.DeleteAllSceneObjectsBySync();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ScriptEngine_OnNewScript(UUID agentID, SceneObjectPart part, UUID itemID)
|
public void ScriptEngine_OnNewScript(UUID agentID, SceneObjectPart part, UUID itemID)
|
||||||
|
|
|
@ -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)
|
public void DeleteSceneObjectBySynchronization(SceneObjectGroup group)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue