set_change_event() with nodb option - detect not working
|
|
---|---|
Hi Reynald,About the long time during the subscription, it could be due to the synchronous call happening at subscription time. The work-around for this problem at my case is - adding 192.168.0.100 my_computer_name (at c:/windows/system32/drivers/etc/hosts) - use TANGO_HOST => my_computer_name:10000 Then no more event heartbeat problem, and no more delay when calling subscribe_event(). I will stick to this setting for the time being. |
|
|
---|---|
Let me get back the second issue of device server stop problem when DEBUG mode (nodb option).What would be interesting for us is to know the code executed when you read the attribute named E000095. I tried run server program and client program side by side in one computer And the TANGO_HOST is my_computer_name:10000 So, there's no mismatch between server and client side settings. The time of this exception is 1. when client side run in "devapi_base.cpp" at ret = api_ptr->get_zmq_event_consumer()->subscribe_event(this, attr_name,event, callback, filters, stateless); call stack is TOmronClient.exe!Tango::DeviceProxy::subscribe_event(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & attr_name="E000000.0", Tango::EventType event=CHANGE_EVENT, Tango::CallBack * callback=0x00000000030a6ba0, const std::vector<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,std::allocator<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > > & filters=[0](), bool stateless=false) 줄 7682 C++ 2. Then the server program caught exception in "zmqeventsupplier.cpp" at event_pub_sock->setsockopt(ZMQ_SNDHWM,&hwm,sizeof(hwm)); call stack is TOmronServer.exe!_CxxThrowException(void * pExceptionObject=0x00000000045fb528, const _s__ThrowInfo * pThrowInfo=0x00007ff7547eb258) 줄 157 C++ Refer to two captured images for the call stacks of the two programs It would actually be interesting to know if it happens always on the same attribute. This happens at the first attempt of the looping.
How many threads do you have The original server program has ten device patterns which inherit form one base pattern. I'm testing by building 10 members under one class. (no database option) And each device has - from 200 to 1000 attributes - 2 to 5 threads - 10 commands But for the testing purpose, I'm shrinking to - one device - one thread - same command set Are there any commands defined for this server? Actually the client send Mode command to server before subscribing events. And it passed without any problem. Or could it be that when you read the E000095 attribute, this is executing a command? I don't think this exception is coming by user defined command. |
|
|
---|---|
Hi, It looks like you are using forbidden characters in your attribute name. You have an attribute named "E000000.0". I just tried to create a static attribute with this name with Pogo and it returns the following error: It looks like Tango let you create an attribute with this name as dynamic attribute but since POGO doesn't let you name an attribute with a '.' char in it, I would really avoid to create attributes with special characters in their name. Maybe the problem you are encountering is not linked to that but I would already start by changing that. Happy to hear you found network settings that work in your case with (c:/windows/system32/drivers/etc/hosts). Cheers, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Reynald, I think I found the right place to trigger the exception; I thought the first exception caught by DevEnv was the place. But I was wrong. The place was at DServer::zmq_event_subscription_change(const Tango::DevVarStringArray *argin) in the eventcmds.cpp. No database mode seems no alternative_event_endpoint(). So, get_alternate_event_endpoint() returns zero size vector. And tmp_str = ev->get_alternate_event_endpoint()[loop]; => triggers exception. The proper code should be
The release mode? It doesn't care I Think. Sorry for the confusion that I posted previously. |
|
|
---|---|
Hello, Well, that's clearly a bug in the Dserver::zmq_event_subscription_change code. In the same method, there is similar code a bit above but the size of the vector is tested before accessing any of its elements. This is what should be done. This is not crashing in release mode on Windows but I'm afraid this might corrupt the memory. There might be some side effects… Could you please create a ticket on https://sourceforge.net/p/tango-cs/bugs to keep track of this bug? If you cannot or don't want to, I can create it. Just let me know. This should be fixed in the next Tango release. Thank you very much for reporting this.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Reynald, Please create a ticket for me. Next time when I may find BUG like this, I'll do it by myself. |
|
|
---|---|
Here is the link to the ticket: https://sourceforge.net/p/tango-cs/bugs/805
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |