Using Tango 9.2.2:
Crash is a null-pointer access in Tango's blackbox.cpp:
omni_thread::value_t *ip = omni_thread::self()->get_value(key);
self() returns nullptr in this case.
To reproduce, let any command do something like this:
std::thread thread([this]() {
std::string target = this->device_name;
auto proxy = std::make_shared<Tango::DeviceProxy>(target);
proxy->command_inout("status");
});
thread.join();
This also causes crashes when talking to other target devices that are in-process, which is our actual use case.
The important bit is that the other server has to live in the same process, so the network system tries to handle it synchronously from within the calling thread.
Do you need to destroy DeviceProxy objects? From my experience no, and therefore you also don't need a shared_ptr for them.
Hi Marius,
Thanks for the bug report.
I think this is a duplicate of bug 814 which is fixed in svn (Tango_900 branch).
To fix this problem you need to recompile Tango cppapi with the latest version of cppapi/server/blackbox.cpp file (r30193 from Tango_900 branch)
Hoping this helps.
Reynald
Thank you Reynald, that fixed this and another related crash in Sardana!
Excuse me entering in the thread. I'm interested in the Sardana crash that you encountered.
If you think that this is our of topic here, could you please share the details in the sardana-devel@lists.sourceforge.net. Thanks!
Thank you Marius for the confirmation.
Closed as duplicate of bug 814.