Bug 17222 - windows x64\Rterm.exe crashes if you type "c:\prog" at the prompt and then hit the TAB key
Summary: windows x64\Rterm.exe crashes if you type "c:\prog" at the prompt and then hi...
Alias: None
Product: R
Classification: Unclassified
Component: Misc (show other bugs)
Version: R 3.3.*
Hardware: x86_64/x64/amd64 (64-bit) Windows 64-bit
: P5 trivial
Assignee: R-core
Depends on:
Reported: 2017-02-15 12:16 UTC by Anthony Damico
Modified: 2017-03-31 14:52 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Damico 2017-02-15 12:16:36 UTC
tested and confirmed on two separate windows machines with Rterm.exe for version 3.3.2.  does not happen in Rgui.exe

it does give the expected error (both in Rterm.exe and Rgui.exe)
c:\progError: '\p' is an unrecognized escape in character string starting ""c:\p"

but after that, it also crashes the program.  here's the console window behavior with sessionInfo() and you can see the program unexpectedly exiting after i hit the TAB key and the error gets printed

thank you!!

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\anthonyd>"c:\Program Files\r\R-3.3.2\bin\x64\Rterm.exe"

R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 10586)

[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
> c:\progError: '\p' is an unrecognized escape in character string starting ""c:\p"

Comment 1 Duncan Murdoch 2017-02-15 12:28:47 UTC
Thanks, I can confirm it.  Presumably the issue is that the error in code completion isn't being handled properly.  Probably needs two fixes:  don't crash on error, and don't generate an error from bad input.
Comment 2 Duncan Murdoch 2017-03-31 14:52:16 UTC
I've fixed this in R-devel, but I don't think the patch will make it into 3.4.0, because I won't be able to fix any problems before code freeze.  It should be ported to R-patched (to be 3.4.1) after release.

The fix also addresses a couple of other problems:  when there were multiple completions, the report started with a garbage entry in Rgui in Windows; special characters like ', " and \ were not escaped in the substitutions.