diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 0825a01638..c8a25dd2c9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -388,6 +388,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments Dictionary scriptStates = new Dictionary(); + m_log.DebugFormat("[ATTACHMENTS MODULE]: enter PrepareScriptInstanceForSave loop"); foreach (SceneObjectGroup so in attachments) { // Scripts MUST be snapshotted before the object is @@ -398,13 +399,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments scriptStates[so] = PrepareScriptInstanceForSave(so, false); } + m_log.DebugFormat("[ATTACHMENTS MODULE]: enter UpdateDetachedObject loop"); lock (sp.AttachmentsSyncLock) { foreach (SceneObjectGroup so in attachments) UpdateDetachedObject(sp, so, scriptStates[so]); - + m_log.DebugFormat("[ATTACHMENTS MODULE]: enter ClearAttachments"); sp.ClearAttachments(); } + m_log.DebugFormat("[ATTACHMENTS MODULE]: derez done"); + } public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent) @@ -1014,6 +1018,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments // Remove the object from the scene so no more updates // are sent. Doing this before the below changes will ensure // updates can't cause "HUD artefacts" + + m_log.WarnFormat("[ATTACHMENTS MODULE]: DeleteSceneObject"); + m_scene.DeleteSceneObject(so, false, false); // Prepare sog for storage @@ -1023,6 +1030,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments if (saveChanged) { + m_log.WarnFormat("[ATTACHMENTS MODULE]: saveChanged true"); + // We cannot use AbsolutePosition here because that would // attempt to cross the prim as it is detached so.ForEachPart(x => { x.GroupPosition = so.RootPart.AttachedPos; }); @@ -1031,7 +1040,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments } // Now, remove the scripts + m_log.WarnFormat("[ATTACHMENTS MODULE]: remove scripts"); so.RemoveScriptInstances(true); + m_log.WarnFormat("[ATTACHMENTS MODULE]: UpdateDetachedObject done"); } protected SceneObjectGroup RezSingleAttachmentFromInventoryInternal( diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 182c3fd497..692e0c9ced 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs @@ -1366,9 +1366,9 @@ namespace OpenSim.Region.Framework.Scenes { try { - m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate: {0}",d.Target.ToString()); +// m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate: {0}",d.Target.ToString()); d(agentId); - m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate done "); +// m_log.ErrorFormat("[EVENT MANAGER]: OnRemovePresenceDelegate done "); } catch (Exception e) { @@ -2039,9 +2039,9 @@ namespace OpenSim.Region.Framework.Scenes { try { - m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString()); +// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed: {0}", d.Target.ToString()); d(ClientID, scene); - m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done "); +// m_log.ErrorFormat("[EVENT MANAGER]: TriggerClientClosed done "); } catch (Exception e) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c53f7af084..0266faf821 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3640,17 +3640,17 @@ namespace OpenSim.Region.Framework.Scenes } m_eventManager.TriggerClientClosed(agentID, this); - m_log.Debug("[Scene]TriggerClientClosed done"); +// m_log.Debug("[Scene]TriggerClientClosed done"); m_eventManager.TriggerOnRemovePresence(agentID); - m_log.Debug("[Scene]TriggerOnRemovePresence done"); +// m_log.Debug("[Scene]TriggerOnRemovePresence done"); if (!isChildAgent) { if (AttachmentsModule != null) { - m_log.Debug("[Scene]DeRezAttachments"); +// m_log.Debug("[Scene]DeRezAttachments"); AttachmentsModule.DeRezAttachments(avatar); - m_log.Debug("[Scene]DeRezAttachments done"); +// m_log.Debug("[Scene]DeRezAttachments done"); } ForEachClient( @@ -3665,7 +3665,7 @@ namespace OpenSim.Region.Framework.Scenes // It's possible for child agents to have transactions if changes are being made cross-border. if (AgentTransactionsModule != null) { - m_log.Debug("[Scene]RemoveAgentAssetTransactions"); +// m_log.Debug("[Scene]RemoveAgentAssetTransactions"); AgentTransactionsModule.RemoveAgentAssetTransactions(agentID); } m_log.Debug("[Scene] The avatar has left the building");