From 8de933ab07a0f9e8291d705a9a03d5b1ba60caa9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 20 Mar 2013 02:09:25 +0000 Subject: Insert a short delay on the simulator side rezzing of attachments in order to fix viewer 3 issues if its own rezzing actions on login collide with the simulator side actions. This resolves issues (at least in my tests with LL 3.3.4) where this can make attachments invisible until one zooms in on the avatar. This doesn't affect version 1 viewers since this delay is shorter than the login delay. This doesn't increase the login time since this part of the process was already being performed asynchronously. This may be a temporary solution. --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3c91c5b..89eca32 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2832,7 +2832,7 @@ namespace OpenSim.Region.Framework.Scenes sp.IsChildAgent = false; if (AttachmentsModule != null) - Util.FireAndForget(delegate(object o) { AttachmentsModule.RezAttachments(sp); }); + Util.FireAndForget(o => { Thread.Sleep(5000); AttachmentsModule.RezAttachments(sp); }); } } else -- cgit v1.1 From b1cd1d917e25e34c2efda65ab52164269863da87 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 20 Mar 2013 23:12:13 +0000 Subject: minor: don't bother with the pause before rezzing attachments if we are running regression tests (fire and forget calls launched on the same thread). Also adds code comments as to why this pause exists. --- OpenSim/Region/Framework/Scenes/Scene.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 89eca32..c9c0662 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2831,8 +2831,22 @@ namespace OpenSim.Region.Framework.Scenes // XXX: This is convoluted. sp.IsChildAgent = false; + // We leave a 5 second pause before attempting to rez attachments to avoid a clash with + // version 3 viewers that maybe doing their own attachment rezzing related to their current + // outfit folder on startup. If these operations do clash, then the symptoms are invisible + // attachments until one zooms in on the avatar. + // + // We do not pause if we are launching on the same thread anyway in order to avoid pointlessly + // delaying any attachment related regression tests. if (AttachmentsModule != null) - Util.FireAndForget(o => { Thread.Sleep(5000); AttachmentsModule.RezAttachments(sp); }); + Util.FireAndForget( + o => + { + if (Util.FireAndForgetMethod != FireAndForgetMethod.None) + Thread.Sleep(5000); + + AttachmentsModule.RezAttachments(sp); + }); } } else -- cgit v1.1