Draft: allways initialize callback argouts to empty list
This is one of the possible solutions to this pytango issue: pytango#590 (closed) I post it to discuss if this should be fixed directly in CppTango, or we should just fix it directly in PyTango boost layer.
Summary of the problem:
device_proxy.read_attribute_asynch("attr", callback)
was not working, failing with segfault, because ev->argout
was a not initialized pointer 0x0
. It was being passed from cpptango here to PyCallBackAutoDie::attr_read
to PyDeviceAttribute::convert_to_python
in PyTango boost. And finally this line tried to dereference it with ->empty()
and it crashed.
The question to CppTango people - do you want to keep this pointer uninitialized for some reason in CppTango and I should just check this in PyTango boost layer and convert argout
to None
, or like in my MR you prefer to initialize it (then in PyTango it will be converted to an empty list)?