MantisBT - opensim
View Issue Details
0008385opensim[REGION] Physics Enginespublic2018-10-02 13:312018-10-08 03:49
aiaustin 
 
normalmajoralways
newopen 
PCWindows10
master (dev code) 
master (dev code) 
opensim-0.9.1-456-g5a0c9c2
Grid (Multiple Regions per Sim)
BulletSim
.NET / Windows64
None
N/A
0008385: BulletSim: crash as tidy up occurs on region shutdown - red errors or R6025 - pure virtual function call
OpenSim.exe compiled from Dev Master code opensim-0.9.0.1-456-g5a0c9c2.zip (2018-09-27 18:04)on Windows 10 server. One region in instance on cut down testing.

Red BulletSim errors crash OpenSim.exe - captured as screen shot attached... not able to catch the trace as text and it does not go to OpenSim.log at time of crash. But it starts as

[BULLETSIM SCENE] ProcessTainte: BSPrim.ForceBodyShapeRebuild: Exception: System.Threading.ThreadAbortException: Thread was being aborted.

One in every 3 or 4 trials result in no red BulletSim crash but a Windows Popup that indicates.. Microsoft Visual C++ Runtime Library - Runrtime Error! program: D:\VW\AiLand-Addon\bin\OpenSim.exe R6025 - pure virtual function call.
No tags attached.
related to 0008386new  BulletSim: Attempted to read or write protected memory 
jpg 2018-10-02-OpenSim-456-Exit-Error.jpg (792,145) 2018-10-02 13:31
http://opensimulator.org/mantis/file_download.php?file_id=4785&type=bug
jpg 2018-10-02-OpenSim-456-Exit-Crash.jpg (373,266) 2018-10-02 13:32
http://opensimulator.org/mantis/file_download.php?file_id=4786&type=bug
Issue History
2018-10-02 13:31aiaustinNew Issue
2018-10-02 13:31aiaustinFile Added: 2018-10-02-OpenSim-456-Exit-Error.jpg
2018-10-02 13:32aiaustinFile Added: 2018-10-02-OpenSim-456-Exit-Crash.jpg
2018-10-03 11:32aiaustinDescription Updatedbug_revision_view_page.php?rev_id=6772#r6772
2018-10-04 02:02aiaustinDescription Updatedbug_revision_view_page.php?rev_id=6780#r6780
2018-10-04 02:20aiaustinNote Added: 0033123
2018-10-04 10:25aiaustinNote Edited: 0033123bug_revision_view_page.php?bugnote_id=33123#r6782
2018-10-05 08:10aiaustinSummaryCrash in BulletSim code as tidy up occurs on region shutdown - red errors or R6025 - pure virtual function call => BulletSim: crash as tidy up occurs on region shutdown - red errors or R6025 - pure virtual function call
2018-10-05 08:11aiaustinRelationship addedrelated to 0008384
2018-10-05 08:12aiaustinRelationship deletedrelated to 0008384
2018-10-05 08:12aiaustinRelationship addedrelated to 0008386
2018-10-06 11:00UbitUmarovNote Added: 0033128
2018-10-06 12:23FreakyTechNote Added: 0033129
2018-10-08 03:49aiaustinNote Added: 0033146

Notes
(0033123)
aiaustin   
2018-10-04 02:20   
(edited on: 2018-10-04 10:25)
Note that this problem continues to be present in opensim-0.9.0.1-463-g1bcdcc2.zip (2018-10-03 20:17).

(0033128)
UbitUmarov   
2018-10-06 11:00   
Hard to tell what is going on, from that information :(
Well the error/warning about thread being aborted is just region going down and threads being killed.

the virtual .. no idea. It would be nice if the error said the funtion name also
, addicionally, seems to be a c++ error, so may be deep inside bullet unmanaged code :(
(0033129)
FreakyTech   
2018-10-06 12:23   
Actually that is refering to the very missing modeling of dependency graphs on C# side regarding dependencies that c++ objects have in bullet physics unmanaged code. So essentially the actual bug is a missing C# object dependency modeling.

A lot of people get the P/Invoke coding wrong for such interfacings and miss to model the dependencies correctly to make the garbage collector not to act in wrong order on such objects having references to native unmanaged code objects.

If done wrong, the garbage collector can destroy the object that is still referenced by other unmanaged object instances which then will crash when tried to be cleaned up or just acted upon.
(0033146)
aiaustin   
2018-10-08 03:49   
Thanks for that useful explanation @FreakyTech. So do you think the issue is likely to be in BulletSim unmanaged code libraries, in OpenSim core code that uses such libraries or in the OpenSim garbage collection approach?