# Bug in DifferentialEquations

**URL:** https://discourse.julialang.org/t/bug-in-differentialequations/116968
**Category:** General Usage
**Tags:** question, diffeq
**Created:** [July 12, 2024, 12:21pm UTC](https://discourse.julialang.org/t/bug-in-differentialequations/116968 "2024-07-12T12:21:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![elcup](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elcup/32/202351_2.png) [@elcup](https://discourse.julialang.org/u/elcup)
#### Post date: [July 12, 2024, 12:21pm UTC](https://discourse.julialang.org/t/bug-in-differentialequations/116968/1 "2024-07-12T12:21:29Z")

</div>

Hi!

Note: I am working on a new environment with only DifferentialEquations.jl installed.

When I run the following simple code taken from the tutorials of DifferentialEquations.jl ([Conditional Dosing in Pharmacometrics · DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/examples/conditional_dosing/)):

```julia
using DifferentialEquations
function f(du, u, p, t)
   du[1] = -u[1]
end

u0 = [10.0]
prob = ODEProblem(f, u0, (0.0, 10.0))
sol = solve(prob)

```

It works fine.

But when I change the las line to  
`sol = solve(prob, saveat=1)`  
to save results every 1 timestep, I get the following error:

```julia
Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7fff9d568610 -- gc_setmark_pool_ at C:/workdir/src\gc.c:876 [inlined]
gc_setmark_pool at C:/workdir/src\gc.c:895 [inlined]
gc_setmark at C:/workdir/src\gc.c:902 [inlined]
gc_setmark at C:/workdir/src\gc.c:898 [inlined]
gc_mark_outrefs at C:/workdir/src\gc.c:2617 [inlined]
gc_mark_loop_serial_ at C:/workdir/src\gc.c:2690
in expression starting at c:\Users\P090596\Documents\mycode.jl:7
(blah blah blah)
Allocations: 22625331 (Pool: 22606367; Big: 18964); GC: 35

```

Any ideas on how to resolve this?

---

<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: [July 12, 2024, 1:21pm UTC](https://discourse.julialang.org/t/bug-in-differentialequations/116968/2 "2024-07-12T13:21:41Z")

</div>

What version of Julia are you using and how did you install it?

---

<div class="post-metadata">

### Author: ![elcup](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elcup/32/202351_2.png) [@elcup](https://discourse.julialang.org/u/elcup)
#### Post date: [September 13, 2024, 11:04am UTC](https://discourse.julialang.org/t/bug-in-differentialequations/116968/3 "2024-09-13T11:04:49Z")

</div>

Sorry I never answered. I did a full reinstall of Julia and it works now. Apparently I was using a wrong version. Thanks!
