After a recent upgrade to R v 4.4.0. I am getting the following error when trying to debug code in Rstudio v. 2023.06.2 ("Mountain Hydrangea") using both debugonce
and debug
:
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Error: INTEGER() can only be applied to a 'integer', not a 'unknown type #29'
In addition: Warning message:
type 29 is unimplemented in 'type2char'
Here is some example code:
> test_function <- function(x,y) {return(x+y)}
> debugonce(test_function)
> test_function(1,2)
debugging in: test_function(1, 2)
debug at #1: {
return(x + y)
}
Error: no more error handlers available (recursive errors?); invoking 'abort' restart
Error: INTEGER() can only be applied to a 'integer', not a 'unknown type #29'
In addition: Warning message:
type 29 is unimplemented in 'type2char'
Browse[1]>
It ends up getting stuck in a browse mode without any of the Rstudio helper buttons appearing and without showing the actual function code, but I can move through it via the n
or Enter
keys.
Any thoughts on what is causing this? Is it just that I need to update Rstudio?
System information:
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 4.0
year 2024
month 04
day 24
svn rev 86474
language R
version.string R version 4.4.0 (2024-04-24)
nickname Puppy Cup
I had the same issue with R Studio getting stuck in Browse mode, printing that Error: INTEGER() can only be applied to a 'integer', not a 'unknown type #29'
endlessly. This occurred even by setting breakpoints, as also mentioned by Arthur in a comment. The only way I could stop the error was to use task manager to close R Studio.
Updating R Studio Desktop to 2024.4.2.764 "Chocolate Cosmos" solved it for me. Very mysterious bug in the debugger...