Skip to content

Debugger cannot handle calls to R made using RCall #342

Open
@PGS62

Description

@PGS62

Debugger fails when attempting to debug calls to RCall.reval as described in this post I made today on Julia Discourse. It was suggested that I raise it as an issue here.

Here is the example posted:

using RCall
function test()
    reval("1+1")
end

julia> test()
RObject{RealSxp}
[1] 2


julia> @enter test()
In test() at d:\Philip\Source\script\Julia\JSource\xccyHWhooks.jl:373
 372  function test()
>373      reval("1+1")
 374  end

About to run: (RCall.reval)("1+1")
1|debug> n
ERROR: MethodError: no method matching iterate(::Type{Ptr{RCall.SxpHead}})
Closest candidates are:
  iterate(::Core.SimpleVector) at essentials.jl:568
  iterate(::Core.SimpleVector, ::Any) at essentials.jl:568
  iterate(::ExponentialBackOff) at error.jl:199
  ...
Stacktrace:
 [1] safe_parseVector(::Ptr{StrSxp}, ::Base.RefValue{Int32}, ::Ptr{NilSxp}) at C:\Users\Philip\.julia\packages\RCall\g7dhB\src\eval.jl:6
 [2] rparse_p(::Ptr{StrSxp}, ::Ptr{NilSxp}) at C:\Users\Philip\.julia\packages\RCall\g7dhB\src\eval.jl:49
 [3] rparse_p(::String, ::Ptr{NilSxp}) at C:\Users\Philip\.julia\packages\RCall\g7dhB\src\eval.jl:70
 [4] rparse_p(::String) at C:\Users\Philip\.julia\packages\RCall\g7dhB\src\eval.jl:70
 [5] reval(::String, ::RObject{EnvSxp}) at C:\Users\Philip\.julia\packages\RCall\g7dhB\src\eval.jl:132
 [6] reval(::String) at C:\Users\Philip\.julia\packages\RCall\g7dhB\src\eval.jl:132
 [7] test() at d:\Philip\Source\script\Julia\JSource\xccyHWhooks.jl:373

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions