Closed GoogleCodeExporter closed 8 years ago
Forgot to say that the Bullet demos works fine too.
Original comment by Hagn99@gmail.com
on 29 Jun 2012 at 8:46
The AccessViolationException usually means that some objects that the
DynamicsWorld uses during the simulation are disposed too soon. This can happen
if you don't keep references to objects that you pass to the world (so they go
out of scope and get disposed). Try taking things out of the world until the
error goes away. These can be collision objects, collision shapes, constraints,
etc.
I can't reproduce this bug in trunk/demos/XNA4/BasicDemo. Are you using the
demo code from SVN trunk too? And also Bullet code from trunk?
Original comment by andres.traks
on 29 Jun 2012 at 8:52
Yes I'm using the latest XNA4/BasicDemo. It also happens with my own project. I
can give you a copy of my Bullet/BulletSharp environment if you want.
Original comment by Hagn99@gmail.com
on 29 Jun 2012 at 8:54
Ah, I think I see what's going on. Try passing a constraint solver explicitly
to DynamicsWorld like so:
World = new DiscreteDynamicsWorld(Dispatcher, Broadphase, new
SequentialImpulseConstraintSolver(), collisionConf);
If you pass null, then Bullet is supposed to create a default solver, but
there's a bug in Bullet where that doesn't work. I sent a patch, but it was
forgotten or something:
http://code.google.com/p/bullet/issues/detail?id=573&can=1&colspec=Modified%20ID
%20Type%20Stars%20Status%20Owner%20Summary&start=100
I'll see if I can contact Erwin about it.
Original comment by andres.traks
on 29 Jun 2012 at 9:12
Ah great. That worked. Thank you very much.
Original comment by Hagn99@gmail.com
on 29 Jun 2012 at 9:16
The patch was applied to Bullet, so null can be used again.
http://code.google.com/p/bullet/source/detail?r=2541
Thanks for reporting!
Original comment by andres.traks
on 29 Jun 2012 at 10:44
Original issue reported on code.google.com by
Hagn99@gmail.com
on 29 Jun 2012 at 8:17Attachments: