Skip to content
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

MethodError: Cannot convert an object of type Vector{Any} to an object of type UInt64 on julia nightly #305

Closed
jishnub opened this issue Oct 14, 2022 · 1 comment

Comments

@jishnub
Copy link

jishnub commented Oct 14, 2022

MWE (using the master branch of ApproxFunBase.jl, I've used the commit JuliaApproximation/ApproxFunBase.jl@79da383 if this matters):

julia> VERSION
v"1.9.0-DEV.1584"

julia> using SnoopCompileCore

julia> invalidations = @snoopr using ApproxFunBase;

julia> length(invalidations)
1723

julia> using SnoopCompile

julia> trees = invalidation_trees(invalidations)
ERROR: MethodError: Cannot `convert` an object of type Vector{Any} to an object of type UInt64

Closest candidates are:
  convert(::Type{T}, ::Ptr) where T<:Integer
   @ Base pointer.jl:23
  convert(::Type{T}, ::ApproxFunBase.ConstantTimesOperator) where T<:Number
   @ ApproxFunBase ~/Dropbox/JuliaPackages/ApproxFunBase/src/Operators/general/algebra.jl:172
  convert(::Type{T}, ::BlockArrays.Block{1}) where T<:Number
   @ BlockArrays ~/.julia/packages/BlockArrays/5iQPM/src/blockindices.jl:95
  ...

Stacktrace:
 [1] cvt1
   @ ./essentials.jl:418 [inlined]
 [2] ntuple
   @ ./ntuple.jl:49 [inlined]
 [3] convert(#unused#::Type{Tuple{Int32, UInt64}}, x::Tuple{Int32, Vector{Any}})
   @ Base ./essentials.jl:419
 [4] setindex!(h::Dict{Tuple{Int32, UInt64}, Tuple{Any, Vector{Any}}}, v0::Tuple{Core.MethodInstance, DataType}, key0::Tuple{Int32, Vector{Any}})
   @ Base ./dict.jl:361
 [5] (::SnoopCompile.var"#handle_insert_backedges#138")(list::Vector{Any}, i::Int64, callee::Core.MethodInstance)
   @ SnoopCompile ~/.julia/packages/SnoopCompile/TtLwA/src/invalidations.jl:293
 [6] invalidation_trees(list::Vector{Any}; exclude_corecompiler::Bool)
   @ SnoopCompile ~/.julia/packages/SnoopCompile/TtLwA/src/invalidations.jl:373
 [7] invalidation_trees(list::Vector{Any})
   @ SnoopCompile ~/.julia/packages/SnoopCompile/TtLwA/src/invalidations.jl:288
 [8] top-level scope
   @ REPL[5]:1

A similar error was also seen in Polynomials.jl, although, oddly, I can't reproduce this

@timholy
Copy link
Owner

timholy commented Jan 10, 2023

On SnoopCompile v2.9.7, I can't replicate this with either Julia 1.8.4 or nightly. There have been many fixes to both the package and Julia (#315 (comment)). Feel free to reopen if this is still an issue.

@timholy timholy closed this as completed Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants