search for: r_toplevelcontext

Displaying 6 results from an estimated 6 matches for "r_toplevelcontext".

2000 Nov 07
0
error handling
...ler: GNU GCC - 2.95.2 (CRTDLL) I have a C function for evaluating commands using eval(SEXP,SEXP) which is included in a personal make of R.dll. (Similiar to R_Proxy_evaluate() in rproxy_impl.c) Using SETJMP to catch errors works but there is a problem. For example, the following code: if (SETJMP(R_ToplevelContext->cjmpbuf)) // R_ToplevelContext->cjmpbuf R_GlobalContext->cjmpbuf return FALSE; R_CurrentExpr = eval(R_CurrentExpr , rho); will appear to work the first time there is an error, but the second error causes an infinite loop. I have identified the location where the loop occurs. It is in t...
2007 Jul 04
2
problem with findFun call from embedded R
.... Setting a breakpoint at erros.c:719, the backtrace looks like this (will wrap poorly): 8<------------------------ Breakpoint 2, jump_to_top_ex (traceback=TRUE, tryUserHandler=TRUE, processWarnings=TRUE, resetConsole=TRUE, ignoreRestartContexts=FALSE) at errors.c:719 719 LONGJMP(R_ToplevelContext->cjmpbuf, 0); (gdb) bt #0 jump_to_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...
2006 May 25
1
compiling tests/Embedding
...plevelExec' collect2: ld returned 1 exit status make: *** [Rtest] Error 1 ost at hawk0:/data5/ost/R/R-2.3.0/tests/Embedding> cd /autofs/tewa_data5/ost/R/R-2.3.0/lib ost at hawk0:/autofs/tewa_data5/ost/R/R-2.3.0/lib> nm libR.so | grep R_Top 000000000042c920 B R_Toplevel 000000000042cae8 B R_ToplevelContext 000000000007a7b0 t R_ToplevelExec ost at hawk0:/autofs/tewa_data5/ost/R/R-2.3.0/lib> gcc --version gcc (GCC) 3.3.4 (pre 3.3.5 20040809) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABIL...
2015 Aug 21
0
Problems with embedded R, ReplDLL
...ndows, I've also been testing it in the context of embedded R, and in the process have found some problems with the examples given of embedded R use. One problem can be seen in R_ReplDLLinit, in src/main/main.c: void R_ReplDLLinit(void) { SETJMP(R_Toplevel.cjmpbuf); R_GlobalContext = R_ToplevelContext = R_SessionContext = &R_Toplevel; R_IoBufferWriteReset(&R_ConsoleIob); prompt_type = 1; DLLbuf[0] = DLLbuf[CONSOLE_BUFFER_SIZE] = '\0'; DLLbufp = DLLbuf; } The call of SETJMP makes no sense. Nothing that follows in this function can possibly cause a long jump. Th...
2009 Apr 14
0
top level condition handlers
...; but it does not work, probably because the handler stack is reset somewhere. Would it work if I poke into the RTopLevel.handlerstack instead of the R_HandlerStack as .addCondHands is doing ? R_Toplevel.handlerstack = R_HandlerStack; R_Toplevel.restartstack = R_RestartStack; R_GlobalContext = R_ToplevelContext = &R_Toplevel; Romain -- Romain Francois Independent R Consultant +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr
1999 Sep 07
1
sys.on.exit appears non-functional (PR#269)
As far as I can see sys.on.exit() does not work. The following will give a non-null result in S, and seems about the simplest possible usage. test <- function() { on.exit(print(1)) ex <- sys.on.exit() str(ex) cat("exiting...\n") } > test() NULL exiting... [1] 1 Looking at the code suggests that on.exit is installing the code in a different context from the one