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

**URL:** https://discourse.julialang.org/t/is-this-a-bug-in-statprofilerhtml-jl-or-profile-jl/132247
**Category:** General Usage
**Tags:** potential-bug, profile, statprofilerhtml
**Created:** [September 10, 2025, 8:44am UTC](https://discourse.julialang.org/t/is-this-a-bug-in-statprofilerhtml-jl-or-profile-jl/132247 "2025-09-10T08:44:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![johnomotani](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnomotani/32/26753_2.png) [@johnomotani](https://discourse.julialang.org/u/johnomotani)
#### Post date: [September 10, 2025, 8:44am UTC](https://discourse.julialang.org/t/is-this-a-bug-in-statprofilerhtml-jl-or-profile-jl/132247/1 "2025-09-10T08:44:34Z")

</div>

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

```julia
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

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

```
