[R-SIG-Mac] R-engine failure on Mac OS Snow Leopard 10.6.4, 32 bits, with java 1.6

Simon Urbanek simon.urbanek at r-project.org
Tue Feb 1 16:25:23 CET 2011


On Feb 1, 2011, at 10:01 AM, Christine Plumejeaud wrote:

> Hi,
> I have developped a java swing application (1.6) embedding R (using the 
> JRI, JRengine) and all was fine on my previous laptop (Mac OS X Leopard, 
> 10.5).
> 
> But I had to change my laptop (Snow Leopard 10.6.4, 32 bits with java 
> 1.6), and now there is a failure, which seems to come from cocoa (read 
> this on other forums). The error "__NSAutoreleaseNoPool" is on all 
> forums.//For instance, see
> http://www.omnigroup.com/mailman/archive/macosx-dev/2001-July/029778.html/
> /

Can you be more specific as of what you do? Can you include your exact setup and Java code? There is a lot of things that can break in R embedded into Java because of the way Java interacts with the OS - for example I'm surprised to see you load Tcl/Tk as that in itself is possibly problematic (at the very least it won't work properly with Java GUIs). As for the actual warnings you post those are technically harmless and easy to remove, but the underlying problem is that of Java co-operating (or not) with other libraries that interact with the OS -- if you want stability you really want to stay within the Java realm (i.e. use JavaGD instead of Quartz, don't even think about Tcl/Tk and use iWidgets/gWidgetsJava etc.). Also you don't want to call and UI code other than on the main thread (technically we allow apps to call R from other threads as long as they are synchronized but that won't work for OS interactions which have to be on the main thread).

Cheers,
Simon


> I use the R  binairies downloaded from CRAN :
> http://cran.r-project.org/
> I also have installed the Xcode SDK
> 
> Here is my stack trace :
> ------------------------------------------------------------------------
> java.library.path: 
> /Library/Frameworks/R.framework/Resources/library/rJava/jri
> R_HOME: /Library/Frameworks/R.framework/Resources
> 
> R version 2.12.1 (2010-12-16)
> Copyright (C) 2010 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> Platform: i386-apple-darwin9.8.0/i386 (32-bit)
> ...
> Chargement de Tcl/Tk... termin?
> Le chargement a n?cessit? le package : mvoutlier
> ** R loaded**
> ------------------------------------------------------------------------
> Ok all is fine
> But ...
> ------------------------------------------------------------------------
> 
> 2011-02-01 14:16:47.428 java[377:a0f] *** __NSAutoreleaseNoPool(): 
> Object 0x1130840 of class NSConcreteMapTableValueEnumerator autoreleased 
> with no pool in place - just leaking
> 2011-02-01 14:16:47.432 java[377:a0f] *** __NSAutoreleaseNoPool(): 
> Object 0x150c440 of class NSConcreteMapTableValueEnumerator autoreleased 
> with no pool in place - just leaking
> 
> ------------------------------------------------------------------------
> 
> Reading this post, 
> https://stat.ethz.ch/pipermail/r-sig-mac/2010-December/007913.html, I 
> understood that
> 
> /"the latest update to Snow Leopard (10.6.5) removes necessary header/  /files from the system Java installation."
> /
> 
> OK, and all this have been ennoying other people using the mac OS X JVM 
> for other applications.
> /
> /
> So I have followed the advice : installed the Xcode SDK and made java 
> reconf for R with good CPP flags/
> 
> /------------------------------------------------------------------------
> plumejeau:ESTIM christineplumejeaud$ 
> JAVA_CPPFLAGS=-I/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Headers 
> R CMD javareconf
> Java interpreter : 
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
> Java version     : 1.6.0_22
> Java home path   : 
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
> Java compiler    : 
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/javac
> Java headers gen.: 
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/javah
> Java archive tool: 
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/jar
> Java library path:
> JNI linker flags : -framework JavaVM
> JNI cpp flags    : 
> -I/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Headers
> 
> Updating Java configuration in /Library/Frameworks/R.framework/Resources
> Done.
> ------------------------------------------------------------------------
> 
> Unfortunatly, the problem is going on...
> 
> Have you any idea ?
> 
> Here is the command to launch my application.
> java -d32 
> -Djava.library.path=/Library/Frameworks/R.framework/Resources/library/rJava/jri 
> -cp "${ESTIM_DIR}/lib/JRI.jar:${ESTIM_DIR}/lib/JRIEngine.jar --arch 
> i386:${ESTIM_DIR}/lib/postgis_1_0_0.jar:${ESTIM_DIR}/lib/postgresql-8.1-404.jdbc3.jar:${ESTIM_DIR}/lib/REngine.jar:${ESTIM_DIR}/dist/ESTIM.jar" 
> Estim
> 
> Thanks in advance,
> Christine
> 
> -- 
> Christine Plumejeaud
> Equipe Steamer, Laboratoire d'Informatique de Grenoble
> 681 rue de la Passerelle
> 38400 St Martin d'Hères
> 04 76 82 72 11
> christine.plumejeaud at imag.fr
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list