question

Upvotes
Accepted
185 6 12 25

Unhandled Exception: ThomsonReuters.RFA.Common.InvalidUsageException for OMMConsumer::UnregisterClient

We are facing occasional crash in process using RFA API.

and log says:

terminate called after throwing an instance of 'rfa::common::InvalidUsageExceptionImpl'

From https://community.developers.refinitiv.com/questions/25948/unhandled-exception-thomsonreutersrfacommoninvalid.html I understood the way to get extra information regarding the exception.

But I don't understand if I am using API in incorrect manner.

Here's stack trace

#0  0x00002b2458e9c387 in raise () from /lib64/libc.so.6
#1  0x00002b2458e9da78 in abort () from /lib64/libc.so.6
#2  0x00002b24586a6a95 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
#3  0x0000000000e35420 in ft::mdutils::Log::terminate () at mdutils/src/logging/Log.cpp:186
#4  0x00002b24586a4a06 in ?? () from /lib64/libstdc++.so.6
#5  0x00002b24586a39b9 in ?? () from /lib64/libstdc++.so.6
#6  0x00002b24586a4624 in __gxx_personality_v0 () from /lib64/libstdc++.so.6
#7  0x00002b2458c5f8e3 in ?? () from /lib64/libgcc_s.so.1
#8  0x00002b2458c5fe17 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#9  0x0000000000f0f9f6 in rfa::sessionLayer::OMMConsumerImpl::unregisterClient(rfa::common::Handle*, rfa::sessionLayer::OMMIntSpec const*) ()


We're using ROBUST FOUNDATION API 8.1.

//During unsubscribing for symbol. where m_pHandler is of type rfa::common::Handle*
     if(m_pHandler)
     {
         try {
         m_pOMMConsumer->unregisterClient(m_pHandler);                
         }
         catch(...)
         {
             return false;
         }
         return true;
     }
     else
     {
         return false;
     }


Questions :

Is the usage of API correct?

What are the possible scenarios that ommConsumer->unregisterClient(handler) can give InvalidUsageExceptionImpl.?

#technologyrfarfa-apiOMM
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @mktdata ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text on the left side of the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@mktdata

Thanks for reaching out to us.

It is mentioned in the RFA Developer Guide that there are two ways in which an event stream can be closed:

  • The application closes the stream via unregisterClient() call to RFA.
  • The application receives an event that closes the stream.

An application should call isEventStreamClosed() function on incoming messages to determine whether an event stream is closed.

If the event stream had already been closed by RFA (as determinable by the isEventStreamClosed() method on an event during event processing), then the application should not call unregisterClient(). The event stream is already closed and the Handle is no longer valid. This rule applies to event streams from all Message Models.

One common mistake is that the application still calls the unregisterClient() method with the closed handle.

If the application is already aware of this, please upgrade the application to use the latest version of RFA 8.2.2.L1 to avoid all known issues. However, if the problem still happens with the latest version of RFA, please contact the Refinitiv Developer Connect (RDC) support team directly via Contact Premium Support.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.