Closed GoogleCodeExporter closed 9 years ago
The source folder you need to use is C:/BulletSharp/bullet/
Also, make sure you put BulletSharp and bullet into the same folder (not bullet
inside of BulletSharp). For example, C:/src/BulletSharp and C:/src/bullet
Original comment by andres.traks
on 16 Oct 2013 at 2:38
Hello,
First thanks for your answer.
I managed to compile, but I have now some problems when i dispose some objects
like CollisionWorld or CollisionWorld.ContactResultCallback
This is a sample
BroadphaseInterface dbvtBroadphase = new DbvtBroadphase(); ;
CollisionConfiguration collisionConfiguration = new DefaultCollisionConfiguration();
Dispatcher collisionDispatcher = new CollisionDispatcher(collisionConfiguration);
CollisionWorld collisionWorld = new CollisionWorld(collisionDispatcher, dbvtBroadphase, collisionConfiguration);
dbvtBroadphase.Dispose();
collisionDispatcher.Dispose();
collisionConfiguration.Dispose();
collisionWorld.Dispose();
Original comment by patrick....@rminformatique.com
on 17 Oct 2013 at 8:38
Attachments:
Hi, i try again this morning. I always have the same problem.
I put mogre.dll 1.7.3 in C:\MogreSDK\bin\Release
I change bulletsharp.vcxproj
<TargetFrameworkVersion
Condition="'$(TargetFrameworkVersion)'==''">v4.0</TargetFrameworkVersion>
The compilation is OK
Is this problem in association with the change of .net version (4.5 default to
4.0)?
Original comment by patrick....@rminformatique.com
on 18 Oct 2013 at 7:53
Hi,
dispose collisionWorld first and then the broadphase and dispatcher, because
collisionWorld uses them during its disposal.
Original comment by andres.traks
on 18 Oct 2013 at 3:25
Hi,
I changed the call to the function, but it's always the same problem
Original comment by patrick....@rminformatique.com
on 18 Oct 2013 at 3:33
DiscreteDynamicsWorld is what you want to use. CollisionWorld is only a base
class that doesn't have all the functions you normally need. So do this:
CollisionWorld collisionWorld = new DiscreteDynamicsWorld(collisionDispatcher,
dbvtBroadphase, null, collisionConfiguration);
The crash was a bug in BulletSharp and it's fixed in r537.
Original comment by andres.traks
on 19 Oct 2013 at 2:47
Hi,
I was not at work last week and i could not answer to you. Thanks for your
correction. It now works fine. But i've another bug when i dispose this sort of
object
private class ContactTurtle : CollisionWorld.ContactResultCallback
{
public bool Contact { get; set; }
public override float AddSingleResult(ManifoldPoint _manifoldPoint, CollisionObjectWrapper _collisionObjectWrapper0, int _iPartId0, int _iIndex0, CollisionObjectWrapper _collisionObjectWrapper1, int _iPartId1, int _iIndex1)
{
Contact = true;
return 1.0f;
}
}
I have a blocage(see picture)
Original comment by patrick....@rminformatique.com
on 28 Oct 2013 at 3:07
Attachments:
Hi,
I try to debug the bug. This is the code where i'm blocked. These 2 pictures
depend of the statement of the the dispose call function
Can someone help me ? (please mister andres)
Original comment by patrick....@rminformatique.com
on 31 Oct 2013 at 2:27
Attachments:
I'm a bit busy with work atm, but I'll try to look at this over the weekend.
Thanks for reporting though!
Original comment by andres.traks
on 1 Nov 2013 at 6:31
OK, I'm pretty sure in src/CollisionWorld.h:488 "auto_gcroot" should be just
"gcroot", otherwise the managed/unmanaged objects want to call each others'
destructors and therefore create a stack overflow.
Original comment by andres.traks
on 1 Nov 2013 at 8:37
Hi,
Effectively, the bug is corrected when i changed "auto_gcroot" by "gcroot"
I found "auto_gcroot" in these files. Should i also correct the problem?
C:\BulletSharp\bulletsharp\src\DiscreteCollisionDetectorInterface.h(134): auto_gcroot<StorageResult^> _storageResult;
C:\BulletSharp\bulletsharp\src\OverlappingPairCache.h(146): auto_gcroot<OverlapFilterCallback^> _callback;
C:\BulletSharp\bulletsharp\src\SoftBody.h(952): auto_gcroot<AJoint::IControl^> _iControl;
Thanks
Original comment by patrick....@rminformatique.com
on 4 Nov 2013 at 12:59
This still needs some testing to make sure all objects get disposed/deleted as
they're supposed to, but yep, that's seems right.
Original comment by andres.traks
on 4 Nov 2013 at 3:47
This issue was closed by revision r547.
Original comment by andres.traks
on 4 Nov 2013 at 3:52
Thanks for all
Original comment by patrick....@rminformatique.com
on 5 Nov 2013 at 7:47
Original issue reported on code.google.com by
patrick....@rminformatique.com
on 16 Oct 2013 at 1:20Attachments: