[rkward-cvs] SF.net SVN: rkward-code:[4726] trunk/rkward

tfry at users.sf.net tfry at users.sf.net
Fri Apr 26 08:42:18 UTC 2013


Revision: 4726
          http://sourceforge.net/p/rkward/code/4726
Author:   tfry
Date:     2013-04-26 08:42:16 +0000 (Fri, 26 Apr 2013)
Log Message:
-----------
Cope with errors while loading .Rprofile

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/rbackend/rkrbackend.cpp

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2013-04-26 08:21:21 UTC (rev 4725)
+++ trunk/rkward/ChangeLog	2013-04-26 08:42:16 UTC (rev 4726)
@@ -1,3 +1,4 @@
+- Fixed: R backend would exit immediately, without meaningful error message, if there is an error in .Rprofile (or Rprofile.site)
 - Fixed: Installing suggested packages from the package installation dialog was broken
 - Fixed: Selecting a mirror via the "R packages" settings page would not work when prompted for package installation form the backend
 - Remove support for compiling RKWard in a single process (threaded) variant. This was not used / tested since RKWard 0.5.5

Modified: trunk/rkward/rkward/rbackend/rkrbackend.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkrbackend.cpp	2013-04-26 08:21:21 UTC (rev 4725)
+++ trunk/rkward/rkward/rbackend/rkrbackend.cpp	2013-04-26 08:42:16 UTC (rev 4726)
@@ -985,6 +985,12 @@
 	stdout_stderr_fd = pfd[0];
 #endif
 
+#ifndef Q_WS_WIN
+	// It is important to set this *early*, so R does not bail out, if there is an error in .Rprofile.
+	// On windows, set in connectCallbacks() for technical reasons, and that seems sufficient.
+	R_Interactive = (Rboolean) TRUE;
+#endif
+
 	setup_Rmainloop ();
 
 #ifndef Q_WS_WIN
@@ -1001,9 +1007,14 @@
 #endif
 
 #ifndef Q_WS_WIN
-	// on windows, set in connectCallbacks() for technical reasons
+	// I am not sure, whether it is necessary to repeat this, here. It is not in R 3.0.0.
+	// But historically, it was placed here (after setup_Rmainloop(), and conceivably there
+	// was a reason to that (might have been reset in setup_Rmainloop() in earlier versions
+	// of R.
 	R_Interactive = (Rboolean) TRUE;
-#else
+#endif
+
+#ifdef Q_WS_WIN
 	setlocale (LC_NUMERIC, "C");	// something appears to mess with the locale on Windows. R will not work correctly without LC_NUMERIC=C
 #endif
 





More information about the rkward-tracker mailing list