rdotnet/rClr

clrShutdown() crashes

screig opened this issue · 4 comments

Restarting R session...

library(rClr)
Loading the dynamic library for Microsoft .NET runtime...
Loaded Common Language Runtime version 4.0.30319.42000

clrShutdown()
Error in .C("rclr_shutdown_clr", PACKAGE = nativePkgName) :
"rclr_shutdown_clr" not available for .C() for package "rClrMs"

jmp75 commented

clrShutdown is deprecated. It may have appeared marginally useful when I first wrote it, but since the embedded .NET CLR cannot be closed and reloaded in the same process twice, it is a bit moot. Also there would be no way to reliable check that therre are no dandling pointers from R into the CLR world.

Will you be doing further releases? I could commit some changes that remove it from the documentation.

Thanks
Sean

I am just starting to use rClr, so there may be work-arounds or no easy option for this. But without some form of shutdown or unload if I try to modify a dll library I have loaded with rClr, I am no longer able to modify and compile the dll due to locking. This makes concurrent development of the R and .Net code very difficult.

Agree with @the-tourist-. I have had to resort to terminating R completely and restarting as I could not find an inverse of clrLoadAssembly and all attempts to unload the package still have the dll locked.