I forgot to mention, this testing was done using R 4.1.1, Rcpp 1.0.7, and RInside 0.2.16, using MacOS version 10.15.7 (Catalina), and Apple clang version 12.0.0.
On Fri, Oct 1, 2021 at 9:50 PM Dominick Samperi <djsamp...@gmail.com> wrote: > Hello Dirk, > > I have what appears to be a reproducible example of the > "Rcpp_precious_remove" > problem that a few people have complained about. It is reproducible on my > Mac Mini, but may not appears when you try because it is OS and compiler > dependent. There is no problem under Windows, for example. There > seems to be a gc bug lurking. > > The test C++ source file (a simple REPL loop), makefile, and > lldb (debugger) backtrace are attached to this message. > When I compile and run on my Mac is fails with a seg fault every time. > > I have been able to trigger this problem > under Ubuntu in a more complicated project using CMake. It > fails every time. Furthermore, gdb shows that the failure happens on > line 261 of RInside.cpp (where global_env_m = new Rcpp::Environment()). > > The comment immediately above this failure point says > there is exposure to "a minimal risk of garbage collection" (based on > feedback from Doug Bates and Luke Tierney). Perhaps the risk is greater > than you anticipated? > > BTW, if I build the REPL app and link to a locally built version of > RInside library, and not to the version installed by R, the REPL > app works on my Mac Mini! This is probably due to the fact > that stack/heap corruption can reveal itself in mysterious ways > depending on the precise configuration employed. > > Thanks, > Dominick > > > On Thu, Jul 15, 2021 at 8:13 AM Dirk Eddelbuettel <e...@debian.org> wrote: > >> >> On 15 July 2021 at 08:24, ma wh wrote: >> | 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: >> | >> | Error in C_valid_tz(tzone): Function 'Rcpp_precious_remove' not >> provided by package 'Rcpp' >> | >> | 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: >> https://stackoverflow.com/questions/68345118/exporting-a-ggplot-in-svg-call-a-non-esixting-function >> | The GitHub were also asking about packages I don't use - >> | https://github.com/r-spatial/spdep/issues/60 >> | https://github.com/drizopoulos/JMbayes2/issues/5 >> | >> | Anyone on the list have any pointers? Thanks >> >> Packages following a the GNU style often have a file ChangeLog which >> "details >> changes made to the code". Rcpp follows this convention, see 2021-07-05 >> and >> 2021-01-017. >> >> Packages following the R packaging conventions often have a file >> inst/NEWS.rd >> (also rendered as NEWS at CRAN). Rcpp follow this conventions, see the >> Rcpp >> 1.0.7 release (even if the functions is not named). >> >> Packages have source code you can search.I like `ag` aka "the >> silversearcher": >> >> edd@rob:~/git/rcpp(master)$ ag -c Rcpp_precious_remove >> ChangeLog:2 >> inst/include/Rcpp/routines.h:3 >> inst/include/RcppCommon.h:2 >> src/rcpp_init.cpp:1 >> src/barrier.cpp:1 >> edd@rob:~/git/rcpp(master)$ >> >> It is still there, and available via the standard export mechanism. >> >> I recommend your friend take a look. The function is a) still there yet >> has >> also b) been supplanted by a more sufficient alternative. >> >> Otherwise, a reproducible example would be the only way to make this >> concrete. >> >> Hope this helps, Dirk >> >> -- >> https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org >> _______________________________________________ >> Rcpp-devel mailing list >> Rcpp-devel@lists.r-forge.r-project.org >> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel > >
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel