Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon COM /
avatar image
Question by sascha · Jun 30, 2016 at 08:23 AM · rfaexcelvbaeikon comaccess violation

RFA Exception Handler - Access Violation / Excel Vba Eikon

I implemented a VBA script which collects all options in a Chain (e.g. "0#ABBN*.EX") via

the AdfinXRtLib.AdxRtChain object. Next the script queries data for all options the chain via

AdfinXRtLib.AdxRtList (~300 RICS, 10 FID). So fare the script works as intended.

However, if this is done in a loop of ~100+ iterations excel crashes with the below error message.

Do you have an idea what goes wrong?

(In every loop new API objects are initialize, I have no other COM add-ins active.

I'm using AdfinX Real Time 6.0 Library.)

RFA Exception Handler

Application: EXCEL
Process Id: 0x330C
Thread Id: 0x47C0

File: ..\..\..\Common\Support\OS\Impl\Thread.cpp
Line: 51

Problem:
Exception "Access Violation" (0xC0000005) occured at 0x52BBF608: memory at 0x00000000 cannot be read

People who like this

0 Show 2
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Neil Shah ♦♦ · Jun 30, 2016 at 08:42 AM 1
Share

Could you upload a sample Excel file with this issue? Thanks

avatar image
REFINITIV
Zhenya Kovalyov ♦♦ · Jun 30, 2016 at 01:25 PM 1
Share

Are these calls sequential, i.e. you are creating a new request after receiving a response for the previous iteration?

2 Replies

  • Sort: 
avatar image
Best Answer
Answer by sascha · Jul 01, 2016 at 09:10 AM

@Zhenya Kovalyov the samplefile does not trigger an error. I assume the problem is triggered by creating a new AdxRtLists for each request. If I reuse the same object for each request the error does not trigger.

Maybe, I should keep one AdxRtLists object alive and register/unregister new items in each request.?

I do not request multiple instruments at the same time because I need the results for further calculations which should not be based on outdated market prices. Furthermore the sequence and time of each instrument is unknown.

Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Zhenya Kovalyov ♦♦ · Jul 01, 2016 at 09:16 AM 1
Share

Well, it looks like that the error is triggered when you destroy the object rather than create it. In the sample file I decouple the event handler routine from disposing of the created objects, and it works fine.

Reusing the object is also a possibility, make sure that you do it correctly by executing

mAdxRtList.StopUpdates 

mAdxRtList.CloseAllLinks 

mAdxRtList.UnregisterAllItems
avatar image
sascha · Jul 04, 2016 at 02:54 AM 0
Share

@Zhenya Kovalyov

Thanks, with reusing the object it works very well now.

avatar image
Answer by sascha · Jul 01, 2016 at 04:20 AM

I created a simplified xslm file where the exeption still occures. Simply run the sub test. The script crashes between i=250 and i=300. Thanks for your support.

Yes, it creates a new request with each iteration.

rfaaccessviolation.zip


rfaaccessviolation.zip (57.2 KiB)
Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Zhenya Kovalyov ♦♦ · Jul 01, 2016 at 08:10 AM 0
Share

@sascha.arican, is there a reason why you request the instruments with multiple AdxRtLists instead of running a single request for multiple instruments?

In the meantime, could you open this file adxrtlist-samplexlsm.zip run the following sequence:

1. Create()

2. Request()

and after "DONE" in the immediate window

3. Dispose()

Does it trigger an error?

adxrtlist-samplexlsm.zip (24.9 KiB)

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

How do I trigger a VBA macro from within the TR function in Eikon Excel

Cant call Adfin bond function 'BdCashFlows' from VBA

I like to write VBA code to disable Excel to update links to TRD on Workbook_Open

Can I obtain News with the COM API?

Download manager URLs

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges