Is this a bug in StatProfilerHTML.jl or Profile.jl?

Recently, when I try to use StatProfilerHTML (julia-1.11.6, StatProfilerHTML-1.0.0) I get errors like

julia> statprofilehtml()
ERROR: KeyError: key 0x00007e8e4a7fc010 not found
Stacktrace:
  [1] getindex(h::Dict{UInt64, Base.StackTraces.StackFrame}, key::UInt64)
    @ Base ./dict.jl:477
  [2] (::StatProfilerHTML.var"#3#6"{Bool})(formatter::Base.Process)
    @ StatProfilerHTML ~/.julia/packages/StatProfilerHTML/OFVct/src/StatProfilerHTML.jl:33
  [3] open(::StatProfilerHTML.var"#3#6"{Bool}, ::Cmd, ::String, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Base ./process.jl:447
  [4] open
    @ ./process.jl:428 [inlined]
  [5] #2
    @ ~/.julia/packages/StatProfilerHTML/OFVct/src/StatProfilerHTML.jl:23 [inlined]
  [6] withenv(f::StatProfilerHTML.var"#2#5"{Bool}, keyvals::Pair{String, String})
    @ Base ./env.jl:265
  [7] statprofilehtml(data::Vector{UInt64}, litrace::Dict{UInt64, Vector{Base.StackTraces.StackFrame}}; from_c::Bool)
    @ StatProfilerHTML ~/.julia/packages/StatProfilerHTML/OFVct/src/StatProfilerHTML.jl:22
  [8] statprofilehtml (repeats 2 times)
    @ ~/.julia/packages/StatProfilerHTML/OFVct/src/StatProfilerHTML.jl:14 [inlined]
  [9] statprofilehtml()
    @ StatProfilerHTML ~/.julia/packages/StatProfilerHTML/OFVct/src/StatProfilerHTML.jl:14
 [10] top-level scope
    @ REPL[3]:1

I think the problem is that statprofilehtml calls (data, litrace) = Profile.retrieve() then tries to get litrace[d] for every d in data, and some of these keys are not there. So is this a bug with Profile.jl, or is the StatProfilerHTML.jl usage ‘wrong’? If it’s a Profile.jl bug, where do I report it?

Other tools (e.g. PProf) seem to work fine. Edit: pprof() does give warnings like

┌ Error: Unexpected 0 in data, please file an issue.
│   idx = 6912023
└ @ PProf ~/.julia/packages/PProf/fiTgS/src/PProf.jl:195
1 Like