Closed woropajj closed 2 years ago
I have the exact same thing, but my error messages vary a lot. The most annoying thing is that I cannot reproduce it. I get errors in multiple projects by running devtools::load_all()
, and it seems most likely that they are caused by a recent update of devtools
.
Sometimes I get these:
Error: .onLoad failed in loadNamespace() for 'devtools', details:
call: options()
error: Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'NULL'
Sometimes these (always 3 same lines):
*** recursive gc invocation
*** recursive gc invocation
*** recursive gc invocation
Sometimes these:
Error in .getClassesFromCache(Class) :
class should be either a character-string name or a class definition
Or these:
Error in is(f, "groupGenericFunction") : object 'class2Def' not found
And sometimes the errors raised in above post. It started roughly 4-5 weeks ago.
Restarting the R sessions works, re-running devtools::load_all()
works (sometimes by calling it 5-10 times, then it suddenly works), as does installing and running the package of the project I'm working in.
I'm on devtools 2.4.3 on macOS 12.12.1, R 4.1.2 and RStudio 2021.09.1 (build 372).
I also get *** recursive gc invocation
but I thought it was unrelated to devtools.
I first thought that too, but I only get it when running devtools::load_all()
, so...
There was a period of time where there was an RStudio bug that presented like this. devtools (or pkgload) was not the root cause, but it was very likely to be the closest bystander that tickled the bug, so it certainly felt like devtools was the problem.
https://github.com/rstudio/rstudio/issues/10040
I recommend updating RStudio and seeing if the problem goes away. I know it did for me. This is the current version of RStudio and it's what I'm on: 2022.02.0+443 Prairie Trillium (desktop)
.
Ah, many thanks! I'll try it out immediately. Didn't think of RStudio being the culprit, though I now question myself whether problems didn't start after I updated last time 🤔
Oh well, sometimes these things happen!
If I want to execute more than one line of code and some of them contain
devtools::load_all
, sometimes I will get errors such as:Error: Invalid mset
Error in loadedNamespaces() : bad hash table contents
I will also get errors like:
What is happening? How can I solve this? What triggers these errors?
I also get nearly constant 'fatal error' after CTRL+SHIFT+F10 (session restart) in RStudio.
Session info below.