Closed tango-controls-bot closed 7 years ago
I am not able to reproduce this problem (two subscriptions to the same device, same attribute with different callback objects) neither with Tango 9.1 neither with the future 9.2 Therefore, I switch the Category to PyTango
Emmanuel
Original comment by: taurel
Original comment by: taurel
Hi, I had the same problem on my computer, using C++ API. But it happens only under certain circumstances. I am able to reproduce it in TangoBox after I disconnect TangoBox from the network (using the menu near the top-right corner of Ubuntu). Below, I am writing what I think was the cause of the problem. Coincidentally, I planned to submit a bug report today, but then I saw that it was probably fixed in svn yesterday by commit 29267.
The problem was in the connect_event function in event.cpp, where, in Tango 9.1.0, line 1771 sometimes changes local_callback_key. This is a problem, because the old name is used (line 1448) to check whether the event has been registered earlier, however, if it has been registered earlier, it is not found, because it was stored under the changed name. This leads to trying to add an already existing key to event_callback_map (line 1779) and this produces the exception.
Josef
Original comment by: jcibulka
Hi Josef,
Good catch. It's true that in some cases the local_callback_key could be changed and if this happens, the bug will be there. When I have tried this morning with both Tango 9.1 and 9.2 I was not able to reproduce it because with 9.1 I was not in the case where the string is modified (using tango host env. variable with a host name which is an alias) and with Tango 9.2 as you noticed, the string is not modified and therefore the bug is not there anymore.
To keep the story short, I would say that this bug is at the C++ level and it is fixed for Tango 9.2
Cheers
Emmanuel
Original comment by: taurel
Original comment by: tiagocoutinho
Subscribing twice to the same attribute raises an exception in Tango 9:
This happens even if the proxies and/or callbacks are different objects. The following example shows how to reproduce the bug:
In Tango 8, this last line would simply print RUNNING and return 2.
Reported by: vxgmichel
Original Ticket: tango-cs/bugs/780