kassonlab / gmxapi

(outdated) fork of https://gitlab.com/gromacs/gromacs
http://gmxapi.org/
Other
52 stars 13 forks source link

uninitialized use of py::object #226

Closed eirrgang closed 5 years ago

eirrgang commented 5 years ago

I think py::object is initialized with a nullptr member pointer, but this is not the same thing as being a reference to None. In any case, both the main python package and the sample_restraint code need to be checked and updated to make sure that we don't try to access attributes of uninitialized py::objects because evidence suggests it could cause segmentation faults rather than raising exceptions.

Relates to #221 and #188

If such checks resolve issues with test cases built on #224 then I think we can call this a bug fix and not necessitate an API version bump to accompany #221