Displaying 8 results from an estimated 8 matches for "runfinalizers".
2019 Jun 08
2
Determining the exit code of an "almost finished" R script
On Sat, Jun 8, 2019 at 2:13 PM Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>
> On 08/06/2019 7:42 a.m., Gergely Dar?czi wrote:
> > Dear All,
> >
> > I'm using "reg.finalizer" in a function that is to be called in R scripts
> > to do some cleanup on success. I have not found a way to run the function
> > only if the script run without
2019 Jun 08
0
Determining the exit code of an "almost finished" R script
...l.
It is nice to have all code for some purpose in one place, so if you
really want that, you could put together your own explicitly called
finalizer, something like this:
finalizers <- list()
addFinalizer <- function(fn) {
finalizers <<- c(finalizers, list(fn))
}
runFinalizers <- function() {
for (i in rev(seq_along(finalizers))) { # Run in reverse order
finalizers[[i]]() # Call the finalizer
finalizers[[i]] <- NULL # Allow related objects to be released
}
}
In the place you now call reg.finalizer(), you call addFinalizer()
inste...
2018 Aug 06
2
SIGSEGV in R_RunWeakRefFinalizer, object allocated with Rcpp
...uot;.(so|dll)$", recursive=TRUE, full.names=TRUE))
gc() # segfault in R_RunWeakRefFinalizer
message("This is not printed")
```
This is the backtrace I get with R 3.5.1:
#0 0x61ec4fd0 in ?? ()
#1 0x6ca1cafc in R_RunWeakRefFinalizer (w=0xc786a98) at memory.c:1393
#2 0x6ca1cdba in RunFinalizers () at memory.c:1459
#3 0x6ca1d024 in R_RunPendingFinalizers () at memory.c:1495
#4 R_gc () at memory.c:2893
#5 do_gc (call=0x1d45b88, op=0x15241d0, args=0x1d454b8,
rho=0x1d45318) at memory.c:2013
#6 0x6c9db60f in bcEval (body=body at entry=0x1d45a88,
rho=rho at entry=0x1d45318, useCache=useCach...
2013 Jun 11
3
load/unload segfault puzzle
Dear r-devel readers,
I have a pretty deep problem with package loading and unloading in
the development version of the lme4 package
<https://github.com/lme4/lme4>; it's not boiled down to a properly
minimal example yet (this has been difficult), but I am posting anyway
in the hopes that someone has ideas about how to proceed farther,
since I'm nearly stumped. Apologies in advance
2018 Aug 09
0
SIGSEGV in R_RunWeakRefFinalizer, object allocated with Rcpp
...s=TRUE))
> gc() # segfault in R_RunWeakRefFinalizer
>
> message("This is not printed")
> ```
>
> This is the backtrace I get with R 3.5.1:
>
> #0 0x61ec4fd0 in ?? ()
> #1 0x6ca1cafc in R_RunWeakRefFinalizer (w=0xc786a98) at memory.c:1393
> #2 0x6ca1cdba in RunFinalizers () at memory.c:1459
> #3 0x6ca1d024 in R_RunPendingFinalizers () at memory.c:1495
> #4 R_gc () at memory.c:2893
> #5 do_gc (call=0x1d45b88, op=0x15241d0, args=0x1d454b8,
> rho=0x1d45318) at memory.c:2013
> #6 0x6c9db60f in bcEval (body=body at entry=0x1d45a88,
> rho=rho at ent...
2008 Jul 14
0
RODBC Seg Fault
...ory.c
(gdb) bt
#0 0x08059036 in R_ClearExternalPtr (s=0x0) at memory.c:2445
#1 0x006b17cb in inRODBCClose (thisHandle=0x8c1f358) at RODBC.c:1250
#2 0x006b190d in chanFinalizer (ptr=0x9100380) at RODBC.c:1271
#3 0x0805b6eb in R_RunWeakRefFinalizer (w=0x90da4f8) at memory.c:1062
#4 0x0805b810 in RunFinalizers () at memory.c:1107
#5 0x0805cf17 in R_gc_internal (size_needed=1) at memory.c:2205
#6 0x0805da69 in Rf_allocVector (type=16, length=1) at memory.c:1968
#7 0x006b3955 in RODBCDriverConnect (connection=0x90b0208, id=0x90b0288,
useNRows=0x90b02c8) at RODBC.c:277
#8 0x08161a19 in do_dotcall (cal...
2009 Jun 26
0
R 2.9.1 is released
...2.9.0 whilst checking their names, so could fail by evaluating
them in the wrong place. (PR#13733)
o The print() method for arima() failed if all coefs were fixed.
o R CMD INSTALL --no-latex was not implemented in 2.9.0 (only).
o Added a needed PROTECT call in RunFinalizers to handle cases where
the routine is called recursively from a GC in a finalizer.
o Constructing error messages about unused arguments in calls to
closures no longer evaluates the arguments.
o qr(x, LAPACK=TRUE) did not coerce integer x to numeric.
o qr.coef() m...
2009 Jun 26
0
R 2.9.1 is released
...2.9.0 whilst checking their names, so could fail by evaluating
them in the wrong place. (PR#13733)
o The print() method for arima() failed if all coefs were fixed.
o R CMD INSTALL --no-latex was not implemented in 2.9.0 (only).
o Added a needed PROTECT call in RunFinalizers to handle cases where
the routine is called recursively from a GC in a finalizer.
o Constructing error messages about unused arguments in calls to
closures no longer evaluates the arguments.
o qr(x, LAPACK=TRUE) did not coerce integer x to numeric.
o qr.coef() m...