-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debugger throws an exception whenever a CxxWrap call is made #613
Comments
To reproduce this without vscode, and with a stacktrace that points to the JuliaInterpreter error path ( (@v1.10) pkg> activate --temp
Activating new project at `/tmp/jl_ZaaGQm`
(jl_ZaaGQm) pkg> add JuliaInterpreter
(jl_ZaaGQm) pkg> add Oscar
julia> using JuliaInterpreter
julia> using Oscar
julia> R, s = Oscar.polynomial_ring(Oscar.QQ, "s");
julia> C, i = Oscar.number_field(s^2 + 1, "i");
julia> polyRing, (a1, a2, a3, a4) = Oscar.polynomial_ring(C, ["a1", "a2", "a3", "a4"]);
julia> idl = Oscar.ideal(polyRing, [a1+a2*a3]);
julia> @interpret Oscar.groebner_basis(idl, ordering = revlex(polyRing))
ERROR: unknown call f introduced by ccall lowering getindex
Stacktrace:
[1] error(::String, ::Function)
@ Base ./error.jl:44
[2] #invokelatest#2
@ ./essentials.jl:892 [inlined]
[3] invokelatest
@ ./essentials.jl:889 [inlined]
[4] lookup_or_eval(recurse::Any, frame::Frame, node::Any)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:120
[5] collect_args(recurse::Any, frame::Frame, call_expr::Expr; isfc::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:160
[6] collect_args(recurse::Any, frame::Frame, call_expr::Expr)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:153
[7] bypass_builtins(recurse::Any, frame::Frame, call_expr::Expr, pc::Int64)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:207
[8] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:251
[9] evaluate_call_recurse!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:249 [inlined]
[10] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:422
[11] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:495
[12] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:633
[13] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:14
[14] finish_and_return!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:30
[15] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:288
--- the last 7 lines are repeated 2 more times ---
[30] evaluate_call_recurse!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:249 [inlined]
[31] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:422
[32] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:578
[33] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:633
[34] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:14
[35] finish_and_return!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:30
[36] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:288
--- the last 7 lines are repeated 1 more time ---
[44] evaluate_call_recurse!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:249 [inlined]
[45] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:422
[46] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:495
[47] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:633
[48] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:14
[49] finish_and_return!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:30
[50] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:288
[51] evaluate_call_recurse!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:249 [inlined]
[52] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:422
[53] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:578
--- the last 7 lines are repeated 5 more times ---
[89] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:633
[90] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:14
[91] finish_and_return!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:30
[92] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:288
[93] evaluate_call_recurse!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:249 [inlined]
[94] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:422
[95] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:495
[96] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:633
[97] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:14
[98] finish_and_return!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:30
[99] evaluate_call_recurse!(recurse::Any, frame::Frame, call_expr::Expr; enter_generated::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:288
[100] evaluate_call_recurse!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:249 [inlined]
[101] eval_rhs(recurse::Any, frame::Frame, node::Expr)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:422
[102] step_expr!(recurse::Any, frame::Frame, node::Any, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:578
--- the last 7 lines are repeated 3 more times ---
[124] step_expr!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/interpret.jl:633
[125] finish!(recurse::Any, frame::Frame, istoplevel::Bool)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:14
[126] finish_and_return!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:30 [inlined]
[127] finish_and_return!
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:34 [inlined]
[128] finish_and_return!(frame::Frame)
@ JuliaInterpreter /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/commands.jl:34
[129] macro expansion
@ /home/datastore/lorenz/software/julia/depot/packages/JuliaInterpreter/KozUS/src/construct.jl:755 [inlined] |
This has also been reported here now: JuliaInterop/CxxWrap.jl#435 I can reproduce it but I have no idea what causes this. |
Experiencing same issue I am working with dev containers |
After recently upgrading to:
Ubuntu 22.04
VSCode Version 1.86.2
julia version 1.10.1
The debugger in VSCode as well as Debugger.jl both crash when encountering julia code that has a call to CxxWrap.
Note that the same code runs fine without any issues when running julia in non-debug mode.
Here is an example of the stack trace:
unknown call f introduced by ccall lowering getindex
Stacktrace:
[1] rPar(arg1::CxxWrap.CxxWrapCore.CxxPtr{Singular.libSingular.coeffs})
@ Singular.libSingular ~/.julia/packages/CxxWrap/5IZvn/src/CxxWrap.jl:624
[2] transcendence_degree(F::Singular.N_FField)
@ Singular ~/.julia/packages/Singular/78GJh/src/number/n_transExt.jl:25
[3] transcendence_basis(F::Singular.N_FField)
@ Singular ~/.julia/packages/Singular/78GJh/src/number/n_transExt.jl:33
[4] FunctionField(F::Singular.Rationals, S::Vector{Symbol}; cached::Bool)
@ Singular ~/.julia/packages/Singular/78GJh/src/number/n_transExt.jl:392
[5] FunctionField(F::Singular.Rationals, S::Vector{Symbol})
@ Singular ~/.julia/packages/Singular/78GJh/src/number/n_transExt.jl:387
[6] singular_coeff_ring(K::AnticNumberField)
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/mpoly.jl:510
[7] singular_poly_ring(Rx::AbstractAlgebra.Generic.MPolyRing{nf_elem}; keep_ordering::Bool)
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/mpoly.jl:628
[8] kwcall(::NamedTuple{(:keep_ordering,), Tuple{Bool}}, ::typeof(singular_poly_ring), Rx::AbstractAlgebra.Generic.MPolyRing{nf_elem})
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/mpoly.jl:621
[9] singular_assure(I::Oscar.IdealGens{AbstractAlgebra.Generic.MPoly{nf_elem}})
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/mpoly.jl:760
[10] singular_generators(B::Oscar.IdealGens{AbstractAlgebra.Generic.MPoly{nf_elem}}, monorder::Oscar.Orderings.MonomialOrdering{AbstractAlgebra.Generic.MPolyRing{nf_elem}})
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/mpoly.jl:389
[11] _compute_standard_basis(B::Oscar.IdealGens{AbstractAlgebra.Generic.MPoly{nf_elem}}, ordering::Oscar.Orderings.MonomialOrdering{AbstractAlgebra.Generic.MPolyRing{nf_elem}}, complete_reduction::Bool)
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/groebner.jl:105
[12] standard_basis(I::MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}}; ordering::Oscar.Orderings.MonomialOrdering{AbstractAlgebra.Generic.MPolyRing{nf_elem}}, complete_reduction::Bool, algorithm::Symbol)
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/groebner.jl:159
[13] kwcall(::NamedTuple{(:ordering, :complete_reduction, :algorithm), Tuple{Oscar.Orderings.MonomialOrdering{AbstractAlgebra.Generic.MPolyRing{nf_elem}}, Bool, Symbol}}, ::typeof(standard_basis), I::MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}})
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/groebner.jl:151
[14] groebner_basis(I::MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}}; ordering::Oscar.Orderings.MonomialOrdering{AbstractAlgebra.Generic.MPolyRing{nf_elem}}, complete_reduction::Bool, algorithm::Symbol)
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/groebner.jl:291
[15] kwcall(::NamedTuple{(:ordering,), Tuple{Oscar.Orderings.MonomialOrdering{AbstractAlgebra.Generic.MPolyRing{nf_elem}}}}, ::typeof(groebner_basis), I::MPolyIdeal{AbstractAlgebra.Generic.MPoly{nf_elem}})
@ Oscar ~/.julia/packages/Oscar/1Moid/src/Rings/groebner.jl:288
[16] groebBasProjn(basisVecs::Vector{Any}, ordrng::Oscar.Orderings.MonomialOrdering{AbstractAlgebra.Generic.MPolyRing{nf_elem}}, polyRing::AbstractAlgebra.Generic.MPolyRing{nf_elem}, varTuple::Vector{AbstractAlgebra.Generic.MPoly{nf_elem}})
The text was updated successfully, but these errors were encountered: