Changing Scene.ForEachClient to use the synchronous for loop instead of Parallel. This is quite possibly the source of some deadlocking, and at the very least the synchronous version gives better stack traces

* Lock the LLUDPClient RTO math * Add a helper function for backing off the RTO, and follow the optional advice in RFC 2988 to clear existing SRTT and RTTVAR values during a backoff

* Removing the unused PrimitiveBaseShape.SculptImage parameter * Improved performance of SceneObjectPart instantiation * ZeroMesher now drops SculptData bytes like Meshmerizer, to allow the texture data to be GCed * Improved typecasting speed in MySQLLegacyRegionData.BuildShape()

* Improved the instantiation of PrimitiveBaseShape
0.6.8-post-fixes
John Hurliman 2009-10-25 00:40:21 -07:00
parent 2c34619aea
commit 730930955a
10 changed files with 160 additions and 152 deletions

View File

@ -167,9 +167,6 @@ namespace OpenSim.Data.MySQL
asset.Temporary = Convert.ToBoolean(dbReader["temporary"]); asset.Temporary = Convert.ToBoolean(dbReader["temporary"]);
} }
} }
if (asset != null)
UpdateAccessTime(asset);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -1430,37 +1430,36 @@ namespace OpenSim.Data.MySQL
{ {
PrimitiveBaseShape s = new PrimitiveBaseShape(); PrimitiveBaseShape s = new PrimitiveBaseShape();
s.Scale = new Vector3( s.Scale = new Vector3(
Convert.ToSingle(row["ScaleX"]), (float)(double)row["ScaleX"],
Convert.ToSingle(row["ScaleY"]), (float)(double)row["ScaleY"],
Convert.ToSingle(row["ScaleZ"]) (float)(double)row["ScaleZ"]
); );
// paths // paths
s.PCode = Convert.ToByte(row["PCode"]); s.PCode = (byte)(int)row["PCode"];
s.PathBegin = Convert.ToUInt16(row["PathBegin"]); s.PathBegin = (ushort)(int)row["PathBegin"];
s.PathEnd = Convert.ToUInt16(row["PathEnd"]); s.PathEnd = (ushort)(int)row["PathEnd"];
s.PathScaleX = Convert.ToByte(row["PathScaleX"]); s.PathScaleX = (byte)(int)row["PathScaleX"];
s.PathScaleY = Convert.ToByte(row["PathScaleY"]); s.PathScaleY = (byte)(int)row["PathScaleY"];
s.PathShearX = Convert.ToByte(row["PathShearX"]); s.PathShearX = (byte)(int)row["PathShearX"];
s.PathShearY = Convert.ToByte(row["PathShearY"]); s.PathShearY = (byte)(int)row["PathShearY"];
s.PathSkew = Convert.ToSByte(row["PathSkew"]); s.PathSkew = (sbyte)(int)row["PathSkew"];
s.PathCurve = Convert.ToByte(row["PathCurve"]); s.PathCurve = (byte)(int)row["PathCurve"];
s.PathRadiusOffset = Convert.ToSByte(row["PathRadiusOffset"]); s.PathRadiusOffset = (sbyte)(int)row["PathRadiusOffset"];
s.PathRevolutions = Convert.ToByte(row["PathRevolutions"]); s.PathRevolutions = (byte)(int)row["PathRevolutions"];
s.PathTaperX = Convert.ToSByte(row["PathTaperX"]); s.PathTaperX = (sbyte)(int)row["PathTaperX"];
s.PathTaperY = Convert.ToSByte(row["PathTaperY"]); s.PathTaperY = (sbyte)(int)row["PathTaperY"];
s.PathTwist = Convert.ToSByte(row["PathTwist"]); s.PathTwist = (sbyte)(int)row["PathTwist"];
s.PathTwistBegin = Convert.ToSByte(row["PathTwistBegin"]); s.PathTwistBegin = (sbyte)(int)row["PathTwistBegin"];
// profile // profile
s.ProfileBegin = Convert.ToUInt16(row["ProfileBegin"]); s.ProfileBegin = (ushort)(int)row["ProfileBegin"];
s.ProfileEnd = Convert.ToUInt16(row["ProfileEnd"]); s.ProfileEnd = (ushort)(int)row["ProfileEnd"];
s.ProfileCurve = Convert.ToByte(row["ProfileCurve"]); s.ProfileCurve = (byte)(int)row["ProfileCurve"];
s.ProfileHollow = Convert.ToUInt16(row["ProfileHollow"]); s.ProfileHollow = (ushort)(int)row["ProfileHollow"];
byte[] textureEntry = (byte[]) row["Texture"]; s.TextureEntry = (byte[])row["Texture"];
s.TextureEntry = textureEntry;
s.ExtraParams = (byte[])row["ExtraParams"]; s.ExtraParams = (byte[])row["ExtraParams"];
s.State = Convert.ToByte(row["State"]); s.State = (byte)(int)row["State"];
return s; return s;
} }

View File

@ -76,7 +76,7 @@ namespace OpenSim.Framework
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly Primitive.TextureEntry m_defaultTexture; private static readonly byte[] DEFAULT_TEXTURE = new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f")).GetBytes();
private byte[] m_textureEntry; private byte[] m_textureEntry;
@ -104,33 +104,32 @@ namespace OpenSim.Framework
private HollowShape _hollowShape; private HollowShape _hollowShape;
// Sculpted // Sculpted
[XmlIgnore] private UUID _sculptTexture = UUID.Zero; [XmlIgnore] private UUID _sculptTexture;
[XmlIgnore] private byte _sculptType = (byte)0; [XmlIgnore] private byte _sculptType;
[XmlIgnore] private byte[] _sculptData = new byte[0]; [XmlIgnore] private byte[] _sculptData = Utils.EmptyBytes;
[XmlIgnore] private Image _sculptBitmap = null;
// Flexi // Flexi
[XmlIgnore] private int _flexiSoftness = 0; [XmlIgnore] private int _flexiSoftness;
[XmlIgnore] private float _flexiTension = 0f; [XmlIgnore] private float _flexiTension;
[XmlIgnore] private float _flexiDrag = 0f; [XmlIgnore] private float _flexiDrag;
[XmlIgnore] private float _flexiGravity = 0f; [XmlIgnore] private float _flexiGravity;
[XmlIgnore] private float _flexiWind = 0f; [XmlIgnore] private float _flexiWind;
[XmlIgnore] private float _flexiForceX = 0f; [XmlIgnore] private float _flexiForceX;
[XmlIgnore] private float _flexiForceY = 0f; [XmlIgnore] private float _flexiForceY;
[XmlIgnore] private float _flexiForceZ = 0f; [XmlIgnore] private float _flexiForceZ;
//Bright n sparkly //Bright n sparkly
[XmlIgnore] private float _lightColorR = 0f; [XmlIgnore] private float _lightColorR;
[XmlIgnore] private float _lightColorG = 0f; [XmlIgnore] private float _lightColorG;
[XmlIgnore] private float _lightColorB = 0f; [XmlIgnore] private float _lightColorB;
[XmlIgnore] private float _lightColorA = 1f; [XmlIgnore] private float _lightColorA = 1.0f;
[XmlIgnore] private float _lightRadius = 0f; [XmlIgnore] private float _lightRadius;
[XmlIgnore] private float _lightCutoff = 0f; [XmlIgnore] private float _lightCutoff;
[XmlIgnore] private float _lightFalloff = 0f; [XmlIgnore] private float _lightFalloff;
[XmlIgnore] private float _lightIntensity = 1f; [XmlIgnore] private float _lightIntensity = 1.0f;
[XmlIgnore] private bool _flexiEntry = false; [XmlIgnore] private bool _flexiEntry;
[XmlIgnore] private bool _lightEntry = false; [XmlIgnore] private bool _lightEntry;
[XmlIgnore] private bool _sculptEntry = false; [XmlIgnore] private bool _sculptEntry;
public byte ProfileCurve public byte ProfileCurve
{ {
@ -172,17 +171,11 @@ namespace OpenSim.Framework
} }
} }
static PrimitiveBaseShape()
{
m_defaultTexture =
new Primitive.TextureEntry(new UUID("89556747-24cb-43ed-920b-47caed15465f"));
}
public PrimitiveBaseShape() public PrimitiveBaseShape()
{ {
PCode = (byte) PCodeEnum.Primitive; PCode = (byte) PCodeEnum.Primitive;
ExtraParams = new byte[1]; ExtraParams = new byte[1];
Textures = m_defaultTexture; m_textureEntry = DEFAULT_TEXTURE;
} }
public PrimitiveBaseShape(bool noShape) public PrimitiveBaseShape(bool noShape)
@ -192,7 +185,7 @@ namespace OpenSim.Framework
PCode = (byte)PCodeEnum.Primitive; PCode = (byte)PCodeEnum.Primitive;
ExtraParams = new byte[1]; ExtraParams = new byte[1];
Textures = m_defaultTexture; m_textureEntry = DEFAULT_TEXTURE;
} }
[XmlIgnore] [XmlIgnore]
@ -577,15 +570,6 @@ namespace OpenSim.Framework
} }
} }
public Image SculptBitmap {
get {
return _sculptBitmap;
}
set {
_sculptBitmap = value;
}
}
public int FlexiSoftness { public int FlexiSoftness {
get { get {
return _flexiSoftness; return _flexiSoftness;

View File

@ -144,6 +144,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private readonly OutgoingPacket[] m_nextPackets = new OutgoingPacket[THROTTLE_CATEGORY_COUNT]; private readonly OutgoingPacket[] m_nextPackets = new OutgoingPacket[THROTTLE_CATEGORY_COUNT];
/// <summary>A reference to the LLUDPServer that is managing this client</summary> /// <summary>A reference to the LLUDPServer that is managing this client</summary>
private readonly LLUDPServer m_udpServer; private readonly LLUDPServer m_udpServer;
/// <summary>Locks access to the variables used while calculating round-trip
/// packet times and the retransmission timeout</summary>
private readonly object m_roundTripCalcLock = new object();
/// <summary> /// <summary>
/// Default constructor /// Default constructor
@ -484,6 +487,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
const float BETA = 0.25f; const float BETA = 0.25f;
const float K = 4.0f; const float K = 4.0f;
lock (m_roundTripCalcLock)
{
if (RTTVAR == 0.0f) if (RTTVAR == 0.0f)
{ {
// First RTT measurement // First RTT measurement
@ -497,15 +502,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP
SRTT = (1.0f - ALPHA) * SRTT + ALPHA * r; SRTT = (1.0f - ALPHA) * SRTT + ALPHA * r;
} }
RTO = (int)(SRTT + Math.Max(m_udpServer.TickCountResolution, K * RTTVAR)); int rto = (int)(SRTT + Math.Max(m_udpServer.TickCountResolution, K * RTTVAR));
// Clamp the retransmission timeout to manageable values // Clamp the retransmission timeout to manageable values
RTO = Utils.Clamp(RTO, 3000, 60000); rto = Utils.Clamp(RTO, 3000, 60000);
RTO = rto;
}
//m_log.Debug("[LLUDPCLIENT]: Setting agent " + this.Agent.FullName + "'s RTO to " + RTO + "ms with an RTTVAR of " + //m_log.Debug("[LLUDPCLIENT]: Setting agent " + this.Agent.FullName + "'s RTO to " + RTO + "ms with an RTTVAR of " +
// RTTVAR + " based on new RTT of " + r + "ms"); // RTTVAR + " based on new RTT of " + r + "ms");
} }
/// <summary>
/// Exponential backoff of the retransmission timeout, per section 5.5
/// of RFC 2988
/// </summary>
public void BackoffRTO()
{
lock (m_roundTripCalcLock)
{
// Reset SRTT and RTTVAR, we assume they are bogus since things
// didn't work out and we're backing off the timeout
SRTT = 0.0f;
RTTVAR = 0.0f;
// Double the retransmission timeout
RTO = Math.Min(RTO * 2, 60000);
}
}
/// <summary> /// <summary>
/// Does an early check to see if this queue empty callback is already /// Does an early check to see if this queue empty callback is already
/// running, then asynchronously firing the event /// running, then asynchronously firing the event

View File

@ -431,8 +431,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{ {
m_log.Debug("[LLUDPSERVER]: Resending " + expiredPackets.Count + " packets to " + udpClient.AgentID + ", RTO=" + udpClient.RTO); m_log.Debug("[LLUDPSERVER]: Resending " + expiredPackets.Count + " packets to " + udpClient.AgentID + ", RTO=" + udpClient.RTO);
// Backoff the RTO // Exponential backoff of the retransmission timeout
udpClient.RTO = Math.Min(udpClient.RTO * 2, 60000); udpClient.BackoffRTO();
// Resend packets // Resend packets
for (int i = 0; i < expiredPackets.Count; i++) for (int i = 0; i < expiredPackets.Count; i++)

View File

@ -4246,7 +4246,7 @@ namespace OpenSim.Region.Framework.Scenes
public void ForEachClient(Action<IClientAPI> action) public void ForEachClient(Action<IClientAPI> action)
{ {
ClientManager.ForEach(action); ClientManager.ForEachSync(action);
} }
public void ForEachSOG(Action<SceneObjectGroup> action) public void ForEachSOG(Action<SceneObjectGroup> action)

View File

@ -1334,7 +1334,7 @@ namespace OpenSim.Region.Framework.Scenes
(parcel.LandData.GroupID != GroupID || (parcel.LandData.GroupID != GroupID ||
parcel.LandData.GroupID == UUID.Zero)) parcel.LandData.GroupID == UUID.Zero))
{ {
if ((DateTime.Now - RootPart.Rezzed).TotalMinutes > if ((DateTime.UtcNow - RootPart.Rezzed).TotalMinutes >
parcel.LandData.OtherCleanTime) parcel.LandData.OtherCleanTime)
{ {
DetachFromBackup(); DetachFromBackup();

View File

@ -102,16 +102,16 @@ namespace OpenSim.Region.Framework.Scenes
#region Fields #region Fields
public bool AllowedDrop = false; public bool AllowedDrop;
[XmlIgnore] [XmlIgnore]
public bool DIE_AT_EDGE = false; public bool DIE_AT_EDGE;
// TODO: This needs to be persisted in next XML version update! // TODO: This needs to be persisted in next XML version update!
[XmlIgnore] [XmlIgnore]
public int[] PayPrice = {-2,-2,-2,-2,-2}; public readonly int[] PayPrice = {-2,-2,-2,-2,-2};
[XmlIgnore] [XmlIgnore]
public PhysicsActor PhysActor = null; public PhysicsActor PhysActor;
//Xantor 20080528 Sound stuff: //Xantor 20080528 Sound stuff:
// Note: This isn't persisted in the database right now, as the fields for that aren't just there yet. // Note: This isn't persisted in the database right now, as the fields for that aren't just there yet.
@ -130,22 +130,22 @@ namespace OpenSim.Region.Framework.Scenes
public double SoundRadius; public double SoundRadius;
[XmlIgnore] [XmlIgnore]
public uint TimeStampFull = 0; public uint TimeStampFull;
[XmlIgnore] [XmlIgnore]
public uint TimeStampLastActivity = 0; // Will be used for AutoReturn public uint TimeStampLastActivity; // Will be used for AutoReturn
[XmlIgnore] [XmlIgnore]
public uint TimeStampTerse = 0; public uint TimeStampTerse;
[XmlIgnore] [XmlIgnore]
public UUID FromItemID = UUID.Zero; public UUID FromItemID;
/// <value> /// <value>
/// The UUID of the user inventory item from which this object was rezzed if this is a root part. /// The UUID of the user inventory item from which this object was rezzed if this is a root part.
/// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item. /// If UUID.Zero then either this is not a root part or there is no connection with a user inventory item.
/// </value> /// </value>
private UUID m_fromUserInventoryItemID = UUID.Zero; private UUID m_fromUserInventoryItemID;
[XmlIgnore] [XmlIgnore]
public UUID FromUserInventoryItemID public UUID FromUserInventoryItemID
@ -154,31 +154,32 @@ namespace OpenSim.Region.Framework.Scenes
} }
[XmlIgnore] [XmlIgnore]
public bool IsAttachment = false; public bool IsAttachment;
[XmlIgnore] [XmlIgnore]
public scriptEvents AggregateScriptEvents = 0; public scriptEvents AggregateScriptEvents;
[XmlIgnore] [XmlIgnore]
public UUID AttachedAvatar = UUID.Zero; public UUID AttachedAvatar;
[XmlIgnore] [XmlIgnore]
public Vector3 AttachedPos = Vector3.Zero; public Vector3 AttachedPos;
[XmlIgnore] [XmlIgnore]
public uint AttachmentPoint = (byte)0; public uint AttachmentPoint;
[XmlIgnore] [XmlIgnore]
public PhysicsVector RotationAxis = new PhysicsVector(1f, 1f, 1f); public PhysicsVector RotationAxis = new PhysicsVector(1f, 1f, 1f);
[XmlIgnore] [XmlIgnore]
public bool VolumeDetectActive = false; // XmlIgnore set to avoid problems with persistance until I come to care for this public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this
// Certainly this must be a persistant setting finally // Certainly this must be a persistant setting finally
[XmlIgnore] [XmlIgnore]
public bool IsWaitingForFirstSpinUpdatePacket = false; public bool IsWaitingForFirstSpinUpdatePacket;
[XmlIgnore] [XmlIgnore]
public Quaternion SpinOldOrientation = new Quaternion(); public Quaternion SpinOldOrientation = Quaternion.Identity;
/// <summary> /// <summary>
/// This part's inventory /// This part's inventory
@ -191,34 +192,32 @@ namespace OpenSim.Region.Framework.Scenes
protected SceneObjectPartInventory m_inventory; protected SceneObjectPartInventory m_inventory;
[XmlIgnore] [XmlIgnore]
public bool Undoing = false; public bool Undoing;
[XmlIgnore] [XmlIgnore]
private PrimFlags LocalFlags = 0; private PrimFlags LocalFlags;
[XmlIgnore] [XmlIgnore]
private float m_damage = -1.0f; private float m_damage = -1.0f;
private byte[] m_TextureAnimation; private byte[] m_TextureAnimation;
private byte m_clickAction = 0; private byte m_clickAction;
private Color m_color = Color.Black; private Color m_color = Color.Black;
private string m_description = String.Empty; private string m_description = String.Empty;
private readonly List<uint> m_lastColliders = new List<uint>(); private readonly List<uint> m_lastColliders = new List<uint>();
// private PhysicsVector m_lastRotationalVelocity = PhysicsVector.Zero; private int m_linkNum;
private int m_linkNum = 0;
[XmlIgnore] [XmlIgnore]
private int m_scriptAccessPin = 0; private int m_scriptAccessPin;
[XmlIgnore] [XmlIgnore]
private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>(); private readonly Dictionary<UUID, scriptEvents> m_scriptEvents = new Dictionary<UUID, scriptEvents>();
private string m_sitName = String.Empty; private string m_sitName = String.Empty;
private Quaternion m_sitTargetOrientation = Quaternion.Identity; private Quaternion m_sitTargetOrientation = Quaternion.Identity;
private Vector3 m_sitTargetPosition = Vector3.Zero; private Vector3 m_sitTargetPosition;
private string m_sitAnimation = "SIT"; private string m_sitAnimation = "SIT";
private string m_text = String.Empty; private string m_text = String.Empty;
private string m_touchName = String.Empty; private string m_touchName = String.Empty;
private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
private UUID _creatorID; private UUID _creatorID;
private bool m_passTouches;
private bool m_passTouches = false;
/// <summary> /// <summary>
/// Only used internally to schedule client updates. /// Only used internally to schedule client updates.
@ -236,28 +235,28 @@ namespace OpenSim.Region.Framework.Scenes
//unkown if this will be kept, added as a way of removing the group position from the group class //unkown if this will be kept, added as a way of removing the group position from the group class
protected Vector3 m_groupPosition; protected Vector3 m_groupPosition;
protected uint m_localId; protected uint m_localId;
protected Material m_material = (Material)3; // Wood protected Material m_material = OpenMetaverse.Material.Wood;
protected string m_name; protected string m_name;
protected Vector3 m_offsetPosition; protected Vector3 m_offsetPosition;
// FIXME, TODO, ERROR: 'ParentGroup' can't be in here, move it out. // FIXME, TODO, ERROR: 'ParentGroup' can't be in here, move it out.
protected SceneObjectGroup m_parentGroup; protected SceneObjectGroup m_parentGroup;
protected byte[] m_particleSystem = new byte[0]; protected byte[] m_particleSystem = Utils.EmptyBytes;
protected ulong m_regionHandle; protected ulong m_regionHandle;
protected Quaternion m_rotationOffset; protected Quaternion m_rotationOffset;
protected PrimitiveBaseShape m_shape = null; protected PrimitiveBaseShape m_shape;
protected UUID m_uuid; protected UUID m_uuid;
protected Vector3 m_velocity; protected Vector3 m_velocity;
// TODO: Those have to be changed into persistent properties at some later point, // TODO: Those have to be changed into persistent properties at some later point,
// or sit-camera on vehicles will break on sim-crossing. // or sit-camera on vehicles will break on sim-crossing.
private Vector3 m_cameraEyeOffset = new Vector3(0.0f, 0.0f, 0.0f); private Vector3 m_cameraEyeOffset;
private Vector3 m_cameraAtOffset = new Vector3(0.0f, 0.0f, 0.0f); private Vector3 m_cameraAtOffset;
private bool m_forceMouselook = false; private bool m_forceMouselook;
// TODO: Collision sound should have default. // TODO: Collision sound should have default.
private UUID m_collisionSound = UUID.Zero; private UUID m_collisionSound;
private float m_collisionSoundVolume = 0.0f; private float m_collisionSoundVolume;
#endregion Fields #endregion Fields
@ -269,9 +268,9 @@ namespace OpenSim.Region.Framework.Scenes
public SceneObjectPart() public SceneObjectPart()
{ {
// It's not necessary to persist this // It's not necessary to persist this
m_TextureAnimation = new byte[0]; m_TextureAnimation = Utils.EmptyBytes;
m_particleSystem = new byte[0]; m_particleSystem = Utils.EmptyBytes;
Rezzed = DateTime.Now; Rezzed = DateTime.UtcNow;
m_inventory = new SceneObjectPartInventory(this); m_inventory = new SceneObjectPartInventory(this);
} }
@ -290,8 +289,8 @@ namespace OpenSim.Region.Framework.Scenes
{ {
m_name = "Primitive"; m_name = "Primitive";
Rezzed = DateTime.Now; Rezzed = DateTime.UtcNow;
_creationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
_ownerID = ownerID; _ownerID = ownerID;
_creatorID = _ownerID; _creatorID = _ownerID;
_lastOwnerID = UUID.Zero; _lastOwnerID = UUID.Zero;
@ -299,19 +298,19 @@ namespace OpenSim.Region.Framework.Scenes
Shape = shape; Shape = shape;
// Todo: Add More Object Parameter from above! // Todo: Add More Object Parameter from above!
_ownershipCost = 0; _ownershipCost = 0;
_objectSaleType = (byte) 0; _objectSaleType = 0;
_salePrice = 0; _salePrice = 0;
_category = (uint) 0; _category = 0;
_lastOwnerID = _creatorID; _lastOwnerID = _creatorID;
// End Todo: /// // End Todo: ///
GroupPosition = groupPosition; GroupPosition = groupPosition;
OffsetPosition = offsetPosition; OffsetPosition = offsetPosition;
RotationOffset = rotationOffset; RotationOffset = rotationOffset;
Velocity = new Vector3(0, 0, 0); Velocity = Vector3.Zero;
AngularVelocity = new Vector3(0, 0, 0); AngularVelocity = Vector3.Zero;
Acceleration = new Vector3(0, 0, 0); Acceleration = Vector3.Zero;
m_TextureAnimation = new byte[0]; m_TextureAnimation = Utils.EmptyBytes;
m_particleSystem = new byte[0]; m_particleSystem = Utils.EmptyBytes;
// Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
// this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
@ -3548,7 +3547,7 @@ if (m_shape != null) {
// in SL. // in SL.
// //
if (ParentGroup.RootPart != this) if (ParentGroup.RootPart != this)
ParentGroup.RootPart.Rezzed = DateTime.Now; ParentGroup.RootPart.Rezzed = DateTime.UtcNow;
ParentGroup.HasGroupChanged = true; ParentGroup.HasGroupChanged = true;
ScheduleFullUpdate(); ScheduleFullUpdate();

View File

@ -67,6 +67,9 @@ namespace OpenSim.Region.Physics.Manager
public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod, bool isPhysical) public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size, float lod, bool isPhysical)
{ {
// Remove the reference to the encoded JPEG2000 data so it can be GCed
primShape.SculptData = OpenMetaverse.Utils.EmptyBytes;
return null; return null;
} }
} }

View File

@ -281,7 +281,7 @@ namespace OpenSim.Region.Physics.Meshing
if (idata == null) if (idata == null)
{ {
if (primShape.SculptData.Length == 0) if (primShape.SculptData == null || primShape.SculptData.Length == 0)
return null; return null;
try try