<div dir="ltr">Hello Dirk,<br><br>I have what appears to be a reproducible example of the "Rcpp_precious_remove"<br>problem that a few people have complained about. It is reproducible on my<br>Mac Mini, but may not appear when you try because it is OS and compiler<br>dependent. There is no problem under Windows, for example. There<br>seems to be a gc bug lurking. <br><br>The test C++ source file (a simple REPL loop), makefile, and <br>lldb (debugger) backtrace are attached to this message.<br>When I compile and run on my Mac it fails with a seg fault.<br><br>This was tested using R 4.1.1, Rcpp 1.0.7, RInside 0.2.16,<br>MacOS 10.15.7, and Apple clang 12.0.0.<br><br>I have been able to trigger this problem under Ubuntu in <br>a more complicated project using CMake. It fails every time. <br>Furthermore, gdb shows that the failure happens on<br>line 261 of RInside.cpp (where global_env_m = new Rcpp::Environment()).<br><br>The comment immediately above this failure point says <br>there is exposure to "a minimal risk of garbage collection" (based on<br>feedback from Doug Bates and Luke Tierney). Perhaps the risk is greater<br>than you anticipated?<br><br>BTW, if I build the REPL app and link to a locally built version of<br>RInside library, and not to the version installed by R, the REPL<br>app works on my Mac Mini! This is probably due to the fact<br>that stack/heap corruption can reveal itself in mysterious ways<br>depending on the precise configuration employed.<br><br>Thanks,<br>Dominick<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 15, 2021 at 8:13 AM Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On 15 July 2021 at 08:24, ma wh wrote:<br>
| Colleague of mine wrote some R last week that was working OK, and hasn't been changed in itself since that time. This week it's ceased working( I've tried it on my machine and also see a fail, the following error is encountered:<br>
| <br>
| Error in C_valid_tz(tzone): Function 'Rcpp_precious_remove' not provided by package 'Rcpp'<br>
| <br>
| Searching around there aren't many hits. Those I do find seem quite recent (stackoverflow questions or GitHub issues logged in various projects, dates of posting are within the last few days). None of the posted queries seem to have a solution, one person said restarting RStudio helped, but not in my case. The SO question I found was marked as deleted. The GitHub issue I found was "I solved it" but no mention of how. The SO question was asking about svg export: <a href="https://stackoverflow.com/questions/68345118/exporting-a-ggplot-in-svg-call-a-non-esixting-function" rel="noreferrer" target="_blank">https://stackoverflow.com/questions/68345118/exporting-a-ggplot-in-svg-call-a-non-esixting-function</a><br>
| The GitHub were also asking about packages I don't use -<br>
| <a href="https://github.com/r-spatial/spdep/issues/60" rel="noreferrer" target="_blank">https://github.com/r-spatial/spdep/issues/60</a><br>
| <a href="https://github.com/drizopoulos/JMbayes2/issues/5" rel="noreferrer" target="_blank">https://github.com/drizopoulos/JMbayes2/issues/5</a><br>
| <br>
| Anyone on the list have any pointers? Thanks<br>
<br>
Packages following a the GNU style often have a file ChangeLog which "details<br>
changes made to the code". Rcpp follows this convention, see 2021-07-05 and<br>
2021-01-017.<br>
<br>
Packages following the R packaging conventions often have a file inst/NEWS.rd<br>
(also rendered as NEWS at CRAN). Rcpp follow this conventions, see the Rcpp<br>
1.0.7 release (even if the functions is not named).<br>
<br>
Packages have source code you can search.I like `ag` aka "the<br>
silversearcher":<br>
<br>
  edd@rob:~/git/rcpp(master)$ ag -c Rcpp_precious_remove<br>
  ChangeLog:2<br>
  inst/include/Rcpp/routines.h:3<br>
  inst/include/RcppCommon.h:2<br>
  src/rcpp_init.cpp:1<br>
  src/barrier.cpp:1<br>
  edd@rob:~/git/rcpp(master)$ <br>
<br>
It is still there, and available via the standard export mechanism.<br>
<br>
I recommend your friend take a look. The function is a) still there yet has<br>
also b) been supplanted by a more sufficient alternative.<br>
<br>
Otherwise, a reproducible example would be the only way to make this<br>
concrete.<br>
<br>
Hope this helps, Dirk<br>
<br>
-- <br>
<a href="https://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">https://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a><br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></blockquote></div>