# Where to report a bug in OrdinaryDiffEqBDF

**URL:** https://discourse.julialang.org/t/where-to-report-a-bug-in-ordinarydiffeqbdf/135759
**Category:** General Usage
**Tags:** question, package, ordinarydiffeq
**Created:** [February 20, 2026, 7:56pm UTC](https://discourse.julialang.org/t/where-to-report-a-bug-in-ordinarydiffeqbdf/135759 "2026-02-20T19:56:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [February 20, 2026, 7:56pm UTC](https://discourse.julialang.org/t/where-to-report-a-bug-in-ordinarydiffeqbdf/135759/1 "2026-02-20T19:56:40Z")

</div>

KiteModels.jl precompiles successfully now with max\_order: 5, but not with max\_order: 4. This is just a workaround for the bug in OrdinaryDiffEqBDF v1.17.0. You should still report the Val(5) hardcoding bug upstream so max\_order: 4 (and 3) works correctly too.

This bug appeared after upgrading OrdinaryDiffEqCore to 3.5.

> 1. Your code creates a DFBDF solver with max\_order=4  
> In KiteModels.jl:569, when solver==“DFBDF”:
> 
> solver = DFBDF(autodiff=AutoFiniteDiff(), max\_order=Val{4}())  
> The DFBDF algorithm struct stores max\_order as a type parameter MO=4.
> 
> 1. The cache is constructed with mismatched sizes  
> In dae\_caches.jl, function alg\_cache for DFBDF{MO} where MO=4:
> 
> dense = [zero(u) for \_ in 1:(2 \* (max\_order + 1))] # max\_order=MO=4 → 10 elements  
> But then the constructor call hardcodes Val(5) instead of using Val(MO):
> 
> return DFBDFCache( fsalfirst, nlsolver, ts, ts\_tmp, t\_old, u\_history, order, prev\_order, u\_corrector, u₀, bdf\_coeffs, Val(5), # ← BUG: should be Val(MO) or Val(max\_order) nconsteps, consfailcnt, tmp, atmp, … dense # ← has only 10 elements (for max\_order=4))  
> This means DFBDFCache{max\_order=5, …} — the type says max\_order is 5, but the data (dense) was sized for max\_order=4.
> 
> 1. initialize! trusts the type parameter  
> In dae\_perform\_step.jl:436:
> 
> function initialize!(integrator, cache::DFBDFCache{max\_order}) where {max\_order} integrator.kshortsize = 2 \* (max\_order + 1) # max\_order=5 (from type) → 12 resize!(integrator.k, integrator.kshortsize) # integrator.k has 12 slots for i in 1:(2 \* (max\_order + 1)) # loops i = 1:12 integrator.k[i] = cache.dense[i] # cache.dense has only 10 elements end # → BoundsError at i=11end  
> Summary  
> What Expected (MO=4) Actual (hardcoded Val(5))  
> cache.dense length 10 10 (sized from MO=4)  
> Type parameter max\_order 4 5 (from Val(5))  
> Loop range in initialize! 1:10 1:12  
> The type parameter and the data are out of sync. The dense vector is sized correctly from the runtime MO=4, but Val(5) bakes 5 into the type, so initialize! loops to 12 and overruns the 10-element vector.
> 
> Setting max\_order: 5 works around it because then dense is sized to 2\*(5+1)=12, matching the hardcoded Val(5).
> 
> The proper upstream fix is one character: change Val(5) to Val(MO) on line ~299 of dae\_caches.jl. (The same file’s alg\_cache for FBDFCache has the identical bug with Val(5) on line ~757.)
> 
> Claude Opus 4.6 • 3x

---

<div class="post-metadata">

### Author: ![technocrat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/technocrat/32/220947_2.png) [@technocrat](https://discourse.julialang.org/u/technocrat)
#### Post date: [February 20, 2026, 8:03pm UTC](https://discourse.julialang.org/t/where-to-report-a-bug-in-ordinarydiffeqbdf/135759/2 "2026-02-20T20:03:04Z")

</div>

> [@ufechner7](#):
>
> OrdinaryDiffEqBDF

I don’t see any open issues on that on [github](https://github.com/SciML/OrdinaryDiffEq.jl/issues), so you might try there.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 21, 2026, 3:39am UTC](https://discourse.julialang.org/t/where-to-report-a-bug-in-ordinarydiffeqbdf/135759/3 "2026-02-21T03:39:55Z")

</div>

Handled

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [February 21, 2026, 4:36am UTC](https://discourse.julialang.org/t/where-to-report-a-bug-in-ordinarydiffeqbdf/135759/4 "2026-02-21T04:36:37Z")

</div>

If you are handling it, can you provide a link to the issue or pull request?

UPDATE:  
Fixed in [Fix hardcoded Val(5) in FBDF/DFBDF cache constructors · SciML/OrdinaryDiffEq.jl@d8ac1a9 · GitHub](https://github.com/SciML/OrdinaryDiffEq.jl/commit/d8ac1a969bc8311694613419b7a207e50766a705)

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 21, 2026, 4:48am UTC](https://discourse.julialang.org/t/where-to-report-a-bug-in-ordinarydiffeqbdf/135759/5 "2026-02-21T04:48:56Z")

</div>

Lost power but already merged and released
