From: brett h. <bha...@ya...> - 2004-10-08 16:23:48
|
Hi Tim, I was actually already planning to update the tutorials and those were changes i was planning to make, its going to take a little time though because i am in the middle of fixing some things in PyOSG. I'll let you know when i've made the updates. I'm not sure where that Segfault is comming from either; its strange, but maybe as we do more testing, it will become clear. In the meantime it does not seem like a big problem because i don't think that that many objects should ever be intersecting in the first place. -brett --- Timothy Stranex <ti...@st...> wrote: > Hello, > > I've finally been able to get OSG and PyOSG built and installed. > > On Sat, 2004-10-02 at 22:33, brett hartshorn wrote: > > I have ported tutorial2.py and tutorial3.py to use PyOSG as the renderer, i thought > > that someone may want to include them in CVS because i think it might be another good > > example. > > They're pretty cool. I have two suggestions, if you're interested: > > 1. In tutorial2_osg.py, start with the camera further away from the > blocks and facing them. > 2. In tutoiral3_osg.py, add a little more light and colour the base > plane. > > > Also attached is the file named tutorial3_osg_segfault.py. This file will crash when you > > run it because it seems that if more than 34 bodies collide at once (at least on the first > > frame if they are all intersecting), then pyODE will crash by segmentation fault. > > After testing it on my computer, it segfaults if here are more than 68 > objects. I've done some looking but I can't work out what's causing it. > The segfault occurs in world.step() or world.quickStep(). My > investigation found two potential problems: > > 1. Body.setMass() takes a Mass object argument. It doesn't keep a > reference to it but uses its dMass Mass._mass for dBodySetMass(dBodyID, > const dMass *mass). If the Mass object is deallocated, ODE could still > try to access it. > > 2. ContactJoint uses Contact objects for ODE calls without keeping > references. ODE might still try to access it even if the Contact object > has been deallocated. > > I'm not entirely sure if the above points are correct because none of > the tutorials ever crash even though they could by the above mechanisms. > Also, fixing them doesn't fix the segfault problem above. > > What do you think? > > -- > Timothy Stranex <ti...@st...> > > ATTACHMENT part 2 application/pgp-signature name=signature.asc _______________________________ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com |