diff options
author | Justin Clark-Casey (justincc) | 2012-10-25 22:55:29 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-25 22:55:29 +0100 |
commit | 22e216fd123744f6c87024fc18f3c9b306777fe2 (patch) | |
tree | 5531c337a371e292a65ab2830cd7b5230165ffdc /OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |
parent | Fix script error messages not showing up in viewer 3 and associated viewers. (diff) | |
download | opensim-SC-22e216fd123744f6c87024fc18f3c9b306777fe2.zip opensim-SC-22e216fd123744f6c87024fc18f3c9b306777fe2.tar.gz opensim-SC-22e216fd123744f6c87024fc18f3c9b306777fe2.tar.bz2 opensim-SC-22e216fd123744f6c87024fc18f3c9b306777fe2.tar.xz |
In Scene.Close(), dispose of the physics scene after base.Close() since script events can still access Physics scene until the script engine shuts down (triggered off base.Close())
XEngine listeners to EventManager.OnShutdown which is triggered from base.Close().
Possibly it could listen for the earlier OnSceneShuttingDown instead, but the easier solution right now is to relocate disposal of the physics scene.
This bug has existed since c150320 (Thu Jul 26 15:27:18 2012) and was in 0.7.4
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs index d722a09..ac3da1e 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneTests.cs | |||
@@ -65,5 +65,22 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
65 | 65 | ||
66 | Assert.That(scene.Frame, Is.EqualTo(1)); | 66 | Assert.That(scene.Frame, Is.EqualTo(1)); |
67 | } | 67 | } |
68 | |||
69 | [Test] | ||
70 | public void TestShutdownScene() | ||
71 | { | ||
72 | TestHelpers.InMethod(); | ||
73 | |||
74 | Scene scene = new SceneHelpers().SetupScene(); | ||
75 | scene.Close(); | ||
76 | |||
77 | Assert.That(scene.ShuttingDown, Is.True); | ||
78 | Assert.That(scene.Active, Is.False); | ||
79 | |||
80 | // Trying to update a shutdown scene should result in no update | ||
81 | scene.Update(1); | ||
82 | |||
83 | Assert.That(scene.Frame, Is.EqualTo(0)); | ||
84 | } | ||
68 | } | 85 | } |
69 | } \ No newline at end of file | 86 | } \ No newline at end of file |