Failed to initialize EViewsRConn.VariantRConn — COM Error 0x800706be at XOPEN(TYPE=R)

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

benactonbond
Posts: 2
Joined: Fri Jul 17, 2026 3:40 am

Failed to initialize EViewsRConn.VariantRConn — COM Error 0x800706be at XOPEN(TYPE=R)

Postby benactonbond » Tue Jul 21, 2026 6:22 am

Hi all,

We're hitting an intermittent error when driving R from EViews via xopen/xon/Xclose inside a program subroutine. The error is raised on a comment line, which is what makes it strange — R shouldn't be able to error on a comment in a healthy session.

Error message:

Error: attempt access index 0/0 in VECTOR_ELT in "# PRINT(R.VERSION.STRING)"
in SUB_SS_UTILITY.PRG on line 354.


Minimal reproducer:

comtimeout(0)
xopen(type=r, case=upper)
xon
library(base)
library(data.table)
library(zoo)
print(R.version.string)
print(.libPaths())
xoff
Xclose


The identical code sometimes passes and sometimes fails within minutes of each other — the only thing varying is the R session state.
The first R call in a fresh EViews session tends to succeed; a second call in the same session fails with the same VECTOR_ELT error, suggesting Xclose isn't fully tearing down the R session and subsequent calls inherit dirty state.
Cold-restarting EViews and killing any leftover RConn*.exe / Rterm.exe / Rscript.exe / Rgui.exe processes clears it.
Forcing a clean environment at the top of the xon…xoff block (rm(list = ls(envir = .GlobalEnv), envir = .GlobalEnv) then gc()) before any library() call appears to prevent it.

The VECTOR_ELT text looks like a C-level error, i.e. R's internal structures becoming inconsistent across repeated xopen/Xclose cycles.

Is this a known issue with the R connection not being fully reset between xopen/Xclose cycles in the same EViews session?
Is there a recommended way to guarantee a clean R session per xopen, short of restarting EViews?

Our setup is working with EViews 13 and R version 4.6.1

Thanks, Ben

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13610
Joined: Tue Sep 16, 2008 5:38 pm

Re: Failed to initialize EViewsRConn.VariantRConn — COM Error 0x800706be at XOPEN(TYPE=R)

Postby EViews Gareth » Tue Jul 21, 2026 9:14 am

I've been trying to replicate this, but can't. I ran you reproducer many times over a couple of hours, and no issues.

Which version/build date of EViews are you using? (Help->About EViews)

benactonbond
Posts: 2
Joined: Fri Jul 17, 2026 3:40 am

Re: Failed to initialize EViewsRConn.VariantRConn — COM Error 0x800706be at XOPEN(TYPE=R)

Postby benactonbond » Thu Jul 23, 2026 2:36 am

Thank you Gareth,

Enterprise Edition - Oct 11 2023 build

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13610
Joined: Tue Sep 16, 2008 5:38 pm

Re: Failed to initialize EViewsRConn.VariantRConn — COM Error 0x800706be at XOPEN(TYPE=R)

Postby EViews Gareth » Thu Jul 23, 2026 8:36 am

Might want to update to the latest version.

EViews Steve
EViews Developer
Posts: 845
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Failed to initialize EViewsRConn.VariantRConn — COM Error 0x800706be at XOPEN(TYPE=R)

Postby EViews Steve » Fri Jul 24, 2026 9:55 am

Some things to check:

If you're not using R 64-bit, switch to that. EViews 13 is a 64-bit only application and while talking to 32-bit R is possible, there are extra COM layers to make that happen which can cause complications.

Next, use a minimal R installation with just the packages you need. This problem might be caused by a package that's already installed on your current R installation. Since Gareth couldn't reproduce the issue, perhaps a new R installation will help.

Next, look at your Windows Task Manager to verify that you don't have orphaned instances of EViewsRConn.exe running in the background. If you see these instances while EViews is shutdown, make sure you kill them before restarting EViews and trying again.

Finally, check your Windows R Path environment variables. Ensure your system environment variables (PATH and R_HOME) point to the correct, active R installation directory. If missing or pointing to different folders, add/update them and then restart EViews.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests