Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rserve stil crashes on Windows with invalid escapes sequences #22

Closed
stepelu opened this issue Nov 16, 2014 · 4 comments
Closed

Rserve stil crashes on Windows with invalid escapes sequences #22

stepelu opened this issue Nov 16, 2014 · 4 comments

Comments

@stepelu
Copy link

stepelu commented Nov 16, 2014

Opening a new issue as the previous one (see #19) was closed while the issue is still present and I can't re-open it.

The link mentioned in the proposed resolution suggests to use option(error=function() NULL), you probably mean options(error=function() NULL).
That still doesn't work: the example below shows that even though the error option is set, Rserve still crashes on the invalid escape sequence.

C:\Users\sp\Documents\R\win-library\3.1\Rserve\libs\x64>Rserve_d.exe
Rserve 1.7-3 () (C)Copyright 2002-2013 Simon Urbanek
$Id$

Loading config file Rserv.cfg
Failed to find config file Rserv.cfg
Rserve: Ok, ready to answer queries.
 - create_server(port = 6311, socket = <NULL>, mode = 0, flags = 0x4000)
INFO: adding server 0000000000518360 (total 1 servers)
INFO: accepted connection for server 0000000000518360, calling connected
connection accepted.
sending ID string.

header read result: 16
DUMP [16]: 03 00 00 00 57 00 00 00 00 00 00 00 00 00 00 00  |....W...........
loading buffer (awaiting 87 bytes)
parsing parameters (buf=0000000000518E40, len=87)
DUMP [87]: 04 53 00 00 74 72 79 28 65 76 61 6c 28 70 61 72 73 65 28 74 65 78 74 3d 22 63 61 70 74 75 72 65 2e 6f 75 74 70 75 74 28 6f 70 74 69 6f 6e 73 28 65 72 72 6f 72 3d 66 75 6
e 63 74 69 6f 6e 28 29 20 4e 55 4c 4c 29 29 22 29 29 2c 73 69 6c 65 6e 74 3d 54 52 55 45 29  |.S..try(eval(parse(text="capture.output(options(error=function() NULL))")),silent=TRUE
)
PAR[0]: 00000057 (PAR_LEN=83, PAR_TYPE=4, large=no, c=0000000000518E40, ptr=0000000000518E44)
CMD=00000003, pars=1
parseString("try(eval(parse(text="capture.output(options(error=function() NULL))")),silent=TRUE)")
buffer parsed, stat=1, parts=1
result type: 20, length: 1
R_tryEval(xp,R_GlobalEnv,&Rerror);
Calling R_tryEval for expression 1 [type=6] ...
Expression 1, error code: 0
expression(s) evaluated (Rerror=0).
String vector of length 0:
getStorageSize(0000000005387D60,type=16,len=0) = 4
result storage size = 5 bytes
stored 0000000005387D60 at 0000000005A7F048, 0 bytes
stored SEXP; length=8 (incl. DT_SEXP header)
OUT.sendRespData
HEAD DUMP [16]: 01 00 01 00 08 00 00 00 00 00 00 00 00 00 00 00  |................
BODY DUMP [8]: 0a 04 00 00 22 00 00 00  |...."...
reply sent.

header read result: 16
DUMP [16]: 03 00 00 00 5f 00 00 00 00 00 00 00 00 00 00 00  |...._...........
loading buffer (awaiting 95 bytes)
parsing parameters (buf=0000000000518E40, len=95)
DUMP [95]: 04 5b 00 00 74 72 79 28 65 76 61 6c 28 70 61 72 73 65 28 74 65 78 74 3d 22 63 61 70 74 75 72 65 2e 6f 75 74 70 75 74 28 73 65 74 77 64 28 27 5a 3a 5c 73 70 5c 44 72 6f 7
0 62 6f 78 5c 50 72 6a 5c 73 63 69 6c 75 61 5c 68 65 61 64 27 29 29 22 29 29 2c 73 69 6c 65 6e 74 3d 54 52 55 45 29  |.[..try(eval(parse(text="capture.output(setwd('Z:\sp\Dropbox\P
rj\scilua\head'))")),silent=TRUE)
PAR[0]: 0000005f (PAR_LEN=91, PAR_TYPE=4, large=no, c=0000000000518E40, ptr=0000000000518E44)
CMD=00000003, pars=1
parseString("try(eval(parse(text="capture.output(setwd('Z:\sp\Dropbox\Prj\scilua\head'))")),silent=TRUE)")
Error: '\s' is an unrecognized escape in character string starting ""capture.output(setwd('Z:\s"

Moreover the documentation suggests that Rserve runs in not-interactive mode (with default config) in Windows prior to 0.6-2, while I'm running Rserve 1.7-3.

@stepelu
Copy link
Author

stepelu commented Feb 11, 2015

Would you please have any update on this issue? Have you been able to replicate it?

Thanks

@s-u
Copy link
Owner

s-u commented Feb 12, 2015

Sorry, no, I don't use Windows. Also note that this is not a crash - it's merely R exiting on an error. Since the main purpose of Rserve is to provide parallel sessions while Windows is incapable of that, it is a very rare exception to use Windows and Rserve. Windows support (if present) is mostly provided as a contribution from the community or friendly folks at Revolution Analytics. I will certainly entertain pull requests to restore Windows functionality and to fix any Windows-specific issues.

@smaskar
Copy link

smaskar commented Jun 18, 2015

Any suggested solution to fix the following issue. I am using R serve 3.2.0 on windows.

I am also getting the following error
Starting Rserve...
"C:\PROGRA1\R\R-321.0\library\Rserve\libs\x64\Rserve.exe"

Rserve: Ok, ready to answer queries.
Error: '\w' is an unrecognized escape in character string starting "'C:\transmart124\apache-tomcat7\w"
Is

@s-u
Copy link
Owner

s-u commented Jul 31, 2017

Note, both errors are user errors - you have to escape \ in R so it must be "C:\\Pro..."

@s-u s-u closed this as completed Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants