[R] An unexpected exception has been detected in native code outside the VM

ken_lee ken_lee at tynesys.com
Thu Apr 25 09:20:16 CEST 2002


Dear all:
      I have a problem with calling R from Java,
It was ok at the first time,but the error message "An unexpected exception has been detected in native code outside the VM. "
will appear. What is the issue of "native code"?

Could somebody help me ? 
Thanks, 
ken

This is the log I obtained: 

executing: source('/export/home/users/ruser/java/Rmain.R')
Loading RInterpreter library

R : Copyright 2002, The R Development Core Team
Version 1.4.1  (2002-01-30)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type `license()' or `licence()' for distribution details.

R is a collaborative project with many contributors.
Type `contributors()' for more information.

Type `demo()' for some demos, `help()' for on-line help, or
`help.start()' for a HTML browser interface to help.
Type `q()' to quit R.

[Previously saved workspace restored]

now dyn.load(/usr/local/lib/R/library/ctest/libs/ctest.so)..
`envir' chosen:<environment: R_GlobalEnv>
--> parsed 1 expressions; now eval(.)ing them:

>>>> eval(expression_nr. 1 )
		 =================

> rmain <- function(Rvals = NULL) {
    library(SJava)
    library(nlme)
    library(ctest)
    print(Rvals)
    file <- "zz"
    dev <- "png"
    print .... [TRUNCATED] 
curr.fun: symbol <-
 .. after `expression(rmain <- function(Rvals = NULL) {    library(SJava)    library(nlme)    library(ctest)    print(Rvals)    file <- "zz"    dev <- "png"    print(dev)    draw <- "pairs_corr_scatter"    if (draw == "pairs_corr_scatter") {        source("/export/home/users/ruser/rsc/pcscatter01.R")        NODE = rnorm(77)        RSM2 = rnorm(77)        CADT = rnorm(77)        VTS = c(NODE - c(rnorm(12), rep(0, 65)))        xRS = c(NODE - c(rnorm(27), rep(0, 50)))        reda <- data.frame(NODE = NODE, RSM2 = RSM2, CADT = CADT,             VTS = VTS, xRS = xRS)        pcscatter01(file = file, dev = dev, reda = reda, title = "title",             footnote = "aaa")    }    print(file)    val <- 1    val})'
now dyn.load(/usr/local/lib/R/library/SJava/libs/SJava.so)..
Garbage collection 1 = 0+0+1 (level 2) ... 
146961 cons cells free (36%)
5.7 Mbytes of heap free (95%)
Loading required package: nls 
Garbage collection 2 = 1+0+1 (level 0) ... 
85806 cons cells free (21%)
5.5 Mbytes of heap free (92%)
now dyn.load(/usr/local/lib/R/library/nls/libs/nls.so)..
now dyn.load(/usr/local/lib/R/library/nlme/libs/nlme.so)..
`envir' chosen:<environment: R_GlobalEnv>
--> parsed 1 expressions; now eval(.)ing them:

>>>> eval(expression_nr. 1 )
		 =================

> pcscatter01 <- function(file = NULL, dev, reda, title, 
    footnote, width = 10, height = 7) {
    tmp <- paste(file, dev, sep = "_pcscatter.")
    c .... [TRUNCATED] 
curr.fun: symbol <-
 .. after `expression(pcscatter01 <- function(file = NULL, dev, reda, title,     footnote, width = 10, height = 7) {    tmp <- paste(file, dev, sep = "_pcscatter.")    cmd <- paste("| gs -dNOPAUSE -dBATCH -q -sDEVICE=png256 -r90 -g900x630 -sOutputFile=",         tmp, " -", sep = "")    postscript(file = cmd, width = width, height = height, pointsize = 10.5,         paper = "special", horizontal = F)    invisible()    par(mar = c(5, 4, 4, 2))    title <- list(title, col = "red", cex = 1.5)    panel.cor <- function(x, y, digits = 2, prefix = "", cex.cor) {        usr <- par("usr")        on.exit(par(usr))        par(usr = c(0, 1, 0, 1))        r <- abs(cor(x, y))        txt <- format(c(r, 0.123456789), digits = digits)[1]        txt <- paste(prefix, txt, sep = "")        if (missing(cex.cor))             cex <- 0.8/strwidth(txt)        text(0.5, 0.5, txt, cex = cex * r)    }    pairs(reda, lower.panel = panel.smooth, upper.panel = panel.cor)    title(main = title, line = 2)    graphics.off()})'
Garbage collection 3 = 2+0+1 (level 0) ... 
83676 cons cells free (20%)
5.5 Mbytes of heap free (91%)
executing: source('/export/home/users/ruser/java/Rmain.R')

R : Copyright 2002, The R Development Core Team
Version 1.4.1  (2002-01-30)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type `license()' or `licence()' for distribution details.

R is a collaborative project with many contributors.
Type `contributors()' for more information.

Type `demo()' for some demos, `help()' for on-line help, or
`help.start()' for a HTML browser interface to help.
Type `q()' to quit R.


An unexpected exception has been detected in native code outside the VM.                      <=====ERROR MESSAGE====
Unexpected Signal : 11 occurred at PC=0xf27e2440
Function name=do_dump
Library=/usr/local/lib/R/bin/libR.so

Current Java thread:
	at org.omegahat.R.Java.ROmegahatInterpreter.initR(Native Method)
	at org.omegahat.R.Java.ROmegahatInterpreter.<init>(ROmegahatInterpreter.java:65)
	at com.tynesys.common.cpc01Action.perform(cpc01Action.java:231)
	at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1012)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
	at java.lang.Thread.run(Thread.java:479)

Dynamic libraries:
0x10000 	/usr/java/bin/../bin/sparc/native_threads/java
0xff350000 	/usr/lib/libthread.so.1
0xff390000 	/usr/lib/libdl.so.1
0xff200000 	/usr/lib/libc.so.1
0xff330000 	/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
0xfe480000 	/usr/j2se/jre/lib/sparc/client/libjvm.so
0xff2e0000 	/usr/lib/libCrun.so.1
0xff1e0000 	/usr/lib/libsocket.so.1
0xff100000 	/usr/lib/libnsl.so.1
0xff0d0000 	/usr/lib/libm.so.1
0xff310000 	/usr/lib/libw.so.1
0xff0b0000 	/usr/lib/libmp.so.2
0xff080000 	/usr/j2se/jre/lib/sparc/native_threads/libhpi.so
0xff050000 	/usr/j2se/jre/lib/sparc/libverify.so
0xfe440000 	/usr/j2se/jre/lib/sparc/libjava.so
0xff020000 	/usr/j2se/jre/lib/sparc/libzip.so
0xfaed0000 	/usr/j2se/jre/lib/sparc/libnet.so
0xfacd0000 	/usr/lib/nss_files.so.1
0xf3ee0000 	/usr/local/lib/R/library/SJava/libs/SJava.so
0xf3ec0000 	/usr/local/lib/R/library/SJava/libs/libRSNativeJava.so
0xf2780000 	/usr/local/lib/R/bin/libR.so
0xf3ea0000 	/usr/local/lib/libgcc_s.so.1
0xf3dd0000 	/usr/lib/libz.so.1
0xf3c30000 	/usr/lib/libcurses.so.1
0xf3db0000 	/usr/local/lib/R/library/ctest/libs/ctest.so
0xf3c10000 	/usr/local/lib/R/library/nls/libs/nls.so
0xf3b50000 	/usr/local/lib/R/library/nlme/libs/nlme.so

Local Time = Thu Apr 25 11:18:04 2002
Elapsed Time = 51
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.3.1_03-b03 mixed mode)
#
# An error report file has been saved as hs_err_pid6344.log.
# Please refer to the file for further information.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list