diff options
author | Justin Clark-Casey (justincc) | 2014-04-03 00:33:43 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-04-03 00:34:20 +0100 |
commit | 17929abd28ffdf764155dede0f2bcfded40cbcf9 (patch) | |
tree | d8688a86d061241592ce0d79a1943e00eb65b241 | |
parent | Don't clear avsToCross in SOG.AbsolutePosition.set(), this is unnecessary sin... (diff) | |
download | opensim-SC_OLD-17929abd28ffdf764155dede0f2bcfded40cbcf9.zip opensim-SC_OLD-17929abd28ffdf764155dede0f2bcfded40cbcf9.tar.gz opensim-SC_OLD-17929abd28ffdf764155dede0f2bcfded40cbcf9.tar.bz2 opensim-SC_OLD-17929abd28ffdf764155dede0f2bcfded40cbcf9.tar.xz |
Wrap contents of ETM.CrossAgentToNewRegionAsync() in try/catch to avoid a failure terminating simulators running on Windows
In relation to http://opensimulator.org/mantis/view.php?id=7050
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index c9adc37..62b5a01 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1629,24 +1629,30 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1629 | ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, | 1629 | ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, |
1630 | bool isFlying, string version) | 1630 | bool isFlying, string version) |
1631 | { | 1631 | { |
1632 | m_log.DebugFormat("{0} CrossAgentToNewRegionAsync: new region={1} at <{2},{3}>. newpos={4}", | 1632 | try |
1633 | LogHeader, neighbourRegion.RegionName, neighbourRegion.RegionLocX, neighbourRegion.RegionLocY, pos); | ||
1634 | |||
1635 | if (!CrossAgentToNewRegionPrep(agent, neighbourRegion)) | ||
1636 | { | 1633 | { |
1637 | m_log.DebugFormat("{0} CrossAgentToNewRegionAsync: prep failed. Resetting transfer state", LogHeader); | 1634 | m_log.DebugFormat("{0}: CrossAgentToNewRegionAsync: new region={1} at <{2},{3}>. newpos={4}", |
1638 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); | 1635 | LogHeader, neighbourRegion.RegionName, neighbourRegion.RegionLocX, neighbourRegion.RegionLocY, pos); |
1639 | return agent; | 1636 | |
1640 | } | 1637 | if (!CrossAgentToNewRegionPrep(agent, neighbourRegion)) |
1638 | { | ||
1639 | m_log.DebugFormat("{0}: CrossAgentToNewRegionAsync: prep failed. Resetting transfer state", LogHeader); | ||
1640 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); | ||
1641 | } | ||
1641 | 1642 | ||
1642 | if (!CrossAgentIntoNewRegionMain(agent, pos, neighbourRegion, isFlying)) | 1643 | if (!CrossAgentIntoNewRegionMain(agent, pos, neighbourRegion, isFlying)) |
1644 | { | ||
1645 | m_log.DebugFormat("{0}: CrossAgentToNewRegionAsync: cross main failed. Resetting transfer state", LogHeader); | ||
1646 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); | ||
1647 | } | ||
1648 | |||
1649 | CrossAgentToNewRegionPost(agent, pos, neighbourRegion, isFlying, version); | ||
1650 | } | ||
1651 | catch (Exception e) | ||
1643 | { | 1652 | { |
1644 | m_log.DebugFormat("{0} CrossAgentToNewRegionAsync: cross main failed. Resetting transfer state", LogHeader); | 1653 | m_log.Error(string.Format("{0}: CrossAgentToNewRegionAsync: failed with exception ", LogHeader), e); |
1645 | m_entityTransferStateMachine.ResetFromTransit(agent.UUID); | ||
1646 | return agent; | ||
1647 | } | 1654 | } |
1648 | 1655 | ||
1649 | CrossAgentToNewRegionPost(agent, pos, neighbourRegion, isFlying, version); | ||
1650 | return agent; | 1656 | return agent; |
1651 | } | 1657 | } |
1652 | 1658 | ||