MantisBT - opensim
View Issue Details
0006806opensim[REGION] Physics Enginespublic2013-10-16 12:492014-07-29 13:42
Gwyneth Llewelyn 
Robert Adams 
normalminorunable to reproduce
closedfixed 
Apple MacintoshMac OS X10.6.8
master (dev code) 
master (dev code) 
OpenSim 0.8.0 Dev ba295a0
Grid (Multiple Regions per Sim)
BulletSim
Mono / OSX
2.10
Firestorm-Release
0006806: [BulletSim] Exception: System.EntryPointNotFoundException: ClearCollisionProxyCache2
For some reason, many of the BulletSim-related functions are always throwing this exception with the unmanaged library (XNA has no problem).

I understand that this is probably due to new code to deal with multiple collisions. However, it also means that some physical properties are failing, e.g. prims will correctly show they're set to physical (from their object profile) but it will *not* be subject to the physical engine!

Avatars and NPCs seem not to be affected.
Merely creating a cylinder and setting it physical will trigger the exception in the console.

Note that I couldn't reproduce it on the exact same version code under Ubuntu; it could be an issue strictly related to the Mac Mono compiler (problems linking with external libraries?)
The error is apparently coming from the integration with the C++ "unmanaged" library, e.g. addressed from OpenSim.Region.Physics.BulletSPlugin.BSAPIUnman.ClearCollisionProxyCache:

public override bool ClearCollisionProxyCache(BulletWorld world, BulletBody obj)
{
    BulletWorldUnman worldu = world as BulletWorldUnman;
    BulletBodyUnman bodyu = obj as BulletBodyUnman;
    return BSAPICPP.ClearCollisionProxyCache2(worldu.ptr, bodyu.ptr);
}

BulletXNA has no problems.
No tags attached.
Issue History
2013-10-16 12:49Gwyneth LlewelynNew Issue
2013-10-16 12:51Gwyneth LlewelynNote Added: 0024484
2013-10-16 12:54TeravusNote Added: 0024485
2013-10-16 13:40Robert AdamsNote Added: 0024486
2013-10-16 13:58Gwyneth LlewelynNote Added: 0024487
2013-10-16 13:59Gwyneth LlewelynNote Edited: 0024487bug_revision_view_page.php?bugnote_id=24487#r1653
2013-10-18 09:17Robert AdamsAssigned To => Robert Adams
2013-10-18 09:17Robert AdamsStatusnew => assigned
2013-10-18 09:21Robert AdamsNote Added: 0024521
2013-10-18 17:43Gwyneth LlewelynNote Added: 0024531
2013-10-18 17:43Gwyneth LlewelynNote Added: 0024532
2013-10-18 17:43Gwyneth LlewelynStatusassigned => resolved
2013-10-18 17:43Gwyneth LlewelynFixed in Version => master (dev code)
2013-10-18 17:43Gwyneth LlewelynResolutionopen => fixed
2013-10-18 17:47TeravusNote Added: 0024533
2013-10-18 17:48TeravusNote Edited: 0024533bug_revision_view_page.php?bugnote_id=24533#r1670
2013-10-18 17:50TeravusNote Added: 0024534
2014-07-29 13:42chi11kenStatusresolved => closed

Notes
(0024484)
Gwyneth Llewelyn   
2013-10-16 12:51   
When relaunching the simulator with ODE, objects previously set to physical under BulletSim unmanaged will revert to non-physical.
(0024485)
Teravus   
2013-10-16 12:54   
My first thought here, is library conflict, but I have not loaded it myself in mac :). Maybe there's a shared bullet library that's being invoked instead of the included one... or maybe the .dylib hasn't been updated?
(0024486)
Robert Adams   
2013-10-16 13:40   
Mac is a problem. I (the keeper of BulletSim) do not have a platform to create the Bullet dynamic libs. The problem is that features have been added to the BulletSim dlls but the Mac version of the libraries have not been rebuilt.

I'll ping the fellow who built the last versions and see if he can update the distribution.
(0024487)
Gwyneth Llewelyn   
2013-10-16 13:58   
(edited on: 2013-10-16 13:59)
Thanks, Robert! That would certainly explain the issue.

Also, it would be nice to have a 64bit version of the library...

This thread might be useful as a resource: https://lists.berlios.de/pipermail/opensim-dev/2013-April/011775.html [^]

(0024521)
Robert Adams   
2013-10-18 09:21   
I just checked in an updated version of bin/lib32/libBulletSim.dylib. Please check it out and see if you get the same error. Thanks to Jon Cundill for the build.

If anyone knows of a Mac build environment for open source projects, that would be a help for future builds.
(0024531)
Gwyneth Llewelyn   
2013-10-18 17:43   
FANTASTIC, Robert!! Awesome work!

Not only the new library makes the error go away, but now my own hacks (I'm working on getting attachments receiving collision events, just like SL does) also work *flawlessly*. I was getting very unreliable collision events — now I get them *all*, exactly as expected. So I got two treats instead of one :-)

You deserve a medal! Who'd thought that it was just an outdated library causing so much damage...

I'm closing this ticket now and consider it fixed!
(0024532)
Gwyneth Llewelyn   
2013-10-18 17:43   
Fixed thanks to Robert's updated unmanaged library. Also fixed reception of collision events!
(0024533)
Teravus   
2013-10-18 17:47   
(edited on: 2013-10-18 17:48)
Might be cool if you can update this page:

http://opensimulator.org/wiki/PhysicsEngines [^]

It's pretty old :).. It's missing BulletSim. It has the build directions for the ODEPlugin. Might be cool to include the build directions for BulletSim also. :) That page is typically where the Physics Engines are discussed. Maybe link to: http://opensimulator.org/wiki/BulletSim/Functionality [^]

(0024534)
Teravus   
2013-10-18 17:50   
one more note, the PhysicsEngines link is referenced from http://opensimulator.org/wiki/Developer_Documentation [^]