From 083ba72b28fb424e1e3edbc90c6a79d49d2215bf Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 31 Aug 2011 23:33:01 +0100 Subject: [PATCH] Fix a bug where the non-root parts of rezzed objects that had previously been attachments were sending their old attachment values to the client. The root part state is the canonical value, so always send that instead. Sending conflicting attachments states for non-root parts of a rezzed object is enough to crash the client. Fixes http://opensimulator.org/mantis/view.php?id=5664. Many thanks to mewtwo0641 for some fantastic qa work on this one. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index dc9a6ed077..661e9db2e6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4761,6 +4761,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP else attachPoint = 0; +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Sending attachPoint {0} for {1} {2} to {3}", +// attachPoint, part.Name, part.LocalId, Name); + collisionPlane = Vector4.Zero; position = part.RelativePosition; velocity = part.Velocity; @@ -4925,9 +4929,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP else { update.NameValue = Utils.EmptyBytes; - update.State = data.Shape.State; + + // The root part state is the canonical state for all parts of the object. The other part states in the + // case for attachments may contain conflicting values that can end up crashing the viewer. + update.State = data.ParentGroup.RootPart.Shape.State; } +// m_log.DebugFormat( +// "[LLCLIENTVIEW]: Sending state {0} for {1} {2} to {3}", +// update.State, data.Name, data.LocalId, Name); + update.ObjectData = objectData; update.ParentID = data.ParentID; update.PathBegin = data.Shape.PathBegin;