cdkr
cdkr copied to clipboard
InChIKey functionality crashes with "Exception: java.lang.StackOverflowError thrown from the UncaughtExceptionHandler in thread "process reaper""
I describe the issue here because rinchi
is just a wrapper around this functionality, and nothing we can change in rinchi
would make a difference to this issue:
library(rcdk)
library(rinchi)
mol <- parse.smiles("CCCC")
rinchi::get.inchi.key(mol[[1]])
results in:
Exception: java.lang.StackOverflowError thrown from the UncaughtExceptionHandler in thread "process reaper"
To reproduce:
docker run --rm -it bioconductor/bioconductor_docker:devel
# in the docker
apt-get update
apt-get install openjdk-17-jdk-headless
# same error with built-in jdk11 and with jdk18 and 19
R CMD javareconf
R
in R:
install.packages(c("rcdk", "rJava")) # alternatively from github
install.packages("remotes")
remotes::install_github("CDK-R/rinchi")
Digging into the haystack, I can trigger the error by doing:
jnainchi<- J("io.github.dan2097.jnainchi.JnaInchi")
which is used called in CDK here:
https://github.com/cdk/cdk/blob/d60aaa15c9c4edb3a0103e6d5a1d8ffacc235435/storage/inchi/src/main/java/org/openscience/cdk/inchi/InChIGenerator.java#L537
System (please complete the following information):
- OS: The docker is based on Ubuntu 22.04.1, the host is running Debian 10.
- Java Version: tested 11, 17, 18, 19
- R Version: R-devel as of today Tested from both commandline R and Rstudio.
Interestingly, I do not have the error on R 4.2.0, rJava 1.0-6, rcdk 3.7.0, rcdklibs 2.8 on Windows.
setting value
version R Under development (unstable) (2023-01-10 r83596)
os Ubuntu 22.04.1 LTS
system x86_64, linux-gnu
ui X11
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Etc/UTC
date 2023-01-13
pandoc 2.19.2 @ /usr/local/bin/pandoc
package * version date (UTC) lib source
cli 3.6.0 2023-01-09 [1] CRAN (R 4.3.0)
fingerprint 3.5.7 2018-01-07 [1] CRAN (R 4.3.0)
iterators 1.0.14 2022-02-05 [1] CRAN (R 4.3.0)
itertools 0.1-3 2014-03-12 [1] CRAN (R 4.3.0)
png 0.1-8 2022-11-29 [1] CRAN (R 4.3.0)
rcdk * 3.7.0 2023-01-13 [1] Github (CDK-R/cdkr@95f7e23)
rcdklibs * 2.8 2023-01-13 [1] Github (CDK-R/rcdklibs@55dbd00)
rinchi * 0.5 2023-01-13 [1] Github (CDK-R/rinchi@f1a61f5)
rJava * 1.0-6 2021-12-10 [1] CRAN (R 4.3.0)
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
[1] /usr/local/lib/R/site-library
[2] /usr/local/lib/R/library
Additional context Add any other context about the problem here.