ElementList encoding bug?

For quite some time I have been investigating a weird bug in encoding ElementList with UPA C -- being wrapped, ElementList encoding routines do not finalize encoding of the container.
I was able to narrow the problem to a small code snippet, please see the attached source file: one can see, that every encoding routine call returned 0 or positive value, end the buffer is populated with the encoded value(s), but actual finalization hasn’t happened, therefore during decoding ElementList comes out empty. However, if comment out line #67 and uncomment line #68, the ElementList decoded completely and successfully.
It’s worth to mention:
- the wrap utility works for all other UPA functions, including transport and messages routines. For example, the same implementation of the Encoder class for FieldList works perfectly;
- in the original project/code, even calling rsslEncodeElementListComplete natively(unwrapped) does not solve the problem.
I would really appreciate any assistance in the investigation, because I am out of the ideas.
Thank you in advance.
Best Answer
-
I suspect that you’re running into an issue where the elementList structure allocated in the Init function is going out of scope, which is causing your encoding issues.
The elementList structure needs to stay in scope during the entirety of the encoding and decoding of a buffer, as it is referenced several times during the encoding process. The iterators will have keep a pointer to the structure passed in. This structure cannot go out of scope or be changed during encoding or decoding.
0
Answers
-
Code attachment is missing. Please use "Insert File" button to upload. Thanks.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛