Put guards on a bunch of exception-inducing code, as seen in logs from load test.
parent
b2d4b8b1da
commit
67e500383e
|
@ -171,11 +171,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
if (!so.IsAttachment)
|
if (!so.IsAttachment)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (so.Scene.UserManagementModule.IsLocalGridUser(so.AttachedAvatar))
|
if (so.AttachedAvatar == UUID.Zero || Scene.UserManagementModule.IsLocalGridUser(so.AttachedAvatar))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// foreign user
|
// foreign user
|
||||||
AgentCircuitData aCircuit = so.Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar);
|
AgentCircuitData aCircuit = Scene.AuthenticateHandler.GetAgentCircuitData(so.AttachedAvatar);
|
||||||
if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
|
if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
|
||||||
{
|
{
|
||||||
if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
if (aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
||||||
|
@ -183,7 +183,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
|
string url = aCircuit.ServiceURLs["AssetServerURI"].ToString();
|
||||||
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url);
|
m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Incoming attachement {0} for HG user {1} with asset server {2}", so.Name, so.AttachedAvatar, url);
|
||||||
Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
|
Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
|
||||||
HGUuidGatherer uuidGatherer = new HGUuidGatherer(so.Scene.AssetService, url);
|
HGUuidGatherer uuidGatherer = new HGUuidGatherer(Scene.AssetService, url);
|
||||||
uuidGatherer.GatherAssetUuids(so, ids);
|
uuidGatherer.GatherAssetUuids(so, ids);
|
||||||
|
|
||||||
foreach (KeyValuePair<UUID, AssetType> kvp in ids)
|
foreach (KeyValuePair<UUID, AssetType> kvp in ids)
|
||||||
|
|
|
@ -135,7 +135,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
if (sp is ScenePresence)
|
if (sp is ScenePresence)
|
||||||
{
|
{
|
||||||
AgentCircuitData aCircuit = ((ScenePresence)sp).Scene.AuthenticateHandler.GetAgentCircuitData(client.AgentId);
|
AgentCircuitData aCircuit = ((ScenePresence)sp).Scene.AuthenticateHandler.GetAgentCircuitData(client.AgentId);
|
||||||
if ((aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
|
if (aCircuit != null && (aCircuit.teleportFlags & (uint)Constants.TeleportFlags.ViaHGLogin) != 0)
|
||||||
{
|
{
|
||||||
if (m_RestrictInventoryAccessAbroad)
|
if (m_RestrictInventoryAccessAbroad)
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,6 +81,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
|
||||||
|
|
||||||
public void OnConnectionClose(IClientAPI client)
|
public void OnConnectionClose(IClientAPI client)
|
||||||
{
|
{
|
||||||
|
if (client == null)
|
||||||
|
return;
|
||||||
|
if (client.SceneAgent == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (client.SceneAgent.IsChildAgent)
|
if (client.SceneAgent.IsChildAgent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -3687,7 +3687,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
"[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.",
|
"[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.",
|
||||||
sp.Name, sp.UUID, RegionInfo.RegionName);
|
sp.Name, sp.UUID, RegionInfo.RegionName);
|
||||||
|
|
||||||
|
if (sp.ControllingClient != null)
|
||||||
sp.ControllingClient.Close(true);
|
sp.ControllingClient.Close(true);
|
||||||
|
|
||||||
sp = null;
|
sp = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
int scriptsStarted = 0;
|
int scriptsStarted = 0;
|
||||||
|
|
||||||
|
if (m_scene == null)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[PRIM INVENTORY]: m_scene is null. Unable to create script instances");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
// Don't start scripts if they're turned off in the region!
|
// Don't start scripts if they're turned off in the region!
|
||||||
if (!m_scene.RegionInfo.RegionSettings.DisableScripts)
|
if (!m_scene.RegionInfo.RegionSettings.DisableScripts)
|
||||||
{
|
{
|
||||||
|
|
|
@ -553,6 +553,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </param>
|
/// </param>
|
||||||
public void StopScriptInstance(TaskInventoryItem item)
|
public void StopScriptInstance(TaskInventoryItem item)
|
||||||
{
|
{
|
||||||
|
if (m_part.ParentGroup.Scene != null)
|
||||||
m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID);
|
m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID);
|
||||||
|
|
||||||
// At the moment, even stopped scripts are counted as active, which is probably wrong.
|
// At the moment, even stopped scripts are counted as active, which is probably wrong.
|
||||||
|
|
Loading…
Reference in New Issue