question

Upvotes
Accepted
322 11 16 21

RFA InvalidUsageException when deocode filedlist

Sometime my application crash and RFA throw rfa::common::InvalidUsageException when my RFA application decode FieldList and it calls FieldListReadIterator::start().

Below is call stack:

#6 0x00007f2c04da6f6f in rfa::common::InvalidUsageExceptionImpl::throwInvalidUsageExceptionImpl(rfa::common::Exception::CommonErrorType, rfa::common::Exception::CommonErrorSeverityType, rfa::common::Exception::CommonErrorClassificationType, rfa::common::GeneralExceptionStatus::State, rfa::common::GeneralExceptionStatus::StatusCode, rfa::common::RFA_String const&) ()
from /usr/local/rfa7.6.0.L1.linux/Libs/RHEL6_64_GCC444/libRFA_Common.so
#7 0x00007f2c041cc43e in rfa::data::FieldListReadIterator::start(rfa::data::FieldList const&, unsigned char, rfa::data::FieldListDef*) ()
from /usr/local/rfa7.6.0.L1.linux/Libs/RHEL6_64_GCC444/libRFA_Data.so

What can cause the exception and how to handle the error?

treprfarfa-apierrorfieldsexception
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.

Seed question

1 Answer

· Write an Answer
Upvotes
Accepted
7.6k 15 6 9

@LarryT

-The exception you are experiencing, it could be an issue when the data feed send Refresh or Update which the payload contains invalid or empty FieldList. You should contact data feed support team to verify data at the time the problem occurs. For the application side, basically you can add code to verify if the FieldList you want to decode contains Blank data or not by calling FieldList.isBlank() method.

You may add the codes to verify the data like below sample before decode it and if it’s blank FieldList you may have some code to report the issue to user and then they can contact Data feed support to verify issue on infra side.

-In case of incomplete data inside FieldList you may add try/catch block to catch the invalid usage exception to avoid the crash. That is the way application side can prevent the crash in case of invalid data come from network or data feed.

if (!FieldList.IsBlank)
{
      Try{
            ... Decode FieldList
       }catch(InvalidUsageException ex)
      {
         … Report issue
      }
}else
{
   ... Report issue
}

-If you want to investigate the issue and confirm that what kind of data your application receive, you may try the RIC which you often see the issue with one of Consumer example. And you have to turn on RSSL tracing log in the Consumer example if you can’t turn it on in your application. You can leave it run until your application found the issue again and then you can open the RSSL tracing log which generated by Consumer example to see the data it receive at the time the invalid usage exception occurs.

Please see configuration from the following post to turn on full RSSL tracing log. It will generate RSSLConsumerTrace_<pid>.xml in running directory.

If you could replicate the issue again, we can check the data in RSSL tracing log to confirm that it’s blank FieldList or not and then you can contact data Data feed support team to investigate the issue further.

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.

Thanks, will add the check in my codes.

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.