Merge branch 'master' into careminster

Conflicts:
	OpenSim/Region/Framework/Scenes/SceneGraph.cs
avinationmerge
Melanie 2012-01-25 00:45:57 +00:00
commit 427ab55058
10 changed files with 184 additions and 168 deletions

View File

@ -42,15 +42,15 @@ namespace OpenSim.Framework.Statistics
{ {
private long abnormalClientThreadTerminations; private long abnormalClientThreadTerminations;
private long assetsInCache; // private long assetsInCache;
private long texturesInCache; // private long texturesInCache;
private long assetCacheMemoryUsage; // private long assetCacheMemoryUsage;
private long textureCacheMemoryUsage; // private long textureCacheMemoryUsage;
private TimeSpan assetRequestTimeAfterCacheMiss; // private TimeSpan assetRequestTimeAfterCacheMiss;
private long blockedMissingTextureRequests; // private long blockedMissingTextureRequests;
private long assetServiceRequestFailures; // private long assetServiceRequestFailures;
private long inventoryServiceRetrievalFailures; // private long inventoryServiceRetrievalFailures;
private volatile float timeDilation; private volatile float timeDilation;
private volatile float simFps; private volatile float simFps;
@ -79,27 +79,27 @@ namespace OpenSim.Framework.Statistics
/// </summary> /// </summary>
public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } } public long AbnormalClientThreadTerminations { get { return abnormalClientThreadTerminations; } }
/// <summary> // /// <summary>
/// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the // /// These statistics are being collected by push rather than pull. Pull would be simpler, but I had the
/// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these // /// notion of providing some flow statistics (which pull wouldn't give us). Though admittedly these
/// haven't yet been implemented... // /// haven't yet been implemented...
/// </summary> // /// </summary>
public long AssetsInCache { get { return assetsInCache; } } // public long AssetsInCache { get { return assetsInCache; } }
//
/// <value> // /// <value>
/// Currently unused // /// Currently unused
/// </value> // /// </value>
public long TexturesInCache { get { return texturesInCache; } } // public long TexturesInCache { get { return texturesInCache; } }
//
/// <value> // /// <value>
/// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit // /// Currently misleading since we can't currently subtract removed asset memory usage without a performance hit
/// </value> // /// </value>
public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } } // public long AssetCacheMemoryUsage { get { return assetCacheMemoryUsage; } }
//
/// <value> // /// <value>
/// Currently unused // /// Currently unused
/// </value> // /// </value>
public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } } // public long TextureCacheMemoryUsage { get { return textureCacheMemoryUsage; } }
public float TimeDilation { get { return timeDilation; } } public float TimeDilation { get { return timeDilation; } }
public float SimFps { get { return simFps; } } public float SimFps { get { return simFps; } }
@ -123,32 +123,33 @@ namespace OpenSim.Framework.Statistics
public float ActiveScripts { get { return activeScripts; } } public float ActiveScripts { get { return activeScripts; } }
public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } } public float ScriptLinesPerSecond { get { return scriptLinesPerSecond; } }
/// <summary> // /// <summary>
/// This is the time it took for the last asset request made in response to a cache miss. // /// This is the time it took for the last asset request made in response to a cache miss.
/// </summary> // /// </summary>
public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } } // public TimeSpan AssetRequestTimeAfterCacheMiss { get { return assetRequestTimeAfterCacheMiss; } }
//
/// <summary> // /// <summary>
/// Number of persistent requests for missing textures we have started blocking from clients. To some extent // /// Number of persistent requests for missing textures we have started blocking from clients. To some extent
/// this is just a temporary statistic to keep this problem in view - the root cause of this lies either // /// this is just a temporary statistic to keep this problem in view - the root cause of this lies either
/// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics // /// in a mishandling of the reply protocol, related to avatar appearance or may even originate in graphics
/// driver bugs on clients (though this seems less likely). // /// driver bugs on clients (though this seems less likely).
/// </summary> // /// </summary>
public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } } // public long BlockedMissingTextureRequests { get { return blockedMissingTextureRequests; } }
//
/// <summary> // /// <summary>
/// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as // /// Record the number of times that an asset request has failed. Failures are effectively exceptions, such as
/// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted // /// request timeouts. If an asset service replies that a particular asset cannot be found, this is not counted
/// as a failure // /// as a failure
/// </summary> // /// </summary>
public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } } // public long AssetServiceRequestFailures { get { return assetServiceRequestFailures; } }
/// <summary> /// <summary>
/// Number of known failures to retrieve avatar inventory from the inventory service. This does not /// Number of known failures to retrieve avatar inventory from the inventory service. This does not
/// cover situations where the inventory service accepts the request but never returns any data, since /// cover situations where the inventory service accepts the request but never returns any data, since
/// we do not yet timeout this situation. /// we do not yet timeout this situation.
/// </summary> /// </summary>
public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } } /// <remarks>Commented out because we do not cache inventory at this point</remarks>
// public long InventoryServiceRetrievalFailures { get { return inventoryServiceRetrievalFailures; } }
/// <summary> /// <summary>
/// Retrieve the total frame time (in ms) of the last frame /// Retrieve the total frame time (in ms) of the last frame
@ -171,58 +172,58 @@ namespace OpenSim.Framework.Statistics
abnormalClientThreadTerminations++; abnormalClientThreadTerminations++;
} }
public void AddAsset(AssetBase asset) // public void AddAsset(AssetBase asset)
{ // {
assetsInCache++; // assetsInCache++;
//assetCacheMemoryUsage += asset.Data.Length; // //assetCacheMemoryUsage += asset.Data.Length;
} // }
//
// public void RemoveAsset(UUID uuid)
// {
// assetsInCache--;
// }
//
// public void AddTexture(AssetBase image)
// {
// if (image.Data != null)
// {
// texturesInCache++;
//
// // This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
// textureCacheMemoryUsage += image.Data.Length;
// }
// }
//
// /// <summary>
// /// Signal that the asset cache has been cleared.
// /// </summary>
// public void ClearAssetCacheStatistics()
// {
// assetsInCache = 0;
// assetCacheMemoryUsage = 0;
// texturesInCache = 0;
// textureCacheMemoryUsage = 0;
// }
//
// public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
// {
// assetRequestTimeAfterCacheMiss = ts;
// }
//
// public void AddBlockedMissingTextureRequest()
// {
// blockedMissingTextureRequests++;
// }
//
// public void AddAssetServiceRequestFailure()
// {
// assetServiceRequestFailures++;
// }
public void RemoveAsset(UUID uuid) // public void AddInventoryServiceRetrievalFailure()
{ // {
assetsInCache--; // inventoryServiceRetrievalFailures++;
} // }
public void AddTexture(AssetBase image)
{
if (image.Data != null)
{
texturesInCache++;
// This could have been a pull stat, though there was originally a nebulous idea to measure flow rates
textureCacheMemoryUsage += image.Data.Length;
}
}
/// <summary>
/// Signal that the asset cache has been cleared.
/// </summary>
public void ClearAssetCacheStatistics()
{
assetsInCache = 0;
assetCacheMemoryUsage = 0;
texturesInCache = 0;
textureCacheMemoryUsage = 0;
}
public void AddAssetRequestTimeAfterCacheMiss(TimeSpan ts)
{
assetRequestTimeAfterCacheMiss = ts;
}
public void AddBlockedMissingTextureRequest()
{
blockedMissingTextureRequests++;
}
public void AddAssetServiceRequestFailure()
{
assetServiceRequestFailures++;
}
public void AddInventoryServiceRetrievalFailure()
{
inventoryServiceRetrievalFailures++;
}
/// <summary> /// <summary>
/// Register as a packet queue stats provider /// Register as a packet queue stats provider
@ -290,8 +291,8 @@ namespace OpenSim.Framework.Statistics
public override string Report() public override string Report()
{ {
StringBuilder sb = new StringBuilder(Environment.NewLine); StringBuilder sb = new StringBuilder(Environment.NewLine);
sb.Append("ASSET STATISTICS"); // sb.Append("ASSET STATISTICS");
sb.Append(Environment.NewLine); // sb.Append(Environment.NewLine);
/* /*
sb.Append( sb.Append(
@ -308,6 +309,7 @@ Asset service request failures: {6}"+ Environment.NewLine,
AssetServiceRequestFailures)); AssetServiceRequestFailures));
*/ */
/*
sb.Append( sb.Append(
string.Format( string.Format(
@"Asset cache contains {0,6} assets @"Asset cache contains {0,6} assets
@ -318,7 +320,7 @@ Asset service request failures: {3}" + Environment.NewLine,
assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0, assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0,
BlockedMissingTextureRequests, BlockedMissingTextureRequests,
AssetServiceRequestFailures)); AssetServiceRequestFailures));
*/
sb.Append(Environment.NewLine); sb.Append(Environment.NewLine);
sb.Append("CONNECTION STATISTICS"); sb.Append("CONNECTION STATISTICS");
@ -328,13 +330,13 @@ Asset service request failures: {3}" + Environment.NewLine,
"Abnormal client thread terminations: {0}" + Environment.NewLine, "Abnormal client thread terminations: {0}" + Environment.NewLine,
abnormalClientThreadTerminations)); abnormalClientThreadTerminations));
sb.Append(Environment.NewLine); // sb.Append(Environment.NewLine);
sb.Append("INVENTORY STATISTICS"); // sb.Append("INVENTORY STATISTICS");
sb.Append(Environment.NewLine); // sb.Append(Environment.NewLine);
sb.Append( // sb.Append(
string.Format( // string.Format(
"Initial inventory caching failures: {0}" + Environment.NewLine, // "Initial inventory caching failures: {0}" + Environment.NewLine,
InventoryServiceRetrievalFailures)); // InventoryServiceRetrievalFailures));
sb.Append(Environment.NewLine); sb.Append(Environment.NewLine);
sb.Append("FRAME STATISTICS"); sb.Append("FRAME STATISTICS");
@ -390,17 +392,17 @@ Asset service request failures: {3}" + Environment.NewLine,
public override string XReport(string uptime, string version) public override string XReport(string uptime, string version)
{ {
OSDMap args = new OSDMap(30); OSDMap args = new OSDMap(30);
args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache)); // args["AssetsInCache"] = OSD.FromString (String.Format ("{0:0.##}", AssetsInCache));
args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}", // args["TimeAfterCacheMiss"] = OSD.FromString (String.Format ("{0:0.##}",
assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0)); // assetRequestTimeAfterCacheMiss.Milliseconds / 1000.0));
args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}", // args["BlockedMissingTextureRequests"] = OSD.FromString (String.Format ("{0:0.##}",
BlockedMissingTextureRequests)); // BlockedMissingTextureRequests));
args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}", // args["AssetServiceRequestFailures"] = OSD.FromString (String.Format ("{0:0.##}",
AssetServiceRequestFailures)); // AssetServiceRequestFailures));
args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}", // args["abnormalClientThreadTerminations"] = OSD.FromString (String.Format ("{0:0.##}",
abnormalClientThreadTerminations)); // abnormalClientThreadTerminations));
args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}", // args["InventoryServiceRetrievalFailures"] = OSD.FromString (String.Format ("{0:0.##}",
InventoryServiceRetrievalFailures)); // InventoryServiceRetrievalFailures));
args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation)); args["Dilatn"] = OSD.FromString (String.Format ("{0:0.##}", timeDilation));
args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps)); args["SimFPS"] = OSD.FromString (String.Format ("{0:0.##}", simFps));
args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps)); args["PhyFPS"] = OSD.FromString (String.Format ("{0:0.##}", physicsFps));

View File

@ -107,15 +107,13 @@ namespace OpenSim
} }
else else
{ {
m_log.ErrorFormat("Master ini file {0} not found", masterFilePath); m_log.ErrorFormat("Master ini file {0} not found", Path.GetFullPath(masterFilePath));
Environment.Exit(1); Environment.Exit(1);
} }
} }
} }
string iniFileName = startupConfig.GetString("inifile", "OpenSim.ini");
string iniFileName =
startupConfig.GetString("inifile", "OpenSim.ini");
if (IsUri(iniFileName)) if (IsUri(iniFileName))
{ {
@ -131,8 +129,7 @@ namespace OpenSim
if (!File.Exists(Application.iniFilePath)) if (!File.Exists(Application.iniFilePath))
{ {
iniFileName = "OpenSim.xml"; iniFileName = "OpenSim.xml";
Application.iniFilePath = Path.GetFullPath( Application.iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), iniFileName));
Path.Combine(Util.configDir(), iniFileName));
} }
if (File.Exists(Application.iniFilePath)) if (File.Exists(Application.iniFilePath))
@ -142,15 +139,12 @@ namespace OpenSim
} }
} }
string iniDirName = string iniDirName = startupConfig.GetString("inidirectory", "config");
startupConfig.GetString("inidirectory", "config"); string iniDirPath = Path.Combine(Util.configDir(), iniDirName);
string iniDirPath =
Path.Combine(Util.configDir(), iniDirName);
if (Directory.Exists(iniDirPath)) if (Directory.Exists(iniDirPath))
{ {
m_log.InfoFormat("Searching folder {0} for config ini files", m_log.InfoFormat("Searching folder {0} for config ini files", iniDirPath);
iniDirPath);
string[] fileEntries = Directory.GetFiles(iniDirName); string[] fileEntries = Directory.GetFiles(iniDirName);
foreach (string filePath in fileEntries) foreach (string filePath in fileEntries)
@ -172,7 +166,6 @@ namespace OpenSim
if (sources.Count == 0) if (sources.Count == 0)
{ {
m_log.FatalFormat("[CONFIG]: Could not load any configuration"); m_log.FatalFormat("[CONFIG]: Could not load any configuration");
m_log.FatalFormat("[CONFIG]: Did you copy the OpenSimDefaults.ini.example file to OpenSimDefaults.ini?");
Environment.Exit(1); Environment.Exit(1);
} }

View File

@ -211,16 +211,16 @@ namespace OpenSim
// Load the simulation data service // Load the simulation data service
IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"]; IConfig simDataConfig = m_config.Source.Configs["SimulationDataStore"];
if (simDataConfig == null) if (simDataConfig == null)
throw new Exception("Configuration file is missing the [SimulationDataStore] section"); throw new Exception("Configuration file is missing the [SimulationDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
string module = simDataConfig.GetString("LocalServiceModule", String.Empty); string module = simDataConfig.GetString("LocalServiceModule", String.Empty);
if (String.IsNullOrEmpty(module)) if (String.IsNullOrEmpty(module))
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section"); throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [SimulationDataStore] section.");
m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source }); m_simulationDataService = ServerUtils.LoadPlugin<ISimulationDataService>(module, new object[] { m_config.Source });
// Load the estate data service // Load the estate data service
IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"]; IConfig estateDataConfig = m_config.Source.Configs["EstateDataStore"];
if (estateDataConfig == null) if (estateDataConfig == null)
throw new Exception("Configuration file is missing the [EstateDataStore] section"); throw new Exception("Configuration file is missing the [EstateDataStore] section. Have you copied OpenSim.ini.example to OpenSim.ini to reference config-include/ files?");
module = estateDataConfig.GetString("LocalServiceModule", String.Empty); module = estateDataConfig.GetString("LocalServiceModule", String.Empty);
if (String.IsNullOrEmpty(module)) if (String.IsNullOrEmpty(module))
throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section"); throw new Exception("Configuration file is missing the LocalServiceModule parameter in the [EstateDataStore] section");

View File

@ -492,6 +492,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60) if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > 1000 * 60)
{ {
m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID);
StatsManager.SimExtraStats.AddAbnormalClientThreadTermination();
RemoveClient(udpClient); RemoveClient(udpClient);
return; return;

View File

@ -1250,6 +1250,24 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
responsemap["7"] = responsearr; responsemap["7"] = responsearr;
} }
if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
{
SceneObjectPart sop = m_scene.GetSceneObjectPart(m_scene.RegionInfo.RegionSettings.TelehubObject);
OSDArray responsearr = new OSDArray();
OSDMap responsemapdata = new OSDMap();
responsemapdata["X"] = OSD.FromInteger((int)(xstart + sop.AbsolutePosition.X));
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + sop.AbsolutePosition.Y));
// responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y));
responsemapdata["ID"] = OSD.FromUUID(sop.UUID);
responsemapdata["Name"] = OSD.FromString(sop.Name);
responsemapdata["Extra"] = OSD.FromInteger(0); // color (unused)
responsemapdata["Extra2"] = OSD.FromInteger(0); // 0 = telehub / 1 = infohub
responsearr.Add(responsemapdata);
responsemap["1"] = responsearr;
}
return responsemap; return responsemap;
} }

View File

@ -66,12 +66,9 @@ namespace OpenSim.Region.Framework.Scenes
protected internal event PhysicsCrash UnRecoverableError; protected internal event PhysicsCrash UnRecoverableError;
private PhysicsCrash handlerPhysicsCrash = null; private PhysicsCrash handlerPhysicsCrash = null;
public event ObjectDuplicateDelegate OnObjectDuplicate;
public event AttachToBackupDelegate OnAttachToBackup; public event AttachToBackupDelegate OnAttachToBackup;
public event DetachFromBackupDelegate OnDetachFromBackup; public event DetachFromBackupDelegate OnDetachFromBackup;
public event ChangedBackupDelegate OnChangeBackup; public event ChangedBackupDelegate OnChangeBackup;
public event ObjectCreateDelegate OnObjectCreate;
public event ObjectDeleteDelegate OnObjectRemove;
#endregion #endregion
@ -445,9 +442,6 @@ namespace OpenSim.Region.Framework.Scenes
if (attachToBackup) if (attachToBackup)
sceneObject.AttachToBackup(); sceneObject.AttachToBackup();
if (OnObjectCreate != null)
OnObjectCreate(sceneObject);
lock (SceneObjectGroupsByFullID) lock (SceneObjectGroupsByFullID)
SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject; SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject;
@ -497,9 +491,6 @@ namespace OpenSim.Region.Framework.Scenes
RemovePhysicalPrim(grp.PrimCount); RemovePhysicalPrim(grp.PrimCount);
} }
if (OnObjectRemove != null)
OnObjectRemove(Entities[uuid]);
lock (SceneObjectGroupsByFullID) lock (SceneObjectGroupsByFullID)
SceneObjectGroupsByFullID.Remove(grp.UUID); SceneObjectGroupsByFullID.Remove(grp.UUID);
@ -2091,9 +2082,6 @@ namespace OpenSim.Region.Framework.Scenes
// required for physics to update it's position // required for physics to update it's position
copy.AbsolutePosition = copy.AbsolutePosition; copy.AbsolutePosition = copy.AbsolutePosition;
if (OnObjectDuplicate != null)
OnObjectDuplicate(original, copy);
return copy; return copy;
} }
} }

View File

@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
(mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd)));
scene.AddCommand( scene.AddCommand(
this, "show image queues", this, "image queues show",
"image queues show <first-name> <last-name>", "image queues show <first-name> <last-name>",
"Show the image queues (textures downloaded via UDP) for a particular client.", "Show the image queues (textures downloaded via UDP) for a particular client.",
(mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd)));
@ -293,7 +293,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden
private string GetImageQueuesReport(string[] showParams) private string GetImageQueuesReport(string[] showParams)
{ {
if (showParams.Length < 5 || showParams.Length > 6) if (showParams.Length < 5 || showParams.Length > 6)
return "Usage: show image queues <first-name> <last-name> [full]"; return "Usage: image queues show <first-name> <last-name> [full]";
string firstName = showParams[3]; string firstName = showParams[3];
string lastName = showParams[4]; string lastName = showParams[4];

View File

@ -134,9 +134,18 @@ namespace OpenSim.Region.Physics.OdePlugin
| CollisionCategories.Body | CollisionCategories.Body
| CollisionCategories.Character | CollisionCategories.Character
| CollisionCategories.Land); | CollisionCategories.Land);
internal IntPtr Body = IntPtr.Zero; /// <summary>
/// Body for dynamics simulation
/// </summary>
internal IntPtr Body { get; private set; }
private OdeScene _parent_scene; private OdeScene _parent_scene;
internal IntPtr Shell = IntPtr.Zero;
/// <summary>
/// Collision geometry
/// </summary>
internal IntPtr Shell { get; private set; }
private IntPtr Amotor = IntPtr.Zero; private IntPtr Amotor = IntPtr.Zero;
private d.Mass ShellMass; private d.Mass ShellMass;
@ -1018,6 +1027,13 @@ namespace OpenSim.Region.Physics.OdePlugin
/// <param name="tensor"></param> /// <param name="tensor"></param>
private void CreateOdeStructures(float npositionX, float npositionY, float npositionZ, float tensor) private void CreateOdeStructures(float npositionX, float npositionY, float npositionZ, float tensor)
{ {
if (!(Shell == IntPtr.Zero && Body == IntPtr.Zero && Amotor == IntPtr.Zero))
{
m_log.ErrorFormat(
"[ODE CHARACTER]: Creating ODE structures for {0} even though some already exist. Shell = {1}, Body = {2}, Amotor = {3}",
Name, Shell, Body, Amotor);
}
int dAMotorEuler = 1; int dAMotorEuler = 1;
// _parent_scene.waitForSpaceUnlock(_parent_scene.space); // _parent_scene.waitForSpaceUnlock(_parent_scene.space);
if (CAPSULE_LENGTH <= 0) if (CAPSULE_LENGTH <= 0)
@ -1135,6 +1151,14 @@ namespace OpenSim.Region.Physics.OdePlugin
/// </summary> /// </summary>
internal void DestroyOdeStructures() internal void DestroyOdeStructures()
{ {
// Create avatar capsule and related ODE data
if (Shell == IntPtr.Zero || Body == IntPtr.Zero || Amotor == IntPtr.Zero)
{
m_log.ErrorFormat(
"[ODE CHARACTER]: Destroying ODE structures for {0} even though some are already null. Shell = {1}, Body = {2}, Amotor = {3}",
Name, Shell, Body, Amotor);
}
// destroy avatar capsule and related ODE data // destroy avatar capsule and related ODE data
if (Amotor != IntPtr.Zero) if (Amotor != IntPtr.Zero)
{ {
@ -1260,15 +1284,6 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (m_tainted_isPhysical) if (m_tainted_isPhysical)
{ {
// Create avatar capsule and related ODE data
if (!(Shell == IntPtr.Zero && Body == IntPtr.Zero && Amotor == IntPtr.Zero))
{
m_log.Warn("[ODE CHARACTER]: re-creating the following avatar ODE data for " + Name + ", even though it already exists - "
+ (Shell!=IntPtr.Zero ? "Shell ":"")
+ (Body!=IntPtr.Zero ? "Body ":"")
+ (Amotor!=IntPtr.Zero ? "Amotor ":""));
}
CreateOdeStructures(_position.X, _position.Y, _position.Z, m_tensor); CreateOdeStructures(_position.X, _position.Y, _position.Z, m_tensor);
_parent_scene.AddCharacter(this); _parent_scene.AddCharacter(this);
} }

View File

@ -1525,7 +1525,7 @@ namespace OpenSim.Region.Physics.OdePlugin
chr.CollidingGround = false; chr.CollidingGround = false;
chr.CollidingObj = false; chr.CollidingObj = false;
// test the avatar's geometry for collision with the space // Test the avatar's geometry for collision with the space
// This will return near and the space that they are the closest to // This will return near and the space that they are the closest to
// And we'll run this again against the avatar and the space segment // And we'll run this again against the avatar and the space segment
// This will return with a bunch of possible objects in the space segment // This will return with a bunch of possible objects in the space segment

View File

@ -126,11 +126,10 @@ namespace OpenSim.Server.Base
m_Config = new IniConfigSource(iniFile); m_Config = new IniConfigSource(iniFile);
} }
} }
catch (Exception) catch (Exception e)
{ {
System.Console.WriteLine("Error reading from config source {0}", System.Console.WriteLine("Error reading from config source. {0}", e.Message);
iniFile); Environment.Exit(1);
Thread.CurrentThread.Abort();
} }
// Merge the configuration from the command line into the // Merge the configuration from the command line into the