Discussion:
[Rcpp-devel] RInside Error: cons memory exhausted (limit reached?)
Jason
2017-05-08 09:30:35 UTC
Permalink
When I compile and run the RInside examples rinside_sample0.cpp on Windows
10, I get the error :

Error: cons memory exhausted (limit reached?)
Execution halted

I use R 3.1.3, and I put the follow code in the Rprofile.site file:

#############################################
require("datasets", quietly = TRUE)
require("utils", quietly = TRUE)
require("grDevices", quietly = TRUE)
require("graphics", quietly = TRUE)
require("stats", quietly = TRUE)
require("data.table", quietly = TRUE)
require("stringr", quietly = TRUE)
require("Rcpp", quietly = TRUE)
require("RCurl", quietly = TRUE)
#############################################

After removed these code( all lines or some lines), the error disappear,
and it return the correct result --- the string "Hello, world!"

Who can tell me how to solve this problem ?

Kind regards,
Jason
Joris Meys
2017-05-08 09:35:48 UTC
Permalink
I'm not certain as to what causes this, but two remarks:

- unless you have a solid reason to use R 3.1.3, you better update your R
version and your packages. This way you're sure you're not running into
some bug that's resolved in later versions.

- there is absolutely no need to require() datasets, utils, grDevices,
graphics and stats. These packages are automatically loaded by R at startup.

Cheers
Joris
Post by Jason
When I compile and run the RInside examples rinside_sample0.cpp on Windows
Error: cons memory exhausted (limit reached?)
Execution halted
#############################################
require("datasets", quietly = TRUE)
require("utils", quietly = TRUE)
require("grDevices", quietly = TRUE)
require("graphics", quietly = TRUE)
require("stats", quietly = TRUE)
require("data.table", quietly = TRUE)
require("stringr", quietly = TRUE)
require("Rcpp", quietly = TRUE)
require("RCurl", quietly = TRUE)
#############################################
After removed these code( all lines or some lines), the error disappear,
and it return the correct result --- the string "Hello, world!"
Who can tell me how to solve this problem ?
Kind regards,
Jason
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Mathematical Modelling, Statistics and Bio-Informatics

tel : +32 (0)9 264 61 79
***@Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
Jason
2017-05-08 14:06:29 UTC
Permalink
Hello, Joris,

Thank you for the quick response. However, after updated to R 3.4.0 and
RTools34, and deleted datasets, utils, grDevices, graphics and stats from
the require package list, the issue still there.

The new require package list is:
#############################################
require("data.table", quietly = TRUE)
require("stringr", quietly = TRUE)
require("Rcpp", quietly = TRUE)
require("RCurl", quietly = TRUE)
#############################################

Kind regards,
Jason
Post by Joris Meys
- unless you have a solid reason to use R 3.1.3, you better update your R
version and your packages. This way you're sure you're not running into
some bug that's resolved in later versions.
- there is absolutely no need to require() datasets, utils, grDevices,
graphics and stats. These packages are automatically loaded by R at startup.
Cheers
Joris
Post by Jason
When I compile and run the RInside examples rinside_sample0.cpp on
Error: cons memory exhausted (limit reached?)
Execution halted
#############################################
require("datasets", quietly = TRUE)
require("utils", quietly = TRUE)
require("grDevices", quietly = TRUE)
require("graphics", quietly = TRUE)
require("stats", quietly = TRUE)
require("data.table", quietly = TRUE)
require("stringr", quietly = TRUE)
require("Rcpp", quietly = TRUE)
require("RCurl", quietly = TRUE)
#############################################
After removed these code( all lines or some lines), the error disappear,
and it return the correct result --- the string "Hello, world!"
Who can tell me how to solve this problem ?
Kind regards,
Jason
_______________________________________________
Rcpp-devel mailing list
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Joris Meys
Statistical consultant
Ghent University
Faculty of Bioscience Engineering
Department of Mathematical Modelling, Statistics and Bio-Informatics
tel : +32 (0)9 264 61 79 <+32%209%20264%2061%2079>
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
Dirk Eddelbuettel
2017-05-08 14:19:32 UTC
Permalink
On 8 May 2017 at 22:06, Jason wrote:
| Hello, Joris,
|
| Thank you for the quick response. However, after updated  to R 3.4.0 and
| RTools34, and deleted datasets, utils, grDevices, graphics and stats  from the
| require  package list, the issue still there.
|
| The new  require  package list is:
| #############################################
| require("data.table", quietly = TRUE)
| require("stringr", quietly = TRUE)
| require("Rcpp", quietly = TRUE)

That is an obvious user error. Rcpp is _of course_ already there.

Try again without it.

Dirk

| require("RCurl", quietly = TRUE)
| #############################################
|
| Kind regards,
| Jason
|
|
| 2017-05-08 17:35 GMT+08:00 Joris Meys <***@gmail.com>:
|
| I'm not certain as to what causes this, but two remarks:
|
| - unless you have a solid reason to use R 3.1.3, you better update your R
| version and your packages. This way you're sure you're not running into
| some bug that's resolved in later versions.
|
| - there is absolutely no need to require() datasets, utils, grDevices,
| graphics and stats. These packages are automatically loaded by R at
| startup.
|
| Cheers
| Joris
|
| On Mon, May 8, 2017 at 11:30 AM, Jason <***@gmail.com> wrote:
|
| When I compile and run the RInside examples rinside_sample0.cpp on
| Windows 10, I get the error :
|
| Error: cons memory exhausted (limit reached?)
| Execution halted
|
| I use R 3.1.3, and I put the  follow code in  the Rprofile.site file:
|
| #############################################
| require("datasets", quietly = TRUE)
| require("utils", quietly = TRUE)
| require("grDevices", quietly = TRUE)
| require("graphics", quietly = TRUE)
| require("stats", quietly = TRUE)
| require("data.table", quietly = TRUE)
| require("stringr", quietly = TRUE)
| require("Rcpp", quietly = TRUE)
| require("RCurl", quietly = TRUE)
| #############################################
|
| After removed these code( all lines or some lines), the
| error disappear,  and it return the correct result --- the
| string "Hello, world!"
|
| Who can tell me how to solve this problem ?
|
| Kind regards,
| Jason
|
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-***@lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
|
|
|
|
| --
| Joris Meys
| Statistical consultant
|
| Ghent University
| Faculty of Bioscience Engineering
| Department of Mathematical Modelling, Statistics and Bio-Informatics
|
| tel :  +32 (0)9 264 61 79
| ***@Ugent.be
| -------------------------------
| Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
|
|
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-***@lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Jason
2017-05-08 15:16:30 UTC
Permalink
Hi Dirk,

Same error after removed the Rcpp package.

It seems that if require() more packages, or source() hundreds of user
defined functions when R startup, the issue will occure.

Thanks,
Jason
Post by Dirk Eddelbuettel
| Hello, Joris,
|
| Thank you for the quick response. However, after updated to R 3.4.0 and
| RTools34, and deleted datasets, utils, grDevices, graphics and stats
from the
| require package list, the issue still there.
|
| #############################################
| require("data.table", quietly = TRUE)
| require("stringr", quietly = TRUE)
| require("Rcpp", quietly = TRUE)
That is an obvious user error. Rcpp is _of course_ already there.
Try again without it.
Dirk
| require("RCurl", quietly = TRUE)
| #############################################
|
| Kind regards,
| Jason
|
|
|
|
| - unless you have a solid reason to use R 3.1.3, you better update your R
| version and your packages. This way you're sure you're not running into
| some bug that's resolved in later versions.
|
| - there is absolutely no need to require() datasets, utils, grDevices,
| graphics and stats. These packages are automatically loaded by R at
| startup.
|
| Cheers
| Joris
|
|
| When I compile and run the RInside examples rinside_sample0.cpp
on
|
| Error: cons memory exhausted (limit reached?)
| Execution halted
|
| I use R 3.1.3, and I put the follow code in the Rprofile.site
|
| #############################################
| require("datasets", quietly = TRUE)
| require("utils", quietly = TRUE)
| require("grDevices", quietly = TRUE)
| require("graphics", quietly = TRUE)
| require("stats", quietly = TRUE)
| require("data.table", quietly = TRUE)
| require("stringr", quietly = TRUE)
| require("Rcpp", quietly = TRUE)
| require("RCurl", quietly = TRUE)
| #############################################
|
| After removed these code( all lines or some lines), the
| error disappear, and it return the correct result --- the
| string "Hello, world!"
|
| Who can tell me how to solve this problem ?
|
| Kind regards,
| Jason
|
| _______________________________________________
| Rcpp-devel mailing list
| https://lists.r-forge.r-project.org/cgi-bin/mailman/
listinfo/rcpp-devel
|
|
|
|
| --
| Joris Meys
| Statistical consultant
|
| Ghent University
| Faculty of Bioscience Engineering
| Department of Mathematical Modelling, Statistics and Bio-Informatics
|
| tel : +32 (0)9 264 61 79
| -------------------------------
| Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
|
|
| _______________________________________________
| Rcpp-devel mailing list
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Dirk Eddelbuettel
2017-05-08 17:15:06 UTC
Permalink
Well RInside "just" embeds R itself, so I fear you will have to debug this
with R.

I also had no problem adding a few forced library() call to my ~/.Rprofile on
Linux. You may just be running into a Windows quirk. Had to tell from what
you supplied.

Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | ***@debian.org
Jason
2017-05-09 07:11:09 UTC
Permalink
Hi Dirk,

I try it with R.Net , it is OK. So I think I can reach my goal by c# for
the moment.

Thank you very much!

Jason
Post by Dirk Eddelbuettel
Well RInside "just" embeds R itself, so I fear you will have to debug this
with R.
I also had no problem adding a few forced library() call to my ~/.Rprofile on
Linux. You may just be running into a Windows quirk. Had to tell from what
you supplied.
Dirk
--
Loading...