Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

Attempting to print values causes ERROR: access to invalid slot number #36

Open
staticfloat opened this issue Jan 18, 2019 · 1 comment
Assignees

Comments

@staticfloat
Copy link

Example:

julia> using ASTInterpreter2

julia> function foo(x, y)
       z = x + y
       return z + y
       end
foo (generic function with 1 method)

julia> foo(1,2)
5

julia> @enter foo(1,2)
In foo(x, y) at REPL[5]:2
2 z = x + y
3 return z + y
4 end

About to run: (+)(1, 2)
1|debug > n
In foo(x, y) at REPL[5]:2
2 z = x + y
3 return z + y
4 end

About to run: (+)(3, 2)
1|julia > z
ERROR: access to invalid slot number
Stacktrace:
 [1] top-level scope
 [2] top-level scope at REPL[7]:1
 [3] eval at ./boot.jl:328 [inlined]
 [4] eval_code(::DebuggerFramework.DebuggerState, ::ASTInterpreter2.JuliaStackFrame, ::String) at /home/staticfloat/.julia/dev/ASTInterpreter2/src/ASTInterpreter2.jl:139
 [5] eval_code(::DebuggerFramework.DebuggerState, ::String) at /home/staticfloat/.julia/dev/DebuggerFramework/src/DebuggerFramework.jl:227
 [6] (::getfield(ASTInterpreter2, Symbol("##21#22")){DebuggerFramework.DebuggerState})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /home/staticfloat/.julia/dev/ASTInterpreter2/src/ASTInterpreter2.jl:211
 [7] #invokelatest#1 at ./essentials.jl:754 [inlined]
 [8] invokelatest at ./essentials.jl:753 [inlined]
 [9] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /home/staticfloat/tmp/julia-build/julia-master/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:2273
 [10] run_interface at /home/staticfloat/tmp/julia-build/julia-master/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:2267 [inlined]
 [11] RunDebugger(::Array{ASTInterpreter2.JuliaStackFrame,1}, ::REPL.LineEditREPL, ::REPL.Terminals.TTYTerminal) at /home/staticfloat/.julia/dev/DebuggerFramework/src/DebuggerFramework.jl:314
 [12] RunDebugger(::Array{ASTInterpreter2.JuliaStackFrame,1}) at /home/staticfloat/.julia/dev/DebuggerFramework/src/DebuggerFramework.jl:240
 [13] top-level scope at /home/staticfloat/.julia/dev/ASTInterpreter2/src/ASTInterpreter2.jl:479
@KristofferC
Copy link
Member

Works with #37.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants