I have been experiencing a native crash seemingly involved with calling Body.setMassParameters() during program execution. I now believe the problem is related to the creation of the local dMass object in the constructor of Body. The dMass object is local, and therefore goes out of scope after execution of the constructor, causing the object to be garbage collected. The dMass object being garbage collected seemingly invalidates the SWIG mass pointer. I have verified that making the dMass object global within Body (therefore preventing it from being garbage collected) solves this problem. For this reason, I think the dMass object should be a global instance variable within Body. Any thoughts?