search for: rf_error

Displaying 20 results from an estimated 54 matches for "rf_error".

Did you mean: pf_error
2015 Nov 24
0
Custom C finalizers for .Call
On Tue, Nov 24, 2015 at 12:10:12AM +0100, Jeroen Ooms wrote: > Currently it is all to easy for package authors to introduce a memory > leak or stack imbalance by calling Rf_error() or > R_CheckUserInterrupt() in a way that skips over the usual cleanup > steps. I have a more modest request: Please improve the documentation of exactly what Rf_error() does and how it should be used! E.g., does calling it terminate execution of the C function from which it is called, o...
2015 Nov 23
4
Custom C finalizers for .Call
...eat feature to prevent memory leaks. I was wondering if there is a way to extend this mechanism to allow for automatically running UNPROTECT and custom finalizers at the end of a .Call as well. Currently it is all to easy for package authors to introduce a memory leak or stack imbalance by calling Rf_error() or R_CheckUserInterrupt() in a way that skips over the usual cleanup steps. This holds especially for packages interfacing C libraries (libcurl, libxml2, openssl, etc) which require xx_new() and xx_free() functions to allocate/free various types of objects, handles and contexts. Therefore we cann...
2015 Mar 18
4
Windows gcc toolchain for R 3.2.0
....2.0 build. I will soon be uploading to CRAN a new version of Rtools33 that is very similar to Rtools32, containing gcc 4.6.3. We are continuing to work on the new toolchain, and hope to have it ready before R 3.2.1 is released. The known problems are as follows: - C++ code should not call Rf_error(), as it uses longjmp, and the behaviour of longjmp is undefined in C++ when destructors need to be called. However, a number of packages do call Rf_error, and in gcc 4.6.3, they get away with it. In our candidate 4.9.2 build, they crashed. If we can't work around this, I'll suggest...
2023 Jan 21
2
Object are not destroy while using error (Rf_error)
Dear all, I try to understand why on my computer I do not clear all data with this code: #include <R.h> static int count = 0; class A { public: A(){ printf("c %d\n", count); count++; } ~A(){count--; printf("d %d\n", count); } }; extern "C" { void testAL(){ A a; { A b; } error("does not write [d 0]"); } }
2008 Jul 28
2
Rf_error crashes entire program.
I'm having a problem with the error and warning functions. I've tried this on multiple machine so I'm fairly sure it's not machine dependent and I've tried it on the latest versions 2.6.0-2.7.1. Whenever my program gets to an error or warning it crashes the entire program rather than throwing the error like it should. Here are the relevant bits. ... char const * const
2006 Feb 16
3
Rf_errorcall - translate to Pascal
Hello! I (try to) convert the external R header files to Pascal (Delphi). At one place I stumbled over a macro that uses a method that is not declared in a LGPL header file: In Rinternals.h: #define error_return(msg) { Rf_error(msg); return R_NilValue; } #define errorcall_return(cl,msg){ Rf_errorcall(cl, msg); return R_NilValue; } ~~~~~~~~ In Error.h: void Rf_error(const char *, ...); [Rf_errorcall is not declared here, would be something like: void Rf_erro...
2015 Mar 18
0
Windows gcc toolchain for R 3.2.0
....2.0 build. I will soon be uploading to CRAN a new version of Rtools33 that is very similar to Rtools32, containing gcc 4.6.3. We are continuing to work on the new toolchain, and hope to have it ready before R 3.2.1 is released. The known problems are as follows: - C++ code should not call Rf_error(), as it uses longjmp, and the behaviour of longjmp is undefined in C++ when destructors need to be called. However, a number of packages do call Rf_error, and in gcc 4.6.3, they get away with it. In our candidate 4.9.2 build, they crashed. If we can't work around this, I'll suggest...
2015 Mar 18
0
[Rcpp-devel] Windows gcc toolchain for R 3.2.0
...t is very similar to Rtools32, containing gcc 4.6.3. > > We are continuing to work on the new toolchain, and hope to have it > ready before R 3.2.1 is released. Thanks very much for your work on this. > > The known problems are as follows: > > - C++ code should not call Rf_error(), as it uses longjmp, and the > behaviour of longjmp is undefined in C++ when destructors need to be > called. However, a number of packages do call Rf_error, and in gcc > 4.6.3, they get away with it. In our candidate 4.9.2 build, they > crashed. If we can't work around this, I...
2013 Mar 03
1
Missing PROTECT in mkPRIMSXP ?
...enerally results in the error disappearing. R -d valgrind -e "tools::buildVignettes(dir="DirichletMultinomial")" does not reveal anything. The error does not occur with gctorture(TRUE); tools::buildVignettes(dir="DirichletMultinomial"). By setting a breakpoint at Rf_error and creating a back-trace (gdb) bt #0 Rf_error ( format=0x7ffff7a7cef8 "invalid primitive operation given for dispatch") at /home/biocbuild/src/R-3.0.r62077/src/main/errors.c:741 #1 0x00007ffff793a7ed in R_possible_dispatch (call=0x164d5c0, op=0x4d772a0, args=0x53325d0,...
2003 Oct 31
1
R-1.8.0 + IBM VisualAge/C for AIX compiler
...an incorrect file suffix ld: 0711-224 WARNING: Duplicate symbol: p_xargc ld: 0711-224 WARNING: Duplicate symbol: p_xargv ld: 0711-224 WARNING: Duplicate symbol: p_xrcfg ld: 0711-224 WARNING: Duplicate symbol: p_xrc ld: 0711-224 WARNING: Duplicate symbol: end ld: 0711-224 WARNING: Duplicate symbol: .Rf_error ld: 0711-224 WARNING: Duplicate symbol: Rf_error ld: 0711-224 WARNING: Duplicate symbol: .Rf_warning ld: 0711-224 WARNING: Duplicate symbol: Rf_warning ld: 0711-224 WARNING: Duplicate symbol: .Rf_lengthgets ld: 0711-224 WARNING: Duplicate symbol: Rf_lengthgets ld: 0711-224 WARNING: Duplicate symbol...
2008 Apr 16
1
C++ complains abouct Rprintf signature
...s about the first argument to Rprintf being non-const char *. For example when compiling the line Rprintf("hello world\n"); the following warning is emitted: warning: deprecated conversion from string constant to 'char*' Is there a reason for the non-const? It is curious that Rf_error, which is similar to RPrintf, is const. If there is a need to keep it non-const in C please consider using the patch below in future releases. Thanks, Vadim Patch to R-2.6.1/include/R_ext/Print.h #ifdef __cplusplus extern "C" { #define CONST const #endif void Rprintf(CONST char...
2000 Mar 29
5
Porting R
...directory `//local.src/R-1.0.0/src/library/ctest/src' gcc -shared -Xlsharedlibrary -Xlexpall -o ctest.so alnorm.o ansari.o fexact.o kendall.o ks.o prho.o swilk.o -L/usr/lib/gcc-lib/powerpc-apple-machten4/2.8.1 -lg2c -lm ansari.o: In function `errmsg': ansari.c:13: undefined reference to `Rf_error' ansari.o: In function `w_init': ansari.c:21: undefined reference to `R_chk_calloc' ... ansari.c:84: undefined reference to `Rf_choose' ansari.o: In function `pansari': ansari.c:110: undefined reference to `Rf_choose' fexact.o: In function `fexact': ... kendall.c:24: und...
2009 Feb 11
1
Problem with R using pgi compiler on x86_64
...9: undefined reference to `main' CHMfactor.o(.text+0x28): In function `CHMfactor_to_sparse': /tmp/R.INSTALL.TW3399/Matrix/src/CHMfactor.c:5: undefined reference to `R_CheckStack' CHMfactor.o(.text+0xa5):/tmp/R.INSTALL.TW3399/Matrix/src/CHMfactor.c:14: undefined reference to `Rf_error' CHMfactor.o(.text+0xe5):/tmp/R.INSTALL.TW3399/Matrix/src/CHMfactor.c:14: undefined reference to `R_NilValue' Other modules worked and could be compiled without any problems. Any idea ?? -- Bye, Peer _________________________________________________________ Max-Planck-Institut...
2017 Dec 29
1
winbuilder warning message wrt function pointers
...od4(int nrow, int nblock, int *bsize, double *bmat, double *rmat, int nfrail, double *y) { DL_FUNC fun = NULL; if (fun==NULL) { fun = R_GetCCallable("bdsmatrix", "bdsmatrix_prod4"); } if (fun==NULL) { Rf_error("Cannot find C function 'bdsmatrix_prod4' in library 'bdsmatrix.{so,dll}'"); } fun(nrow, nblock, bsize, bmat, rmat, nfrail, y); } Bill Dunlap TIBCO Software wdunlap tibco.com On Fri, Dec 29, 2017 at 8:48 AM, William Dunlap <wdunlap at tibco.com> wrot...
2005 May 13
2
add Rvsnprintf to API ??
...main/errors.c) be added to the R API with prototype in include/R_ext/Print.h say? Here's my problem. I'm trying to write some code that is not totally tied to R. Hence I want R style error messaging to be isolated in a small module. I do not want #include <R.h> and calls to error (Rf_error) in most of my code. Hence I want to write a module with something like ----- begin code snippet ----- #include <stdarg.h> #include <stdio.h> #include <R.h> #define BUFSIZE 1024 void die(const char *format, ...) { char buf[BUFSIZE]; va_list arg; va_start(arg, forma...
2006 Oct 16
2
PR#9295
...unable to load shared library '/geno4/watplatt/R/R-2.4.0/library/tools/libs/tools.so': rtld: 0712-001 Symbol TYPEOF was referenced from module /geno4/watplatt/R/R-2.4.0/library/tools/libs/tools.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol Rf_error was referenced from module /geno4/watplatt/R/R-2.4.0/library/tools/libs/tools.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol Rf_asLogical was referenced from module /geno4/watplatt/R/R-2.4.0/library/tools/libs/tools.so(), but a runtime definiti...
2019 May 31
2
use of buffers in sprintf and snprintf
...t will make it even worse since you'll be declaring a lot more memory that you actually have. The real problem is that you're ignoring the truncation, so you probably want to use something like if (snprintf(tempname, sizeof(tempname), "%s.%d", of1name, j) >= sizeof(tempname)) Rf_error("file name is too long"); BTW: most OSes systems have a path limits that are no lower than 256 so you should allow at least as much. Cheers, Simon > On May 29, 2019, at 11:49 AM, jing hua zhao <jinghuazhao at hotmail.com> wrote: > > Dear R-developers, > > I am...
2007 Jul 04
2
problem with findFun call from embedded R
...top_ex (traceback=TRUE, tryUserHandler=TRUE, processWarnings=TRUE, resetConsole=TRUE, ignoreRestartContexts=FALSE) at errors.c:719 #1 0x00002aaaaab77e5d in verrorcall_dflt (call=0x609d78, format=0x2aaaaace4a4d "%s", ap=0x7fffa13a94c0) at errors.c:516 #2 0x00002aaaaab7814a in Rf_errorcall (call=0x609d78, format=0x2aaaaace4a4d "%s") at errors.c:551 #3 0x00002aaaaab78347 in Rf_error (format=0x2aaaaace42da "could not find function \"%s\"") at errors.c:578 #4 0x00002aaaaab708e5 in Rf_findFun (symbol=0xc64f20, rho=0x649fa0) at envir.c:1244 #5 0x000...
2017 Dec 29
3
winbuilder warning message wrt function pointers
I've recently updated the coxme package, which calls internal routines from the bdsmatrix package.? (It is in fact mentioned as an example of this in the Extensions manual.) The call connections are a blocks like this, one for each of the 9 called C routines. void bdsmatrix_prod4(int nrow,??? int nblock,?? int *bsize, ??????????????????? double *bmat, double *rmat, ??????????????????? int
2014 Feb 26
1
help with gotoExitingHandler(R_NilValue, call, entry); . Implementation of error handling internally
...don?t set to be a calling one, pretend this context is a CTXT_FUNCTION. Eventually I get to jump fun, so that I can later on grab the condition from R_ReturnedValue. This works well in the ? not simple error ? case, i.e. if I call stop( simpleError(...) ), but with simple errors, i.e. calls to Rf_error internally or bare calls to stop( "vvzvz" ) I can?t access the error. And this boils down to this call: gotoExitingHandler(R_NilValue, call, entry); inside vsignalError : static void vsignalError(SEXP call, const char *format, va_list ap) { char localbuf[BUFSIZE]; SEXP list...