Error: C stack usage 1993168 is too close to the limit is thrown while constructing a pretty large plot using ggplot2. The Cstack_info() inside this session gives
size current direction eval_depth
1992294 9496 1 2
StackOverflow solutions suggest to increase stack size on a *nix machine using ulimit.
However, if I run R session outside of the Visual Studio (e.g. in console by typing R.exe), this same script executes fine and Cstack_info() gives
size current direction eval_depth
63753420 9272 1 2
According to the manual, the size is reported in bytes and is expected to be accurate when measured on machines running Windows (and some other systems), and outside of Visual Studio environment it is ~30 times larger.
In this particular case I can bypass this limit by rearranging my plot commands, but some other complex tasks can fail due to this limit.
A way to control such specific settings of an instance of R running in RTVS could solve this problem.
System info:
R Services Information:
Local R: C:\Program Files\Microsoft\R_Open\R-3.4.1\
Version: 1.3.40104.1351
Operating System: Microsoft Windows 10.0.16299
CPU Count: 8
Physical Memory: 24523 MB, 15982 MB free
Virtual Memory: 28619 MB, 18396 MB free
Video controller[1]: NVIDIA GeForce GTX 660
GPU[1]: GeForce GTX 660
Connected users: 1
R info: Microsoft R Open 3.4.1.0
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
Error: C stack usage 1993168 is too close to the limit is thrown while constructing a pretty large plot using
ggplot2
. TheCstack_info()
inside this session givesStackOverflow solutions suggest to increase stack size on a *nix machine using
ulimit
.However, if I run R session outside of the Visual Studio (e.g. in console by typing
R.exe
), this same script executes fine andCstack_info()
givesAccording to the manual, the size is reported in bytes and is expected to be accurate when measured on machines running Windows (and some other systems), and outside of Visual Studio environment it is ~30 times larger.
In this particular case I can bypass this limit by rearranging my plot commands, but some other complex tasks can fail due to this limit.
A way to control such specific settings of an instance of R running in RTVS could solve this problem.
System info:
R info: Microsoft R Open 3.4.1.0