<div dir="ltr"><div dir="ltr"><div dir="ltr">Hello Dirk,<div><br></div><div>I have what appears to be a reproducible example of the "Rcpp_precious_remove"</div><div>problem that a few people have complained about. It is reproducible on my</div><div>Mac Mini, but may not appears when you try because it is OS and compiler</div><div>dependent. There is no problem under Windows, for example. There</div><div>seems to be a gc bug lurking. </div><div><br></div><div>The test C++ source file (a simple REPL loop), makefile, and </div><div>lldb (debugger) backtrace are attached to this message.</div><div>When I compile and run on my Mac is fails with a seg fault every time.</div><div><br></div><div>I have been able to trigger this problem</div><div>under Ubuntu in a more complicated project using CMake. It</div><div>fails every time. Furthermore, gdb shows that the failure happens on</div><div>line 261 of RInside.cpp (where global_env_m = new Rcpp::Environment()).</div><div><br></div><div><div>The comment immediately above this failure point says </div><div>there is exposure to "a minimal risk of garbage collection" (based on</div><div>feedback from Doug Bates and Luke Tierney). Perhaps the risk is greater</div><div>than you anticipated?</div></div><div><br></div><div>BTW, if I build the REPL app and link to a locally built version of</div><div>RInside library, and not to the version installed by R, the REPL</div><div>app works on my Mac Mini! This is probably due to the fact</div><div>that stack/heap corruption can reveal itself in mysterious ways</div><div>depending on the precise configuration employed.</div><div><br></div><div>Thanks,</div><div>Dominick</div><div><br></div></div></div></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>