similar to: Should R Packages Unload Dynamic Libraries When They Unload?

Displaying 20 results from an estimated 7000 matches similar to: "Should R Packages Unload Dynamic Libraries When They Unload?"

2010 Sep 16
1
Possible bug or annoyance with library.dynam.unload()
Hello, I have a package with a namespace. Because I use Roxygen that overwrites the NAMESPACE file each time it is run, I use a R/zzz.R file with an .onLoad() and .onUnload() functions to take care of loading and unloading my shared library. The problem: if I load my library from a local directory, then the unloading of the package fails, e.g: # loads fine >library(Foo,
2006 Feb 08
2
Using .onUnload() to unload compiled code
If one wants to unload compiled code for a package containing a namespace, my understanding is that .onUnload() should be used, with a call to library.dynam.unload(). This is used in e.g., the stats and methods packages, but it appears to me that the compiled code is not being unloaded when the package is detached(). Am I misunderstanding something? Best, Jim > search() [1]
2012 Jul 24
1
Using .onUnload to unload DLLs
I've noticed that many of the "base" R packages have an .onUnload() function which automatically unloads compiled shared libraries with library.dynam.unload(). For example: > stats:::.onUnload function (libpath) library.dynam.unload("stats", libpath) <bytecode: 0x1033b9c30> <environment: namespace:stats> I've noticed that many other packages don't
2016 Mar 25
1
library.dynam.unload
The survival package has a firstlib.R file that I had forgotton and just reviewed. After deleting several bits which had a use 10 years ago during my Splus to R transition, the only thing remaining is .onUnload <- function(libpath) library.dynam.unload("survival", libpath) Does this bit of code still serve a purpose? Can I toss it? Terry T.
2010 Nov 12
1
unloading compiled code.
I have a package that I'm developing that I need to unload the library. Long story short I figured out that the leaving the compiled code loaded lead to a segmentation fault, but unloading the code will fix it. I've read the documentation and it appears that there are several ways to do this? What is the popper accepted current standard for unloading compiled code? The options as I
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
2009 Aug 13
1
segfault when unloading a shared library
Hi All, I'm still actively researching this problem (reading R-ext manual), but I hoped that I might be able to get some additional insight from the list given that I'm fairly new at writing R extension code. Problem: I have some fairly simple code (.Call interface) that makes a call to another shared library, which, in turn, calls routines in an HDF5 shared library. The good news
2007 Nov 28
0
7 commits - configure.ac libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite_movie.c test/trace
configure.ac | 7 ++- libswfdec/swfdec_movie.c | 57 ++++++++++----------------- libswfdec/swfdec_movie.h | 3 - libswfdec/swfdec_sprite_movie.c | 4 - test/trace/Makefile.am | 18 ++++++++ test/trace/remove-child-onUnload-5.swf |binary
2007 Nov 28
0
59 commits - libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_button.c libswfdec/swfdec_button.h libswfdec/swfdec_button_movie.c libswfdec/swfdec_button_movie.h libswfdec/swfdec_event.c
libswfdec-gtk/swfdec_gtk_widget.c | 19 libswfdec/swfdec_as_object.c | 56 +- libswfdec/swfdec_as_object.h | 4 libswfdec/swfdec_button.c | 228 +++++++++ libswfdec/swfdec_button.h | 10 libswfdec/swfdec_button_movie.c | 382
2009 Feb 19
1
How to unload a dll loaded via library.dynam()?
Hello. To save the hassle of quitting and restarting R every time I rebuild the package I'm working on (for the purposes of this question called "roots") I would like to write a script cleanly remove the package from my R session and then load it again. Of course detach("package:roots") works for the native R objects in the package. However, the compiled C library remains
2009 Feb 19
1
How to unload a dll loaded via library.dynam()?
Hello. To save the hassle of quitting and restarting R every time I rebuild the package I'm working on (for the purposes of this question called "roots") I would like to write a script cleanly remove the package from my R session and then load it again. Of course detach("package:roots") works for the native R objects in the package. However, the compiled C library remains
2019 Jan 24
0
Possible setClassUnion Unloading Issue
I'm encountering a problem caused by class unions from unloaded packages that are referenced by the still-loaded subclasses. In essence, when the class union is loaded initially, it registers itself as a super class of the component classes in the S4 cache. When the package the class union lives in is unloaded, it does not undo that registration. Here is an MRE of the problems it causes:
2009 Mar 31
4
what is the preferred method to create a package local variable?
for the moment, I'm using: .onAttach <- function(libname, pkgname) { .bbg.db.conn <<- dbConnect(dbDriver("PostgreSQL"), user="blah","blah") } .onUnload <- function(libpath) { dbDisconnect(.bbg.db.conn) } which results in a hidden global variable in the global environment. I would prefer to make the assignment only in the package namespace.
2012 Jul 24
1
Finding dynamic shared libraries loaded with a package
Is there a way to query a package to see what dynamic shared libraries are loaded with it? The reason I ask is because during development, I want to unload libraries so that they can be reloaded without restarting R. I want to make it automatic so that you can just pass in the name of the package, and it will unload all the relevant shared libraries. Typically, the name of the shared library is
2013 Feb 02
1
best practice for packages using mclapply to avoid tcltk
Dear R-devel friends: I'm back to bother you again about the conflict between mclapply and tcltk. I've been monitoring several packages that want to use mclapply to parallelize computations and need to figure out what should be done. It appears tcltk cannot be safely unloaded, so the best we can do is check for the presence of tcltk and stop if it is found before mclapply() is used. I
2011 Oct 05
2
"unload" a library while testing?
Hi I am testing a package, and after I make changes, I have to close R and open R again to load the new version (same version number) of the package I am working on. So my question: is there a function which removes a package, i.e library(myPackage) > Package is loaded unlibrary(myPackage) > package is not loaded any more Thanks, Rainer -- Rainer M. Krug, PhD (Conservation Ecology,
2007 Dec 18
2
Changes to 'refs/tags/0.5.5'
Tag '0.5.5' created by Benjamin Otte <otte at gnome.org> at 2007-12-17 20:20 -0800 release 0.5.5 ("cps") -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBHZtodvMv5VCdLq8QRAvTmAKDtEvlvtLBIj5nu8GE6ECGjh8lCGQCgyiAN Dkfb85qxYlfTKKJC6qYH/sU= =VWgB -----END PGP SIGNATURE----- Changes since 0.5.4: Andreas Henriksson (1): make
2005 Oct 11
1
Error: .First.lib failed for 'SBMLodeSolveR'
Dear R-developers, I am getting the following error message (see bottom of e-mail) and can't make a clue out of it. The zzz.R file contains .First.lib <- function(lib, pkg) library.dynam("SBMLodeSolveR",pkg,lib) .Last.lib <- function(libpath) library.dynam.unload("SBMLodeSolveR", libpath) There is a SBMLodeSolveR.so file in the src directory which works if loaded
2007 Mar 11
0
Dyn.load and Unload problems
Hi, I am trying to modify the devX11.c source in the directory R-2.4.1/ src/modules/X11. Under OS X 10.4.9 running the R gui (R version 2.4.1) on a Powerbook, i type this and get the subsequent error. > dyn.unload("/Library/Frameworks/R.framework/Resources/modules/ppc/ R_X11.so") Error in dyn.unload(x) : dynamic/shared library '/Library/Frameworks/
2018 Jul 17
0
[PATCH 0/2] drm/nouveau: Fix panic on nouveau unload.
does this also happen with the newest kernel? I was kind of under the impression we already fixed such issues. On Thu, Jul 5, 2018 at 9:09 PM, Jeffery Miller <jmiller at neverware.com> wrote: > If have a couple patches I found while looking at a panic > I was seeing while unloading the nouveau module. > > Unloading the nouveau module on my optimus notebook machine causes >