#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006c724802, pid=7032, tid=7664
#
# JRE version: Java(TM) SE Runtime Environment (7.0_75-b13) (build 1.7.0_75-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.75-b04 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [R.dll+0x24802]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
问题原因:使用了低级别的Rengine API,低级别API非线程安全,且未作性能优化。数据量较大时,jvm崩溃。
解决方法:替换所有使用rni开头的函数,使用Rengine.assign,Rengine.eval实现相同效果。
参考文章:
http://stats-rosuda-devel.listserv.uni-augsburg.narkive.com/DOWBy92v/exception-access-violation-when-calling-rnieval-to-retrieve-arrays
我遇到的场景与此文章中类似,少量数据没有问题,数据量稍大,报错。
http://rforge.net/org/doc/org/rosuda/JRI/Rengine.html
文章开头处,重要提示,作者明确建议使用high-level api,不建议使用low-level api。通过R安装的rjava包根目录下相关测试用例中,也有类似注释。