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

Unrecognized escape in character string results in crash (Windows only) #19

Closed
stepelu opened this issue Oct 19, 2014 · 1 comment
Closed

Comments

@stepelu
Copy link

stepelu commented Oct 19, 2014

Executing via Rserve the command:

try(eval(parse(text="setwd('Z:\sp\Dropbox\Prj\scilua\head')")),silent=TRUE)

results in a crash of Rserve(_d).exe due to the erroneous string escape:

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 0000000000509A00 (total 1 servers)
INFO: accepted connection for server 0000000000509A00, calling connected
connection accepted.
sending ID string.

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

C:\Users\sp\Documents\R\win-library\3.1\Rserve\libs\x64>

On Linux and OSX Rserve shows the error but survives.

@s-u
Copy link
Owner

s-u commented Oct 28, 2014

See FAQ How can I prevent exit on error?

http://rforge.net/Rserve/faq.html#exit

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

2 participants