Calling write_attribute on a Group segafaults when the Group Tango devices are restarted and reconnection should occur.
PyTango :8.0.2
Tango: 8.1.2.c
ubuntu: 10.04
The proposed patch for device_attribute.cpp (rather crude...) solves the problem, but must be tested further.
Hello Claudio,
I am not able to reproduce your problem.
I have tried (with TangoTest/test DS shutdown):
Can you tell me how to reproduce the problem? Thanks in advance
Hello Tiago,
the problem arises during auto-reconnection with multiple devcies in the group.
I modified your script to iterate the write_attribute request and to include two devices in the group (you my have to restore the correct indentation of the script).
When the client is working, kill and restart TangoTest server several times: sooner or later the client segfaults.
import PyTango
import time
g = PyTango.Group("g1")
g.add("sys/tg_test/1")
g.add("sys/tg_test/2")
while True:
try:
g.write_attribute("long_scalar", 55)
print 'write_ok'
except:
print 'exception'
time.sleep(1)
Hi claudio,
I managed to reproduce it!
The situation is:
PyTango.Group.write_attribute needs to do more things than C++ Group.write_attribute
I am convinced that the problem comes from C++ but the same example code in C++ works!
I also noticed that the behaviour in PyTango and Tango is not exactly the same. In C++ the call to group write_attribute always succeeds (which is strange for me) but in the current version of PyTango throws an exception when the DS is not running.
I have done a fix for the behaviour of PyTango. As a side effect the bug in Tango c++ is not triggered anymore so I will close this bug report and say it is fixed.
When I am able to reproduce the bug in C++ I will create another bug report.
So, fixed in PyTango SVN trunk since revision #24400.
Will become visible in next PyTango version 8.1.1