Fix Version/s: None
The pybind11 wrapper for CoaddInputs added in
DM-8417 has a serious problem: any attempt to read the visits field causes a segfault: "pointer being freed was not allocated".
To see this run afw/tests/testExposureTable.py after enabling testCoaddInputs by commenting out the skip decorator.
The code uses def_readwrite to wrap these fields. However, I have also tried:
- Adding new getter and setter methods in CoaddInputs.h and wrapping those using def_property in coaddInputs.cc
- Specifying other return value policies such as reference_internal (the default, and desired policy) and reference (not very desirable, but emulates what SWIG did and if it worked then the unit test should have run correctly).
The final commit of
DM-8417 includes some temporary extra code in CoaddInputs.h and coaddInputs.cc that helped me perform the above tests. You may find it useful for experimentation.
- relates to
DM-8417 Wrap tests that depend on both image and table with pybind11
I built a new stack (through afw) and can confirm that the problem has been resolved (at least on my Mac). It is now safe to enable the skipped test in testExposureInfo.py (as you have done on this ticket branch). Thank you!
Appears to have been fixed upstream. Upgrade to latest pybind11 master makes it disappear.