[rkward-devel] R engine has died error

Max Candocia mscandocia at gmail.com
Thu Apr 14 03:20:22 UTC 2016


Hello,

I was running some graphics-saving code, and I got this error:

Connection closed unexpectedly. Last error was:
QLocalSocket: Remote closed
The R backend will be shut down immediately. This means, you can not use 
any more functions that rely on it. I.e. you can do hardly anything at 
all, not even save the workspace (but if you're lucky, R already did 
that). What you can do, however, is save any open command-files, the 
output, or copy data out of open data editors.
Quit RKWard after that.
Since this should never happen, please write a mail to 
rkward-devel at lists.sourceforge.net, and tell us what you were trying to 
do, when this happened. Sorry!

I had the following libraries loaded:

* plyr
* dplyr
* reshape2
* ggplot2
* scales

I was looping through a list of 2-length characters to generate pairwise 
plots.  Here is the code that was running near the end:

 > for (pair in support_pairs){
+   v1 = pair[1]
+   v2 = pair[2]
+   input_make_percent = all(na.omit(df[,v1])>= 0 & na.omit(df[,v1]) <= 1)
+   output_make_percent = all(na.omit(df[,v2])>= 0 & na.omit(df[,v2]) <= 1)
+   if (input_make_percent) {
+     v1p = scale_x_continuous(label=percent)
+   }
+   else{
+     v1p = NULL
+   }
+   if (output_make_percent) {
+     v2p = scale_y_continuous(label=percent)
+   }
+   else{
+     v2p = NULL
+   }
+   graphic = ifelse(is.factor(df[,v1]),geom_bar,geom_point)
+   png(fn_make(paste0(v1,'_',v2,'_','support.png')))
+   print(
+ 
ggplot(df,aes_string(x=v1,y=v2))+graphic(stat='identity')+geom_smooth(method='lm') 
+
+     xlab(input_descriptions[[v1]]) + ylab(results_descriptions[[v2]]) +
+     ggtitle(titlify(paste0(input_descriptions[[v1]],' vs. 
',results_descriptions[[v2]]))) +v1p + v2p
+   )
+   dev.off()
+ }
--- interrupted ---

I realize there was a bug (geom_smooth should not be used when I use 
geom_boxplot). When I removed this bug, the issue no longer persisted.

Here is the curious thing: When I added a print(pair) line in the second 
loop (where the error occurs), it did not initially print, but after the 
error was thrown, it started to print out each of the pairs, and when it 
finished, I could use the console again and resume work normally (even 
when I didn't remove the previous bug).

When I added print(1), print(2), print(3), print(4) to various points in 
the code, it did not thrown an error at all.  When I removed the 
additional print statements (whether they were inside the png() block or 
not), the error persisted.

This error occurred using Version 0.6.1, and I am running it on Ubuntu 
14.04 LTS.

I will send any additional information I can (or if I've found a way to 
resolve the issue.

Best,

Max Candocia


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
RKWard-devel mailing list
RKWard-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel


More information about the rkward-devel mailing list