# Known Issues

Version 6.1 of TERR contains the following known issues.

In this release, some open-source R functionality is not available, including graphics devices, and some functions from the base and stats packages. Likewise, S4 is not entirely compatible. The following table lists additional known issues.

Issue | Description
--- | ---
TERR-4993 | On Linux, you cannot save TERR Command History to a file.
TERR-5488 | If you receive the message `"SSL certificate problem: unable to get local issuer certificate"` when accessing SSL protected URLs (for example, https://), make sure that your system has the latest version of the certificate authority database for your system. On RedHat 5, this should be `yum update openssl`. On RedHat 6, this should be `yum update ca-certificates`.
TERR-6422 | Setting breakpoints in RStudio 0.99.903 with TERR on Windows can cause it to crash. When a script is sourced, and if it has breakpoints set, RStudio for Windows can crash. This crash does not occur when breakpoints are set inside a function and the function is called.
TERR-6576 | If you try to use an RStudio feature that requires the rmarkdown package or the shiny package, and the required package is not already installed, then this process currently fails if RStudio is configured with the TERR engine. To work around this problem, at the command prompt, call `install.packages()` to install the rmarkdown and shiny packages.
TERR-6812 | Due to changes in open-source R version 3.5 and resulting compatibility changes in TERR 5.0, packages that are built with a version of TERR prior to 5.0 must be rebuilt. To install a binary package from a repository, always call `install.packages(pkgname)` from TERR. The `install.packages` function finds the correct binary version in the repository for your version of TERR. Manually downloading the binary package from CRAN can result in errors when you use it with TERR. To install a package from source, try installing it first with TERR (with `install.packages` in TERR or with `TERR CMD INSTALL` from a command line). To install a package from source that you cannot build with TERR, install the package with the version of open-source R tested with TERR.
TERR-7077 | Certain packages, such as rJava, cannot be installed with TERR from source under Centos. If you encounter a package that does not install with TERR from source, then you can build the package using open-source R, and then install the binary package in TERR.
TERR-7727 | When you view help files in Rstudio, some text in the help (for example, the Arguments and the Value sections) might not be visible if you are using an Rstudio Editor theme with a dark background.
TERR-7728 | When you run TERR under Rstudio Server, if you end the session using File > Quit Session, the following message is displayed: `Session Error, The previous R session was abnormally terminated due to an unexpected crash`. This problem can also occur when you open a project using the File > New Project or File > Open Project menu commands.

## Package search order

When you install a package using TERR, by default, TERR first checks for the package on TRAN, and then checks on Posit. TERR installs the first version it finds. This is different than open-source R, which installs packages according to the newest version number available on CRAN. This difference is by design, because occasionally a CRAN package update causes a break with TERR compatibility, so we make available a tested version of the package on TRAN.

If you need to install one of these packages using open-source R (for example, to get source code on Linux), you can install the CRAN package, and then set `options()$repos` to install from only TRAN before reinstalling the package.

See "Specifying an older package on TRAN" in the Spotfire® Enterprise Runtime for R Technical Documentation for more information.

## When running on RedHat Linux, Spotfire Enterprise Runtime for R processes spawned by the parallel package may immediately crash

We have seen a problem when running TERR on RedHat Linux with versions of Java earlier than 1.7.0_40. If you call the `makeCluster` function in the parallel package to spawn new TERR processes, these processes may immediately crash with a fatal Java error. To test if this problem is occurring, try the following:

    library(parallel)
    c1 <- makeCluster(1, outfile="")
    # create cluster with one spawned process
    # specifying outfile="" to print all output
    c1 <- makeCluster(1, outfile="")
    clusterEvalQ(c1, 123)

If this problem is occurring, you see an error such as the following:

    > library(parallel)
    > # create cluster with one spawned process
    > # specifying outfile="" to print all output from the process
    > c1 <- makeCluster(1, outfile="")
    Creating 1 TERR cluster nodes at Tue Nov 21 9:38:25 2023
    > clusterEvalQ(c1, 123)
    1: #
    1: # A fatal error has been detected by the Java Runtime Environment:
    1: #
    1: # SIGSEGV (0xb) at pc=0x0000003ac2cbbfa5, pid=12649, tid=1075054912
    1: #1: # JRE version: 7.0_13-b20
    1: # Java VM: Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode linux-amd64
    compressed oops)
    1: # Problematic frame:
    1: # C [libstdc++.so.6+0xbbfa5) __cxa_allocate_exception+0x55
    1: #
    1: # Failed to write core dump. Core dumps have been disabled. To enable core
    dumping, try "ulimit -c unlimited" before starting Java again
    1: #
    1: # An error report file with more information is saved as:
    1: # /a/seafiler01.na.tibco.com/vol/vol2/users/jdoe/hs_err_pid12649.log
    1: #
    1: # If you would like to submit a bug report, please visit:
    1: # http://bugreport.sun.com/bugreport/crash.jsp
    1: #
    Error in waitForClusterReady(cl) : some cluster nodes have crashed or stopped: all crashed

The workaround for this problem is to set the `LD_PRELOAD` environment variable to `libstdc++.so.6`. This can be done before TERR is started, or within TERR, before the parallel library has been loaded:

    > Sys.setenv("LD_PRELOAD"="libstdc++.so.6")
    > library(parallel)
    > c1 <- makeCluster(1, outfile="")
    Creating 1 TERR cluster nodes at Tue Nov 21 10:18:56 2023
    > # create cluster with one spawned process
    > # specifying outfile="" to print all output
    > c1 <- makeCluster(1, outfile="")
    Creating 1 TERR cluster nodes at Tue Nov 21 10:19:51 2023
    > clusterEvalQ(c1, 123)
    1: Cloud Software Group, Inc. Confidential Information
    1: Copyright (C) 2011-2023 Cloud Software Group, Inc. ALL RIGHTS RESERVED
    1: Spotfire Enterprise Runtime for R version 6.1.1 for Microsoft Windows 64-bit
    1:
    1: Type 'help()' for help.
    1: Type 'q()' to quit.
    1: started engine node pid==15788 at Tue Nov 21 10:23:54 2023
    [[1]]
    [1] 123
    >