Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006375opensim[REGION] OpenSim Corepublic2012-10-24 06:422014-07-29 13:41
Reporterorenh 
Assigned Tojustincc 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionmaster (dev code) 
Target Versionmaster (dev code)Fixed in Version 
Summary0006375: [PATCH] Bug fixes for scene shutdown, GetRootFolder(), and CollisionSoundsAssetSet.xml
DescriptionThis issue includes several small bug fixes:

1) 0001-Prevent-errors-when-a-scene-shuts-down-by-locking-ac.patch

When a scene shuts down there are nearly always a few errors, because the main Update loop is still running and the objects that it's accessing suddenly become null. I added a Shutdown lock that stops shutdown from proceeding until the Update loop exits. (This is very fast, because it just takes one frame.)

2) 0001-Fixed-XInventoryService.GetRootFolder.patch

This patch fixes two different ways in which XInventoryService can fail to return the root folder: in GetRootFolder() and in GetSystemFolderForType(AssetType.RootFolder).

3) 0001-Changed-duplicate-Asset-ID-s-to-unique-ID-s-in-Colli.patch

There were several assets with the same UUID in CollisionSoundsAssetSet.xml. I changed them to use unique UUID's.

4) 0001-Changed-course-to-coarse-in-several-places.patch

Fixed spelling of "course" to "coarse".
TagsNo tags attached.
Git Revision or version number50409ac8042126172f9261d9316e84ee5de96894
Run Mode Grid (Multiple Regions per Sim)
Physics EngineODE
EnvironmentMono / Linux32
Mono Version2.10
Viewer
Attached Filespatch file icon 0001-Prevent-errors-when-a-scene-shuts-down-by-locking-ac.patch [^] (4,480 bytes) 2012-10-24 06:42 [Show Content]
patch file icon 0001-Changed-duplicate-Asset-ID-s-to-unique-ID-s-in-Colli.patch [^] (2,862 bytes) 2012-10-24 06:43 [Show Content]
patch file icon 0001-Changed-course-to-coarse-in-several-places.patch [^] (8,273 bytes) 2012-10-24 06:43 [Show Content]
patch file icon 0001-Fixed-bugs-when-getting-the-root-folder.patch [^] (1,998 bytes) 2012-12-16 01:32 [Show Content]

- Relationships

-  Notes
(0022926)
justincc (administrator)
2012-10-25 16:05

Applied 3rd and 4th patches, thanks Oren.

Regarding patch 2, I am happy to apply but please could you add more detail to the commit message (exactly what it is fixing). This is essential if a patch needs to be identified due to a regression or when cherry-picking fixes.

Regarding patch 1, I have commonly seen exceptions thrown on shutdown as well in regions with scripts that are constantly firing events. However, in my case, I believe this is due to a window introduced by the disposal of the Physics scene (commit c150320 on Thu Jul 26 15:27:18 2012). The script engine shutdown was triggered after this via EventManager.OnShutdown() as called by SceneBase.Close(), so there was a window in which script events could still fire that would make calls that would attempt to access PhysicsScene.

I have resolved this in commit 22e216f and so far I haven't seen the exceptions that I have been seeing.

I find it difficult to believe that m_shuttingDown = true is an issue due to the big 500ms sleep immediately after this is set. It's a very blunt tool, but as each scene loop (in theory) takes 18ms, it would need a pathologically delayed scene loop for this to still be running after the sleep elapses.

Admittedly this may well still be a good idea anyway, though I'm a bit loathe to put more lock calls in the critical main update loop.

Or I may be barking up the wrong tree and the exceptions that you're seeing are clearly connected with the scene loop still being active even after the 500ms sleep. If that's the case, please do post further details.
(0023264)
orenh (administrator)
2012-12-16 01:33

I replaced patch 2 to add more details. The filename has changed; the new patch is 0001-Fixed-bugs-when-getting-the-root-folder.patch.
(0023270)
orenh (administrator)
2012-12-16 07:03

Regarding patch 1 (the Shutdown lock): I disabled my patch and used your (Justin's) patch that changes the shutdown order instead. I haven't had problems so far. So I'm withdrawing this patch. If the problem reoccurs then I will submit it again.
(0023351)
justincc (administrator)
2013-01-01 16:08

Applied new patch 2 as git master a0739a8. Thanks Oren.

- Issue History
Date Modified Username Field Change
2012-10-24 06:42 orenh New Issue
2012-10-24 06:42 orenh Status new => assigned
2012-10-24 06:42 orenh Assigned To => justincc
2012-10-24 06:42 orenh File Added: 0001-Prevent-errors-when-a-scene-shuts-down-by-locking-ac.patch
2012-10-24 06:43 orenh File Added: 0001-Fixed-XInventoryService.GetRootFolder.patch
2012-10-24 06:43 orenh File Added: 0001-Changed-duplicate-Asset-ID-s-to-unique-ID-s-in-Colli.patch
2012-10-24 06:43 orenh File Added: 0001-Changed-course-to-coarse-in-several-places.patch
2012-10-24 06:43 orenh Status assigned => patch included
2012-10-25 16:05 justincc Note Added: 0022926
2012-10-25 16:05 justincc Status patch included => patch feedback
2012-12-16 01:31 orenh File Deleted: 0001-Fixed-XInventoryService.GetRootFolder.patch
2012-12-16 01:32 orenh File Added: 0001-Fixed-bugs-when-getting-the-root-folder.patch
2012-12-16 01:33 orenh Note Added: 0023264
2012-12-16 07:03 orenh Note Added: 0023270
2012-12-16 07:04 orenh Status patch feedback => patch included
2013-01-01 16:08 justincc Note Added: 0023351
2013-01-01 16:08 justincc Status patch included => resolved
2013-01-01 16:08 justincc Resolution open => fixed
2014-07-29 13:41 chi11ken Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker